vBulletin Modifications

Daily Reset

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > vBulletin Modification Requests

Reply
 
LinkBack Thread Tools
Old 06-19-2006, 08:46 AM   #1
vB Newbie
Join Date: Jun 2006
marksyzm is on a distinguished road

Unhappy Daily Reset

(moved from Support Requests)

I've been working on the post_thanks hack and have (almost) successfully transformed it into a point system that gives the user the option to give more than one thank (point) per day. Unfortunately I'm not sure how to create a system using the TIMENOW function where you reset the number in, let's say, post_thanks_thanks_already to 25.

So I just want this number to be 25 at midnight on the dot, to put this simply. Kudos to anyone who can help me!




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 06-19-2006, 11:07 AM   #2
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

So you want to set everyone's post_thanks_thanks_already to 25 at midnight? I'm sorry, I don't seem to get it :p




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-19-2006, 11:30 AM   #3
vB Newbie
Join Date: Jun 2006
marksyzm is on a distinguished road

Default

Basically I've created a points system where people can thank items only 25 times a day, and also thank a post more than once. This gets displayed in points.

For example instead of the thanks button, you get 1-10. These links all work and give 1 to 10.



BUT I don't want people to thank things millions and millions of times a day. So I set the number of thanks used daily to 25.

My question is that I want to use the timenow function and post_thanks_thanks_already to have a fixed amount that is set at the same point each day.

This may look stupid but i've tried something like...

You must first be a registered member to view any code.
That's quickly jotted up... if I complete this idea I will post this here on vbhackers. Do you think you can help me?

Last edited by marksyzm; 06-19-2006 at 11:57 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-19-2006, 11:36 AM   #4
vB Newbie
Join Date: Jun 2006
marksyzm is on a distinguished road

Default

Sorry I meant post_thanks_already :Z




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-19-2006, 12:05 PM   #5
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Well, you could add a new table called 'thankstoday', with the rows userid, threadid and numberthanks. Then add a cronjob which clears that table every night at 00:00.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-19-2006, 12:26 PM   #6
vB Newbie
Join Date: Jun 2006
marksyzm is on a distinguished road

Default

Quote:
Originally Posted by Arnoud
Well, you could add a new table called 'thankstoday', with the rows userid, threadid and numberthanks. Then add a cronjob which clears that table every night at 00:00.
Okay, this is where I'm lost... could you show me an example of a cronjob that clears at a set time? It's the set time thing I'm having trouble with.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-19-2006, 12:31 PM   #7
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Here's a nice howto on how to make cronjobs. Simply add a query to clear the table, and add it as a cronjob. Set that cronjob to run at 23:59 and you're done




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-20-2006, 10:29 AM   #8
vB Newbie
Join Date: Jun 2006
marksyzm is on a distinguished road

Default

Do you have a tables creating tutorial? I've got some idea but I just want to get this right, that's all.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-20-2006, 04:48 PM   #9
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

What you can do is go into phpmyadmin get a test db and then add a table and set it all up then press create and phpmyadmin will show you the query it ran to do that. You can that put that query wherever you want eg. a product xml file

Last edited by Nick R; 06-20-2006 at 04:50 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are you adding content daily? Rex Growing Your vB Forum 3 06-05-2006 01:33 PM
www.Slipen.com - Your Daily Dosage Of Internet Organics Danie vBulletin Showcase 2 05-28-2006 09:11 AM
Daily Click Limit ReBeLLiouS vBulletin Modification Requests 0 07-16-2005 05:11 AM
Reset settings to default ? IceCube General vBulletin Support 5 05-22-2004 02:35 PM


All times are GMT -3. The time now is 01:17 AM.


SEO by vBSEO 3.2.0 RC8 ©2008, Crawlability, Inc. (Patent Pending)