Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Custom CSS Definitions
Andreas
Join Date: Jan 2004
Posts: 6,863

Germany
by Andreas Andreas is offline 11 Apr 2009
Rating: (1 vote - 3.00 average)

I've seen many modifications that use vBulletin settings for CSS definitions.

But there is a far better way to easily let the administrator set up CSS definitions: Create your own CSS classes!

The process is pretty straight forward:
First of all you have to create a new entry in table template:
  • templatetype = css
  • product = Your product id
  • styleid = -1
  • template
    Your serialized CSS definitions. To start with empty definitions just use

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  • title
    Your CSS classname, for example .cssdemoclass
  • dateline
    Current UNIX timestamp
  • username
    Your username in your dev board
  • version
    The version number of your modification

I suggest to do this in phpMyAdmin, which results in a query (if you want to do it fully manually) similar to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now that you've added the new class, you should rebuild all styles.

Afterwards, you need two plugins to make the class actually editable in style manager:

css_edit

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

css_output_build

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That's it, now you can edit your own class as you could edit any default class.
Attached Files
File Type: xml product-cssdemo.xml (1.9 KB, 25 views)
Views: 4091
Reply With Quote
Comments
  #2  
Old 11 Apr 2009, 14:41
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
thank you Andreas
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #3  
Old 26 Feb 2016, 16:16
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
i know this is old as heck, but is there any explanation for the a:#'s and the s:#'s

say i want to add:
position:
border:
and more, is this possible?

and having no clue what the a's and s's stand for im kind of clueless.

also would i need to define multiple <template name=".cssdemoclass"... for each class I want to have options
__________________
Sorry been away so long, new baby, got married, got into GM, just got to the point I can resume developing.
I'm working on a bunch of products, some free, some paid, and will release them all at once.
Dirt RIF CustUmz
Reply With Quote
  #4  
Old 26 Feb 2016, 19:25
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Originally Posted by Dr.CustUmz View Post
i know this is old as heck, but is there any explanation for the a:#'s and the s:#'s
Simply put, this is PHP serialized data. Here is a pretty detailed explanation that will help you understand it better.

Can't answer the rest, sorry.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 06:02.

Layout Options | Width: Wide Color: