mikesta707 Posted April 23, 2009 Share Posted April 23, 2009 Hello everyone. So i created my own discussion board from scratch (its similar to the wakaba image board, but without images.) and it works perfectly! Pretty much exactly like I want, but as it currently stands, there is no way to "bump" a topic, or to cleanse the board (IE start deleting posts once there are too many) Now, I have an idea of what I want to do for bumping a topic. probably something along the lines of having a rank column in the mysql table, and when ever someone posts something, or makes a reply, all the ranks of the topics in the table get changed. Can anyone suggest a better way to do this? if not than thats ok Now the problem I have is cleansing the board. Ideally, I want the server to execute a script, probably once every hour/day or so, which checks how many entries there are, and deletes the ones that have the lowest rank (or.. well highest rank). I want this to be automated, so that I dont have to run the script every time I want this to happen. Is this possible? Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/ Share on other sites More sharing options...
Zhadus Posted April 23, 2009 Share Posted April 23, 2009 Have your "table" sort by date of last post as far as "bumps" go. As far as cleansing, a cron job would be in order. Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817694 Share on other sites More sharing options...
redarrow Posted April 23, 2009 Share Posted April 23, 2009 it passable mate called cron. no i think time and date better i guess. Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817695 Share on other sites More sharing options...
jackpf Posted April 23, 2009 Share Posted April 23, 2009 You could just set up a cron job to run a script that deletes all threads/topics which have less than x replies and are y days old. Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817696 Share on other sites More sharing options...
redarrow Posted April 23, 2009 Share Posted April 23, 2009 I am sure my opinion, if a post does not get a an saw then deleting it, is not a good way of getting good seo ranking. what about just not showing it, as a live post, but keeping it for seo purpose traffic i say wins.. I think if you show all posts from now(), and don't show the post aft her a set time , i recommend 1 month, then if Google index it, they will still see it from Google, even Theo your not showing it as a live replied post. Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817699 Share on other sites More sharing options...
mikesta707 Posted April 23, 2009 Author Share Posted April 23, 2009 Have your "table" sort by date of last post as far as "bumps" go. As far as cleansing, a cron job would be in order. awesome thank you so much, that is an amazing idea now as far as this Cron job thing goes, what exactly is it? is it a specific function, or should I google it to get a good tutorial on it? thanks in advanced! Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817704 Share on other sites More sharing options...
premiso Posted April 23, 2009 Share Posted April 23, 2009 Google is always your friend. If on *NIX cron is the way to go. If on M$ then Scheduled Tasks would be the equivalent. Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817710 Share on other sites More sharing options...
mikesta707 Posted April 23, 2009 Author Share Posted April 23, 2009 awesome. Thanks everyone. I just implemented the Bump script, and it works perfectly. Gonna do some research on Cron Jobs now, but consider this topic solved Quote Link to comment https://forums.phpfreaks.com/topic/155402-solved-having-the-server-run-a-php-script/#findComment-817715 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.