thnx guys.
This script will do some automated house cleaning periodically via cron job.
task:
1- read general forum topics that have not been updated after last script run and before the past 48 hours, let's say 200 topics at a time.
2- for each topic check if it contains any forum name
3-
a. if it finds a forum name, let's say Canada, move the topic to Canada forum
b. if it contains more than one forum name, like Canada and Gedo, get topic name and id and store them in an array
4- at the end of each batch (200 topics or x #)
a- if the above mentioned array contains data, post an automated topic on a preselected moderator forum with the name and link to each topic that has two or more forum names in it.
b. go to the next batch.
5- at the end, produce some statistics like the number of topics read, moved, marked for manual move, time stared, time ended.
6- save the timestamp of when the script started on a flat file. Is is needed for the next run.
We basically want to auto move topics after 48 our of inactivity to a more suitable forum. for instance, this link shows you many "Gedo" topics some of which very important that are buried deep in the general section. This script will move such topics to most suitable forum in the background after 48 hours of inactivity.
search.php?keywords=gedo&terms=all&auth ... mit=Search
How to:
1. install apache/mysql5/php5 on your computer
2. download and install phpbb3's (latest subversion)
3. create x number of forums (destination - you will be moving topics to these forums)
4. create the source forum (like the general here) and populate with topics most of which with the names of other forums
5- create another forum for posting messages for moderators
6- spend time on phpbb database and its tables
write the code.
don't worry about security. we will sanitize it if necessary.
don't worry about authentication either.
just plain php code that:
accesses topics and forums tables
modifies topics table to change forum_id for topics being moved
posts automated topic on a preselected forum (you can skip this part, it needs some tweaking and more time. Just dump the array to a flatfile with the timestamp_multi_forum.txt as a filename.
CAN YOU GUYS DO IT?
Students: you will be able to add "created custom software for a very large community website on your resume.
I might post some pseudo code to make it easier for you.
tnx again...