The MU forums have moved to WordPress.org

Editing theme - help (23 posts)

  1. rajaramin
    Member
    Posted 18 years ago #

    Hi,
    though i'm the admin of my site, i couldn't find any option to edit the theme.(i was able to edit in normal wordpress blog but not in wpmu) .Any help is appreciated.

  2. andrea_r
    Moderator
    Posted 18 years ago #

    It's been disabled in MU. If you need to edit/tweak themes, and you don't want users to have acces (which is a certain level of security risk) you'll have to edit the files directly on the server. Or on another WP install, or locally.

  3. mrjcleaver
    Member
    Posted 18 years ago #

    Hmm. I trust some of my users, in particular a graphic designer.

    In the short term I guess I could symlink the theme from a regular WP install to WPMU.

    In the long term I'd like to grant access to edit directly.

  4. andrea_r
    Moderator
    Posted 18 years ago #

    The themes are shared between users. If one user edits the theme with the included-but-commented-out original Theme Editor, it changes for everyone using that theme.
    If you really want editable themes, try this:
    http://wpmudevorg.wordpress.com/project/User-Themes

  5. drmike
    Member
    Posted 18 years ago #

    I've been kicking around the idea for selecting if a user should have the right to edit a theme or not. It would be a simple matter of adding in an extra option to the blog and doing a call with the function get_option.

    If so, have them presented with some sort of editor. (I like the idea where one would preload the current theme's CSS file which Wp.com doesn't do) Allow the client the ability to edit the file the way they want it and save it an an additonal option for the blog. The, when the blog is displayed, do a function call to use that css of if it's found in the database or display the original one of not.

    The editor is the sticking point due to security concerns.

    -drmike

  6. rajaramin
    Member
    Posted 18 years ago #

    Hi, thanks for the response. that was great.

    My requirement is:
    admin will have his own theme. no one will have previlage to edit it. But members in community will create their own blogs ie.; member.domain.com. Every one should have permission to edit their own theme alone.
    Am i clear?

  7. drmike
    Member
    Posted 18 years ago #

    Every one should have permission to edit their own theme alone.

    Best bet would be folow the suggestion I made above. Create an editor and store teh css in the database.

  8. andrea_r
    Moderator
    Posted 18 years ago #

    The link I provided above would do what drmike suggested. Also, in the backend you can enable who sees what themes. For example, on my site (homeschooljournal.net - not the one linked on my name) the theme on the main blog is disabled for everyone else and enabled just for me.

    That kind of functionality is included in the backend by default.

  9. rajaramin
    Member
    Posted 18 years ago #

    Thanks a lot, friends!
    One more doubt. Will my user have facility to edit their sidebar.
    ie., if required, they can add their own adsense etc....
    i'm going to try USER THEMES now....

  10. andrea_r
    Moderator
    Posted 18 years ago #

    "Will my user have facility to edit their sidebar."

    Not as-is, no. BUT if you install the widgets plugin, and make sure all themes are widget compatible, then they can edit their sidebars very easily.

  11. rajaramin
    Member
    Posted 18 years ago #

    andrea_r:

    So editing a sidebar too gets saved in user options. ie., it works similar to editing the theme. Am i right? (since two users with the same theme should not be affected)

  12. mrjcleaver
    Member
    Posted 18 years ago #

    So https://samson.blog.asu.edu/userthemes/ says "Allowing theme editing is dangerous! Wordpress themes are simply PHP code, so you have to trust users to write php code that will execute on your server. Don’t hold me liable if one of your users write a theme that deletes your entire database or something"

    Can these theme files be scrubbed of dangerous php constructs so that the theme editor can be used by anyone? Its not so good to tell users that you don't trust them... but being able to edit themes is a good feature.

    Maybe the administrator can be alerted if anything untoward gets put in, to draw attention to the malevolent user?

  13. andrea_r
    Moderator
    Posted 18 years ago #

    With the widgets plugin, and widget-compatible themes, there's a default sidebar specific to that theme. If the user moves things around or adds new "boxes", that gets saved with their information. Also, if the've arranged their sidebar to their liking, and swithc themes, hte format travels to the new theme with - as long as the new theme is also widget-compatible.
    You should try it. :)

  14. samsonasu
    Member
    Posted 18 years ago #

    Hi, this is Brian Samson.

    "Scrubbing" the modified php file to remove dangerous constructs is difficult. PHP is a versatile language, and even if you block access to all the functions that are dangerous to the server, the real problem stems from the database.

    Wordpress has a nessecary dependancy on full access to the database, and WP uses a global database handle that is used by many of the themes out there.

    I think the best idea is to keep a human in between raw php and other people you don't trust. If people are really adamant about changing their own themes, they could just download the theme that they are using, modify it outside of wordpress, and then submit it back to IT for review and approval.

    So in summary, I will not be working on a solution to this problem to sanitize the php.

    The widgets solution sounds interesting, though, I would suggest you look at that.

  15. andrea_r
    Moderator
    Posted 18 years ago #

    My suggestion for users who want that much control over their themes is to get a domain name, their own webspace and the stand-alone version of WP. :)

    Coudl be a suggestion for paid users - they want theme editing? Then they can pay a yearly rate to be hosted on your server with the regular version of WP.

  16. drmike
    Member
    Posted 18 years ago #

    Could also just install a regular version of WP as a seperate account for that subdomain.

  17. andrea_r
    Moderator
    Posted 18 years ago #

    Yeah, that's what I meant. :)

  18. drmike
    Member
    Posted 18 years ago #

    Agreed but make it look like they have the same site but really they would have their own setup. Put in the redirection in htaccess and all that.

  19. andrea_r
    Moderator
    Posted 18 years ago #

    Yep. Cool huh?

  20. skcsknathan001
    Member
    Posted 17 years ago #

    andrea_r

    Were you able to make the User_Themes plugin to work? When I do the Copy to My Themes, it says it coppied but doesn't appear under My Themes. Only copies the WordPress Default theme, and even that when I trid to edit, it just errors saying header is already sent!

  21. andrea_r
    Moderator
    Posted 17 years ago #

    Yes, but I dumped it. Work right away for me, but I decided it didn't do what I wanted it to do.

  22. Ovidiu
    Member
    Posted 17 years ago #

    I had problems too with the userthemes pugin, check out this thread:
    http://mu.wordpress.org/forums/topic.php?id=1583&replies=9
    to me it looks like you need php5,right?

  23. mvkozyrev
    Member
    Posted 16 years ago #

    I have the same goal.

    Make a visual tyeme editor with the following functions:
    a number of "empty" templates to choose one of them;
    CSS editing mode visual editor without the possibility of entering code;
    Loading own image.

    Then user would can use this theme on his blog, share it for community, edit or delete it.

    It will seems like on-line theme generator - http://templatr.de/, but in wpmu installation, like plugin.

    Any ideas for best development?

About this Topic

  • Started 18 years ago by rajaramin
  • Latest reply from mvkozyrev