bitweaver
Wiki
wiki Home
List Pages
wiki Books
Orphan Pages
wiki Rankings
Photos
List Galleries
Forums
Browse forums
Files
List Galleries
Categories
List Categories
Sign In
Message Boards
»
05. Support - Themes and layout
Newest
Oldest
Threaded
5
10
20
50
100
All
Messages
Add a DIV class to Wiki pages and articles
Post Reply
Jaap_van_Ekris
Joined: 27 Mar 2006
Add a DIV class to Wiki pages and articles
Posted:14 May 2006 (21:44 UTC)
Jaap_van_Ekris
Joined: 27 Mar 2006
Posted:20 May 2006 (17:38 UTC)
dspt
Joined: 10 Jan 2006
Posted:22 May 2006 (16:28 UTC)
Jaap_van_Ekris
Joined: 27 Mar 2006
Posted:22 May 2006 (17:33 UTC)
dspt
Joined: 10 Jan 2006
Posted:23 May 2006 (14:22 UTC)
Jaap_van_Ekris
Joined: 27 Mar 2006
Posted:23 May 2006 (20:41 UTC)
xing
Joined: 07 Mar 2004
Posted:24 May 2006 (07:34 UTC)
Post Reply
Page 1 of 1
1
Post
Title
Login
If you are already registered, please enter your login credentials.
Your Name
Anonymous Post
Content Format
Tiki Wiki Syntax
Allow HTML
{quote format_guid="bbcode" comment_id="8069" user="Jaap_van_Ekris"}Thanks! I made some other modification that, to me, is a much nicer solution. I have added a case statement that handles the "class" option and simply copies the value of the class to the output. [code:1:d7ba088680]switch( $key ) { case 'preset': if( $value == 'dark' ) { $style .= 'background:#333;color:#ccc;border:2px solid #000;padding:0.5em 1em;margin:0.5em;'; } elseif( $value == "orange" ) { $style .= 'background:#f60;color:#fff;border:2px solid #900;padding:0.5em 1em;margin:0.5em;'; } elseif( $value == "red" ) { $style .= 'background:#eee;color:#900;border:2px solid #900;padding:0.5em 1em;margin:0.5em;'; } elseif( $value == "blue" ) { $style .= 'background:#def;color:#009;border:2px solid #acf;padding:0.5em 1em;margin:0.5em;'; } elseif( $value == "centered" ) { $style .= 'background:#eee;color:#333;border:2px solid #ddd;padding:0.5em 1em;margin:0.5em auto;width:50%;text-align:center;'; } break; case 'class': $class .= $value; break; default: $style .= $key.':'.$value.';'; break; } } return( '<div class="'.$class.'" style="'.$style.'">'.$data.'</div>' ); [/code:1:d7ba088680]This way, you can handle the style centrally from the CSS (where allstyles are defined!!) and do not have to modify this bitweaver file every time I want something new in my graphical design, or want to introduce a new style. I think i will remove the "preset" option all together: it is beter to use a CSS style (that is dependent on the selected style, so it can change appearance when you switch style) than a "style" that is hardcoded in bitweaver. Is it wise to communicate this to the development team so they can consider this as a permanent modification? Jaap{/quote}
Recent Page Changes
welcome to bitweaver.org
Bitweaver Overview
ReleaseTwo Schema Changelog 2006
PressReleaseOne
Spider's Web
Press Release Two
BitcommercePackage
InfiniBand vs Ethernet Performance
InfiniBand for Dummies
Show More…