|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Design Customization IF forum thread date (if) |
IF forum thread date |
Hello. Is that possible to use forum new threads informer with IF codes for example:
IF thread DATE is TODAY - something.. ELSE something 2 .. ?! ty. edit: oh, WDAY, yes? anyway the question for solution is active Post edited by Korijs - Friday, 2014-09-26, 10:28 AM
|
But the main idea as problem is...
I created 2 CSS styles - for example red and green I need informer which provide information about newest updated threads as default informer, BUT in informer i wanted to put some code that provide these 2 CSS styles in 2 groups - 1 CSS for forum threads updated today and 1 CSS for other.. what could be a code for this example? IF threads are updated today = my style 1, if other days = my style 2 get idea? |
Korijs, yes, $WDAY$ will work for that application assuming it is displayed as Today. Wherever you want to apply your class use the following condition.
Code class="<?if($WDAY$ == 'Today')?>class1today<?else?>class2other<?endif?>" Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
hmm, maybe i'm too tired but i dont get it how can i make it working.
my example @informer design: Code <style> .forumreplies { background-color:#f0dddf; border:1px solid #E7C39C; border-radius:2px; width:20px; } </style> <style> .forumrepliesm { background-color:#f0dddf; border:1px solid #E7C39C; border-radius:2px; width:160px; } </style> <table style="padding: 2.5px 0pt;" width="100%" cellpadding="0" cellspacing="0"> <tbody><tr><td align="left"><img src="http://ucozwebmeistars.ucoz.lv/img/8.gif"> <a href="$THREAD_URL$">$THREAD_TITLE$</a></td> <td align="right"><span> <center>$REPLIES$</center> </div></span></td> </tr></tbody></table> |
Code <style type="text/css"> .forumreplies {background-color:#f0dddf; border:1px solid #E7C39C; border-radius:2px; width:20px;} .forumrepliesm {background-color:#f0dddf; border:1px solid #E7C39C; border-radius:2px; width:160px;} </style> <table class="<?if($WDAY$ == 'Today')?>forumreplies<?else?>forumrepliesm<?endif?>" style="padding: 2.5px 0pt;" width="100%" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="text-align:left;"> <img src="http://ucozwebmeistars.ucoz.lv/img/8.gif"> <a href="$THREAD_URL$">$THREAD_TITLE$</a> </td> <td style="text-align:right;"> <div style="text-align:center;">$REPLIES$</div> </td> </tr> </tbody> </table> Try that. Unrelated developer perspective - why do you right align your text in your right hand side table cell to then center align the text? If you only need it center aligned good coding practices wouldn't require you to right align the text within the table cell. Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
ty for tryin but its doesnt work :/
all threads at the informer are showing the same color (yes, ichanged 1st css style color now) result now with your code: result what im waitin: (red border means that this thread have been posted in forum today) eh Attachments:
2023802.png
(7.3 Kb)
·
4573497.png
(10.8 Kb)
Post edited by Korijs - Monday, 2014-09-29, 4:35 PM
|
| |||
| |||