Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic CSS Buttons 4 YaBB 2.5 (beta 0.1) (Read 1452 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
CSS Buttons 4 YaBB 2.5 (beta 0.1)
Dec 12th, 2010 at 4:46am
Print Post  
Ever wanted to add a new set of graphic buttons to your YaBB template but gave up because it was to much trouble making more than 60 different graphics?

With this mod you'll get the job done by making only 2 - yes TWO - small graphics!!! One left part 10x20 px and one right part 260x20 px in .png or .gif format. Give them the same name except for the last part which must be '_left' and '_right'. Place them directly in the 'yabbfiles/Buttons' folder and - Voila - they will appear in the Style Sheet wysiwyg editor for you to add to your templates.

This also means that you can add different buttons to different templates!!

Format for new button:

UnikName_left.png (10x20 px)
UnikName_right.png (260x20 px)


Also added a new extra "Menu.def" to load all 3 menu modes from only one file. The format for adding new buttons to the new "Menu.def" file compared to "old style" is:

hash-key,icon|hash-for-text|key-for-text|hash-for-alt|key-for-alt|backgr-style|t
emplate-or-mod

For the "Home" button it looks like this:

New Menu.def style:
home,home|img_txt|103|img_txt|103|imgmenu|tmp

Old Menu0.def:
'home' => "<img src=\"$imagesdir/home.$imgext\" alt=\"$img_txt{'103'}\" border=\"0\" /> <span class=\"imgmenu\">$img_txt{'103'}</span>",

Old Menu1.def:
'home' => "<span class=\"imgmenu\">$img_txt{'103'}</span>",

Old Menu2.def:
'home' => "<img src=\"$yyhtml_root/Buttons/$button_language/home.$imgext\" alt=\"$img_txt{'103'}\" border=\"0\" />",


Included in the zip package are new 'default.css' and 'yabb21.css' - if you dont want to overwrite your existing .css files you can copy the styles from the 'css_adds.txt' file (also included in the zip) and paste them into your .css file(s).

If the template in use does not have the css-button styles in it the board will automatically load the old menu definitions.




  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: CSS Buttons 4 YaBB 2.5 (beta 0.1)
Reply #1 - Dec 12th, 2010 at 5:22am
Print Post  
Great Mod - Thanks!

I'll be adding the relevant CSS to my templates just as soon as I've made some images. Cheesy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint