|
|
Forum moderator: bigblog |
uCoz Community Communication uCoz Discussions entry adding time restriction (time restriction) |
entry adding time restriction |
I thinked again about it, maybe it could be possible using IF codes, for example:
Code <?if!($HOUR$>#) && ($HOUR$<#)?><?if($ADD_ENTRY_LINK$)?>[ <a href="$ADD_ENTRY_LINK$"><!--<s5228>-->ADD ENTRY<!--</s>--></a> ]<?endif?><?else?>ADD ENTRY after 1 hour<?endif?> BUT i got question - if that could be possible to make several IF HOUR CODES ? OR MAYBE - it is possible to use some code who uses not only HOUR but HOUR,MINUTE ? edit: ONE MORE EXAMPLE: Code <?if!($HOUR$>6) && ($HOUR$<12)?> <p style="text-align: center;"><span style="color: #ff0000; font-size: medium;"><?if($ADD_ENTRY_LINK$)?>[ <a href="$ADD_ENTRY_LINK$"><!--<s5228>-->Pievienot izaicinājumu<!--</s>--></a> ]<?endif?></span></p> <?else?> <?if!($HOUR$>13) && (substr($TIME$,3,2)>'30')?> <p style="text-align: center;"><span style="color: #ff0000; font-size: medium;"><?if($ADD_ENTRY_LINK$)?>[ <a href="$ADD_ENTRY_LINK$"><!--<s5228>-->Pievienot izaicinājumu<!--</s>--></a> ]<?endif?></span></p> <?else?> <?if!($HOUR$>13) && ($HOUR$<23)?> <p style="text-align: center;"><span style="color: #ff0000; font-size: medium;"><?if($ADD_ENTRY_LINK$)?>[ <a href="$ADD_ENTRY_LINK$"><!--<s5228>-->Pievienot izaicinājumu<!--</s>--></a> ]<?endif?></span></p> <?else?> <?if($HOUR$>22) && (substr($TIME$,3,2)>'30')?> <p style="text-align: center;"><span style="color: #ff0000; font-size: medium;"><?if($ADD_ENTRY_LINK$)?>[ <a href="$ADD_ENTRY_LINK$"><!--<s5228>-->Pievienot izaicinājumu<!--</s>--></a> ]<?endif?></span></p> <?else?> <?if($ADD_ENTRY_LINK$)?>[ <a href="$ADD_ENTRY_LINK$"><!--<s5228>-->Pievienot izaicinājumu<!--</s>--></a> ]<?endif?> <?endif?><?endif?><?endif?><?endif?> Post edited by Korijs - Wednesday, 2014-10-29, 4:16 PM
|
Korijs, this isn't exactly what you wanted to do initially, i.e. a timeout. The code will let users post during certain time intervals. But how it will prevent them from posting several entries in succession?
$TIME$ counts time in hours and minutes. I'm not active on the forum anymore. Please contact other forum staff.
|
Sunny, can u give me, please, corect example like this one:
24 hours in a day, entry could be added after every 5 minutes? I just need the correct start of the code and I will finish, cuz i checked my codes and they were wrong some how. ty a lot. |
| |||
| |||