Using a plugin to edit CSS?
#1
I was trying to edit the usercp.css using a plugin. I thought I read here that you could, so I was wondering if someone could help me. I just need to add this bit of code to it. There is a way right? I mean, I know how to do it manually.

Code:
.usercp_nav_chat_pmfolder{
        padding-left:40px;
        background:  url('images/usercp/chat_pmfolder.gif')no-repeat left center;
}

Aren't I supposed to add the code in plugin_activate(){/*code*/}

Sorry for all my questions. Wink
Reply
#2
For the plugin way of adding the CSS code I don't know. What I know is you can add that bit of code in the Admin CP very easily. Templates & Style>Themes>your theme>global.css and press Advanced Mode, then simply add the code there.
Reply
#3
The stylesheets are stored under `themestylesheets` in the database

To edit them grab them from there and work on them and update them once done.

If you want to add your css entries at the end, it will be a simple concatenation, if you want to add it somewhere in the middle, then you''l have to perform regex search to find the terms around where you want to insert it and insert it there.
Reply
#4
Of course, how dumb of me!

Thank you very much!

To think I just got done w/ a parser that used the same method!
Reply
#5
(07-17-2009, 08:54 PM)- G33K - Wrote:  The stylesheets are stored under `themestylesheets` in the database

To edit them grab them from there and work on them and update them once done.

If you want to add your css entries at the end, it will be a simple concatenation, if you want to add it somewhere in the middle, then you''l have to perform regex search to find the terms around where you want to insert it and insert it there.

However he also has to update the stylesheet that is on the server. Just updating the database instance of it won't be enough.
Reply
#6
There are functions available in the ACP functions that update the CSS. They escape memory as of this moment but I know they exist.

Have a look in the style module for the ACP, and see how it's done.
Reply
#7
ACP? My dear forum mate, you have lost me.

Admin Control Panel, I got you mate. =D
Reply
#8
ACP = Admin Control Panel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)