Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) CSS Buttons for YaBB 2.2 (Read 6830 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
CSS Buttons for YaBB 2.2
Dec 6th, 2007 at 8:52pm
Print Post  
Ever wanted to add a new set of graphic buttons to your YaBB 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 20x10 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.

Format for new button:

UnikeName_left.png (10x20 px)
UnikeName_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=\"$html_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.

---------------------
Screenshot:


----------------------

Thanks to ThM for German translations of text for Templates.lng:

German_Sie
Code
Select All
'buttontext' => 'CSS Buttons',
'buttondescription' => 'Hier können Sie die Position des Icon, den Text innerhalb des Buttons sowie die Hintergrund Grafik für den Button ändern.',
'moveicon1' => 'Icon nach unten setzen um:',
'moveicon2' => 'Icon nach rechts setzen um:',
'iconspace' => 'Icon Abstand zum Text:',
'movetext' => 'Text nach unten setzen um:', 



German_Du
Code
Select All
'buttontext' => 'CSS Buttons',
'buttondescription' => 'Hier kannst Du die Position des Icon, den Text innerhalb des Buttons sowie die Hintergrund Grafik für den Button ändern.',
'moveicon1' => 'Icon nach unten setzen um:',
'moveicon2' => 'Icon nach rechts setzen um:',
'iconspace' => 'Icon Abstand zum Text:',
'movetext' => 'Text nach unten setzen um:',  

« Last Edit: Dec 11th, 2007 at 4:52pm by Carsten »  

CSS_Buttons.zip ( 49 KB | Downloads )

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
 
mick
Senior Member
****
Offline


I love YaBB

Posts: 345
Location: Dorsten
Joined: Nov 29th, 2005
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #1 - Dec 6th, 2007 at 10:59pm
Print Post  
Hi,

I like this mod! Thank you very much,
Carsten.

For German_Du I made a Mod - my first.
Ok, it's a small one Wink

Greetings
Mick
  

css_buttons_German_Du.zip ( 0 KB | Downloads )
Back to top
WWW  
IP Logged
 
mattcch
New Member
*
Offline


Web

Posts: 45
Joined: Jun 8th, 2007
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #2 - Dec 28th, 2007 at 8:17am
Print Post  
Thanks you very much.
Work ok.  Smiley
  
Back to top
WWW  
IP Logged
 
gman
Junior Member
**
Offline


The Mod Mangler <HeLp_mE>

Posts: 79
Location: Altered States
Joined: Aug 24th, 2007
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #3 - Jan 8th, 2008 at 8:38pm
Print Post  
This mod is such a time saver WOW

Very cool mod!

It installed right away and works perfect!

Thank you!
  

Unfortunately, prior to my birth, Missouri had not outlawed inbreeding.
Back to top
WWWYIM  
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #4 - Jan 9th, 2008 at 10:39pm
Print Post  
Hi Carsten,

it's right, this mod changed only the standard yabb buttons ?

I've installed JetLi's Quick Quote Mod and the button "Quick Quote" in the package don't show in my board.

I changed to the default template and i see the button "Quick Quote"
  

Greeting ThM
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #5 - Jan 9th, 2008 at 10:55pm
Print Post  
ThM wrote on Jan 9th, 2008 at 10:39pm:
Hi Carsten,

it's right, this mod changed only the standard yabb buttons ?

I've installed JetLi's Quick Quote Mod and the button "Quick Quote" in the package don't show in my board.

I changed to the default template and i see the button "Quick Quote"


Mods add buttons to the 3 menu?.def files in Variables folder - but you'll have to add it to the new Menu.def yourself.

From the readme.txt -
Quote:
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=\"$html_root/Buttons/$button_language/home.$imgext\" alt=\"$img_txt{'103'}\" border=\"0\" />",
  

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
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #6 - Jan 9th, 2008 at 11:06pm
Print Post  
ok .. thx .. i understand ...

I added this line in menu.def

Code
Select All
quick_quote,quick_quote|img_txt|145q|||imgwindowbg|tmp 



but no change in my template ... I tried it more
  

Greeting ThM
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #7 - Jan 9th, 2008 at 11:10pm
Print Post  
If the icon is in it's own modimages folder that folder name must be included in the icon parameter. Here's how it would look for member map:

membermap,yamms/map|maptxt|01||||mod
  

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
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #8 - Jan 9th, 2008 at 11:22pm
Print Post  
No success ...

i think it's a little error from me .... i tried it later ... thx for reply ....
  

Greeting ThM
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #9 - Jan 10th, 2008 at 5:50pm
Print Post  
ThM wrote on Jan 9th, 2008 at 11:22pm:
No success ...

i think it's a little error from me .... i tried it later ... thx for reply ....

If you post the code string for 'quick_quote' from Menu0.def here i'll give you the correct string for 'Menu.def'.
  

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
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #10 - Jan 10th, 2008 at 6:02pm
Print Post  
Hi Carsten,

with a little help from JetLi now it run's perfect. I have build in the wrong string in Menu.def

now i understand how it works...

Many thanks for your help and the great Mod and thanks also JetLi.

  

Greeting ThM
Back to top
 
IP Logged
 
Floyd the Barber
New Member
*
Offline


Everythings okay, in Mayberry.

Posts: 9
Location: Huntsville
Joined: Mar 2nd, 2008
Re: CSS Buttons for YaBB 2.2
Reply #11 - Mar 2nd, 2008 at 8:33pm
Print Post  
I love this MOD but I saw you mention that the YaMMS were done this way.....

Does that mean that YaMMS21 will work with YaBB2.2?  Not being able to find that answer has kept me from upgrading one of my boards as I use the member map there.
  
Back to top
WWW  
IP Logged
 
soullink
New Member
*
Offline


My Head Hurts!

Posts: 10
Location: Norwich, Norfolk, UK
Joined: Oct 2nd, 2006
Gender: Male
Re: CSS Buttons for YaBB 2.2
Reply #12 - Jul 7th, 2008 at 7:12pm
Print Post  
Just ran into a problem myself which some other may run into.  Once the mod has been installed and all files uploaded, there is a chance you might upload the 'default.css' and 'yabb21.css' files (or edit them yourself) to the wrong location.  The result is that the Mod will show as "Installed" on the Admin CP "Installed Mods" tab - but the CSS Buttons section of the Stylesheet menu will not appear.

Simply click on the "source" button at the top of the Edit Style Sheet window, find a suitable place and then enter the code in the 'css_adds.txt' file and hit "save default.css".   This should return you to the WYSIWYG editor with the CSS buttons now showing Wink
  
Back to top
WWW  
IP Logged
 
kidgixxer
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 37
Joined: Jul 27th, 2006
Re: CSS Buttons for YaBB 2.2
Reply #13 - Jul 12th, 2008 at 4:00am
Print Post  
Anyone else buttons not changing? The only buttons that change are the msn, yahoo and aim. If it helps im using yabb.2.2.2 and the new yabb style css
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint