vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   link reset every 24 hours (https://vborg.vbsupport.ru/showthread.php?t=282747)

olalaaa 05-10-2012 09:40 PM

link reset every 24 hours
 
Hello fellow vbmembers,

i have been searching the internet for a link resetter.
i have seen this on some forums. it works like this: you click on a certain link to vote for the site,
and then its starts a countdown of 24 hours before you are able to click the link again.

i am not that good of a programmer, i only know html and css and a little how php works.
but thats it,

i am thining that this has to be a if/else statement
example

if($time = "0"){
echo " the link ";
} else {
echo "you already have voted to day wait $time";
}

mybe my example is horrible wrong, but i think it has to be something like that.

is there already a code on this forum.
could you give me the code if there is or a link to it.
or point me into the right direction, how to create a code for what i am looking.

best regards

olalaaa

kh99 05-10-2012 09:52 PM

That would pretty much be the idea, but you need to get the time of the last vote for the current user. That means that if you don't have it available already from somewhere, you need to save it in the db when the user votes.

I have a vague recollection of someone wanting something like this (maybe a couple years ago or something), but I have no idea if there's a mod for this already.


All times are GMT. The time now is 07:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00963 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete