FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Alternating shades of gray
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Alternating shades of gray [message #26497] Fri, 22 July 2005 21:34 Go to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
A couple of users recently suggested that table rows within each forum in the listing of topics alternate between shades of gray to make it easier to see what information on the right applies to each topic on the left.

Looking at the thread_row template, it's columns that alternate RowStyleA, RowStyleB and RowStyleC. The way it is now, the cells of each row go (in RowStyles):

BBABBC

Could this template be edited so every other row would go something like:

AABCCA

If so, how could this be accomplished?

Thanks.
Re: Alternating shades of gray [message #26499 is a reply to message #26497] Fri, 22 July 2005 21:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You would add something like this to the <tr> tag for each row:
class="{ALT-VAR: search_alt RowStyleA RowStyleB}"

and be sure to add {REF: alt_var.tmpl} to the ref list in the template.


FUDforum Core Developer
Re: Alternating shades of gray [message #26500 is a reply to message #26499] Fri, 22 July 2005 21:59 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Fri, 22 July 2005 16:48

You would add something like this to the <tr> tag for each row:
class="{ALT-VAR: search_alt RowStyleA RowStyleB}"

and be sure to add {REF: alt_var.tmpl} to the ref list in the template.



What would happen with the <td> tags? Would they change or stay the same?
Re: Alternating shades of gray [message #26501 is a reply to message #26500] Fri, 22 July 2005 22:02 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
<Td> tags would stay the same, you could of course modify them too... up to you really...

I am just showing you how to do color alternation using FUD's templating system.


FUDforum Core Developer
Re: Alternating shades of gray [message #26502 is a reply to message #26501] Fri, 22 July 2005 22:53 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Thanks again. I'll do some experimenting later tonight.
Re: Alternating shades of gray [message #26516 is a reply to message #26499] Sun, 24 July 2005 02:23 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Fri, 22 July 2005 16:48

and be sure to add {REF: alt_var.tmpl} to the ref list in the template.


By "ref list", do you mean:

<a href="{TEMPLATE: reg_user_link_lnk}">{VAR: r[8]}</a>{ELSE}{GVAR: ANON_NICK}{END} <a href="{TEMPLATE: last_msg_in_thread_lnk}"><img src="{THEME_IMAGE_ROOT}/goto.gif" title="{MSG: last_thread_msg}" alt="" /></a>

one or both of these? That is, inside the <a href...> tags?

OR, are you referring to another template, one other than thread_row?

[Updated on: Sun, 24 July 2005 02:35]

Report message to a moderator

Re: Alternating shades of gray [message #26518 is a reply to message #26516] Sun, 24 July 2005 04:24 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
No, its something template editor does not display, you'll see it if you open the file manually.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fudforum migration
Next Topic: fudforum and typo3
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 15:21:24 GMT 2024

Total time taken to generate the page: 0.02129 seconds