The MU forums have moved to WordPress.org

persistant css file across themes (16 posts)

  1. Ovidiu
    Member
    Posted 12 years ago #

    hi there,

    I found this plugin: http://www.siolon.com/2007/persistent-styles-plugin/ and modified it for usage with wpmu. This plugin works from the mu-plugins folder and allows you to have a css file stick to any theme you chose, which is great if you want to format certain plugins output but it needs the template editor to be somehow enabled.You can find it here: http://wpmudevorg.wordpress.com/project/Persistent-Styles-for-WPMU - the author was fine with me posting it there.

    Please give it a test and give me some feedback about how we can allow acces to this plugin to all siteadmins while still restricting access to editing of other files.

  2. kingler
    Member
    Posted 12 years ago #

    Refresh me please, template editor? Do you mean the theme editor?

    It is disabled by default in WPMU.

  3. Ovidiu
    Member
    Posted 12 years ago #

    I am not sure, I was under the impression that they were different editors?

    anyway I thought someone could combine this with the other plugin floating around here as a skeleton to include certain features for paying customers?

    you could do a check in the editor to see if user is allowed to edit?

  4. Ovidiu
    Member
    Posted 12 years ago #

    you can go ahead and sign up for a test account here: http://zice.ro and see if you can edit anything else than this persistant.css file BACKEND => Presentation => Persistent styles

  5. drmike
    Member
    Posted 12 years ago #

    Actually Donncha made a suggestion indirectly on just loading CSS files in from the database as a record. That way there's no file access at all.

  6. kingler
    Member
    Posted 12 years ago #

    yeah, i remembered that as well. WordPress.com is using database option for the custom CSS.

  7. drmike
    Member
    Posted 12 years ago #

    Had a thought. Why are you using a speciallized plugin to do this? Why not just load a special CSS file and have it called by a call to the header hook?

  8. gumdrop
    Member
    Posted 12 years ago #

    Hey Ovi, what are you using for users online?

  9. Ovidiu
    Member
    Posted 12 years ago #

    I use users online plugin by lester chan, but not the original version. someone (can't remember who) sent me his modified version that works with wpmu... I think it was dizzy? do a search in the forum and if you don't find it I can send it to you...

    @drmike

    thats a little over my head... would there be any bonus by doing it your way? I guess I still would have the problem of having to enable the editor...
    btw. can I comment out the wp_die from the editor and do a check like if file to be edited = persistent.css allow, else wp_die?

  10. gumdrop
    Member
    Posted 12 years ago #

    That would be great, Ovi
    send it to: foxy (at) knsi (dot) net

    Thx.

  11. suleiman
    Member
    Posted 12 years ago #

    so here's the deal. A while ago I released a quick and easy hack of the MyCSS plugin which loads CSS above all themes, and does not require any activation of the smelly theme editor.

    It was part of my bundled "I-Power-Blogger-Style Widget" and you can find it here folks:

    http://suleiman.hadithuna.com/wpmu-plugins-hacks/

  12. Ovidiu
    Member
    Posted 12 years ago #

    I had a quick look at the mycss plugin but

    1. it points to a single my.css file while I want a persistent file for each blog which the blog owner can edit himself
    2. are you sure the plugi nis not using the editor anyway? how would it work otherwise?

    I am going to try it tomorrow, thx.

  13. suleiman
    Member
    Posted 12 years ago #

    ovidiu, my bad, I thought you were looking for a persistent css file across all blogs and themes, not a custom css editor for each user that would work across all themes they would want to activate.

    Essentially this is going back to the question of enabling custom CSS, and the XSS issues that come with it.

  14. cpoteet
    Member
    Posted 12 years ago #

  15. kingler
    Member
    Posted 12 years ago #

    Cool. More plugin writers should consider branching their plugins for WPMU like this :)

  16. neyoung
    Member
    Posted 11 years ago #

    Dizzy any chance you could repost your modified users online plugin? Or possibly get it hosted on wpmudev?

About this Topic