Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   Keeping Atahualpa settings (http://forum.bytesforall.com/showthread.php?t=117)

Thorvald Jan 21, 2009 12:55 PM

Keeping Atahualpa settings
 
I have a testblog where I customized the appearance of my blog. I saved the settings and copied the entire Atahualpa folder to the themes folder in my public blog. But the settings were lost in the transition and the default settings have returned.

Is there a way to keep the settings when copying the theme to a new place?

Flynn Jan 21, 2009 01:27 PM

Currently there is no import/export function but if you export the whole blog (including content such as posts and pages) via WP Site Admin -> Tools -> Export, then the theme options SHOULD be exported as well and could then be imported into the new blog via WP Site Admin -> Tools -> Import

An Atahualpa specific import/export is on my to-do list but will take a while and probably not make it into version 3.1.9 or 3.2


Edited: I am actually not sure if the WP options table is being exported as well. Have not tested it yet.

Thorvald Jan 21, 2009 02:24 PM

Thank you for the fast answer. Copying the whole blog is not an alternative for me. I will have two windows open side by side and transfer the settings manually, which is perfectly all right with me.

Keep up the good work Flynn!

upscho Feb 4, 2009 04:32 AM

I have exactly the same problem as Thorvald:

I have a test installation of WordPress and Atahualpa on my local PC. I then installed WP on my webspace and exported/imported the WP options. But after copying the Atahualpa directory on my webspace all Atahualpa settings were gone.

Should I have done it vice-versa (first copy directory and then import the options)?

I thought the settings were in one of the Atahualpa files but unfortunately they were not.

Exporting the Atahualpa settings (as an XML file?) would also be nice to document them. Currently I'm all mixed up in writing the options that are different from their defaults on a couple of paper sheets...

But nevertheless: Atahualpa is really great. I allowed me to build up a web side within a few evenings. Thanks a lot.

Regards,
upscho

Flynn Feb 4, 2009 04:56 AM

I have the export.php so far but no import yet. Also, I may have to change the export.php. But to extract the settings you could use this file for now I guess. Please don't expect me to deliver the import.php within days.

Upload the following file as i.e. "export.php" to the theme directory and call it in the browser as
http://www.yoursite.com/wp-content/t...pa3/export.php (your path may be ../atahualpa/..)

PHP Code:

<?php
// Find wp-load.php so we can access the database from within our non-standard, external file here
$d 0// search depth;
while (!file_exists(str_repeat('../'$d) . 'wp-load.php')) if (++$d 99) exit;
$wp_load str_repeat('../'$d) . 'wp-load.php';
require_once(
$wp_load);

global 
$wpdb;

// get all option names and options values from the WP Options table where the option name starts with "bfa_ata_"
$atahualpa_options $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name REGEXP '^bfa_ata_'");

// output the header
$filename 'atahualpa.options.' str_replace("http://","",get_option('siteurl')) . "." date('Y-m-d') . '.xml';
header('Content-Description: File Transfer');
header("Content-Disposition: attachment; filename=$filename");
header('Content-Type: text/xml; charset=' get_option('blog_charset'), true);

// output the file
echo '<?xml version="1.0" encoding="' get_bloginfo('charset') . '"?' ">\n";

echo 
"<atahualpa_options>\n";
// Loop through the database query that we got earlier
foreach ($atahualpa_options as $atahualpa_option) {
        echo 
"<" $atahualpa_option->option_name ">\n";
        echo 
htmlspecialchars($atahualpa_option->option_value);
        echo 
"\n</" $atahualpa_option->option_name ">\n";
    }
echo
"</atahualpa_options>\n";
?>


upscho Feb 4, 2009 02:26 PM

Hi Flynn,

the script works PERFECTLY for me. Thanks a lot! :)

Since I was mainly interested in a documentation of my settings I can wait till there will be an import script some day...

Best regards,
upscho

fotomag Feb 15, 2009 02:04 AM

I understood how create export.php file, but how transfer and save settings in new blog?

Flynn Feb 15, 2009 04:20 PM

There is no import.php yet. To import it into a new blog you'd have to copy & paste from the xml file that export.php has created into the Atahualpa Theme Options of the new blog. But it is still better than copy/pasting from one Theme Options page to the other Theme Options page: You'd have all options on one page (in the xml file) and you'd have only the changed options there. The options that were not changed are not included in the xml file.

Or use PhpMyAdmin, see http://forum.bytesforall.com/showthread.php?t=278

teros Jul 30, 2009 08:09 PM

I might be way off here....don't write code myself, but might it be easy/easier/doable for the developers to incorporate into the theme a "save as new default" feature ? If this could be done then designers could theoretically do extensive customizations, then save them as a new default, then download - rename - re-upload to additional sites or individual blogs (wpmu).

Assuming it wouldn't be a major pain in the a$$ for the developer (which it might be - like I mentioned I don't write code) it seems to me it would be a very straightforward way for designers to come up with tons of variations on the basic Atahualpa framework even if they didnt have access to phpmyadmin for duplication of options across sites.

Just a thought....


All times are GMT -6. The time now is 09:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.