Current time: 04-18-2014, 12:28 AM Hello There, Guest! (LoginRegister)


Post Reply 
Using a plugin to edit CSS?
07-16-2009, 01:55 PM (This post was last modified: 07-29-2009 05:31 AM by TrigZu.)
Post: #1
Using a plugin to edit CSS?
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
Find all posts by this user
Quote this message in a reply
07-17-2009, 12:22 PM
Post: #2
RE: Using a plugin to edit CSS?
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.
Find all posts by this user
Quote this message in a reply
07-17-2009, 08:54 PM
Post: #3
RE: Using a plugin to edit CSS?
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-18-2009, 12:35 AM (This post was last modified: 07-18-2009 12:36 AM by TrigZu.)
Post: #4
RE: Using a plugin to edit CSS?
Of course, how dumb of me!

Thank you very much!

To think I just got done w/ a parser that used the same method!
Find all posts by this user
Quote this message in a reply
07-18-2009, 02:02 AM
Post: #5
RE: Using a plugin to edit CSS?
(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.
Find all posts by this user
Quote this message in a reply
07-18-2009, 08:32 AM
Post: #6
RE: Using a plugin to edit CSS?
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.
Find all posts by this user
Quote this message in a reply
07-20-2009, 04:19 AM (This post was last modified: 07-20-2009 04:21 AM by TrigZu.)
Post: #7
RE: Using a plugin to edit CSS?
ACP? My dear forum mate, you have lost me.

Admin Control Panel, I got you mate. =D
Find all posts by this user
Quote this message in a reply
07-20-2009, 04:20 AM
Post: #8
RE: Using a plugin to edit CSS?
ACP = Admin Control Panel
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication