• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » Communication » uCoz Discussions » entry adding time restriction (time restriction)
entry adding time restriction
Korijs
Posts: 267
Reputation: 5

Message # 1 | 7:46 PM
Hello.

I would like to know if that is possible to make for example /dir module entry adding time restriction?
I just want that user could add only 1 entry per hour.

ty a lot!
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 3:37 PM
Korijs, it cannot be done with the standard system tools and will probably require a lot of custom scripting.
I'm not active on the forum anymore. Please contact other forum staff.
Korijs
Posts: 267
Reputation: 5

Message # 3 | 4:07 PM
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
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 11:49 AM
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?

Quote Korijs ()
OR MAYBE - it is possible to use some code who uses not only HOUR but HOUR,MINUTE ?

$TIME$ counts time in hours and minutes.

I'm not active on the forum anymore. Please contact other forum staff.
Korijs
Posts: 267
Reputation: 5

Message # 5 | 11:27 AM
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.
uCoz Community » Communication » uCoz Discussions » entry adding time restriction (time restriction)
  • Page 1 of 1
  • 1
Search: