The MU forums have moved to WordPress.org

User Editable Themes (9 posts)

  1. samsonasu
    Member
    Posted 18 years ago #

    Hi guys,

    I wrote a plugin a while ago so that a few of our users at ASU could use the built in WordPress theme editor in our MU installation. You can download it wpmudev.org. I'd appreciate feedback because I'm sure its a little buggy, but I think its a pretty cool plugin.

    http://wpmudevorg.wordpress.com/project/User-Themes

  2. debrouille
    Member
    Posted 18 years ago #

    Hey samsonasu,

    Nice idea, this plugin, as a theme editor at all is missing on WPMU.

    I wanted to use it but it seems that it won't work with PHP4, is this right?

  3. suleiman
    Member
    Posted 18 years ago #

    samsonasu, when trying to use this plugin i get the following error:

    mkdir() expects at most 2 parameters, 3 given in /home/...../public_html/wp-content/mu-plugins/userthemes.php on line 77

  4. drmike
    Member
    Posted 18 years ago #

    And line 77 would be...

  5. merqtio
    Member
    Posted 17 years ago #

    drmike, I got precisely the same error as suleiman... Here's the code (line 77 with "-->" added)

    function my_themes() {
    $this->get_all_themes();
    $page = $_GET['page'];
    switch ($_GET['action']) {
    //Important TODO: make sure to strip ..'s and such
    case 'edit':
    if (get_option('ut_use_use_theme') != 1)
    $this->flip_mode();
    header("Location: /wp-admin/theme-editor.php?theme={$_GET['theme']}");
    break;

    case 'copy':
    $copyTheme = $_GET['theme'];
    if (!isset($copyTheme)) {
    $message = "Error: No theme selected";
    return;
    }
    $dest = $this->get_user_theme_root() . '/' . $copyTheme ;
    while (file_exists($dest . $suffix))
    $suffix = $suffix + 1;
    --> mkdir($dest . $suffix, 0777, true);

    $src = $this->get_system_theme_root() . '/' . $copyTheme;

    exec("/bin/cp -R $src/* $dest$suffix");
    exec("/bin/chmod -R 777 $dest$suffic"); //This is terrible
    if (count($this->userThemes) == 1) {
    //This is the first theme, so prepare the db for the switch
    $keys = array_keys($this->userThemes);
    update_option('ut_backup_user_template', $this->userThemes[$keys[0]]['Template']);
    update_option('ut_backup_user_stylesheet', $this->userThemes[$keys[0]]['Stylesheet']);
    }

  6. Ovidiu
    Member
    Posted 17 years ago #

    sorry for bumping this old thread, I just discovered a problem with this plugin.

    it works fine for me except that a certain blog does not appear on my list of this plugins options menue where I can select for which blog to enable it.

    The blog which does not appear is a bit different from the others, meaning that I have a user, who created jsut a username, and later created a blog of his own which is precisely the blog that does not show in User Themes list so I can't enable the plugin for this blog...

    any idea? can someone test this constellation and see if it works?

  7. dsader
    Member
    Posted 17 years ago #

    I repeated your steps, adding user via site admin, then adding their blog.

    User blog appears normally under usertheme enabler.

    Sorry, no help.

  8. Ovidiu
    Member
    Posted 17 years ago #

    I dug some more and found out I once had this plugin active: http://www.ilfilosofo.com/blog/enroll-comments for testing. this plugin allows visitors that comment to check a box and they automatically get subscribed as users with default role set to subscriber for the blog they commented on...

    tests were not successful so I stopped using that plugin.

    I will just delete and recreate both user and blog. its not wort digging deeper into this. thx for testing.

  9. demonicume
    Member
    Posted 17 years ago #

    so this is a php4.0 issue? upgrading to 5 will fix this?

About this Topic

  • Started 18 years ago by samsonasu
  • Latest reply from demonicume