Poll creation automation

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
krazymike
Registered User
Posts: 3
Joined: Wed Apr 02, 2008 6:40 pm

Poll creation automation

Post by krazymike » Wed Apr 02, 2008 6:46 pm

I have a game clan website running a ported phpBB 2.0.15.

We have a recruitment process which includes a poll, allowing current members to vote for/against the admission of a new recruit in to the clan. What I have is a form which the person fills out and a script which adds them to the recruit group, but I still have to manually add the poll. I'd like to automate this, but I'm a little stumped. There's the topic, topic_text, etc, rows that I need to add, and I was wondering if anyone out there could help me out.

Thanks in advance.

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: Poll creation automation

Post by drathbun » Wed Apr 02, 2008 7:02 pm

The topic has to have the topic_vote set to 1, that's how it knows there is a poll. From there you need to enter rows in two more tables. The code to do that isn't too bad. The sample is either in posting.php or includes/functions_posts.php I think.

The tables you need to populate are phpbb_vote_desc which contains the title of the poll and the link to the topic and the expiration date, and the phpbb_vote_results which contains the options (choices) in the poll.

Questions for help coding like this are best asked in the MOD Writers forum, so I'll move your question there now. Good luck with your project. :)
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

Post Reply

Return to “[2.0.x] MOD Writers Discussion”