![]() |
|
#1
|
|||
|
|||
|
Hello,
I'd like to set up a forum which will contain all the polls for my website. Several polls will be sometimes active at the same time. The problem is that the poll displayed on the home page is specified by the forum ID and I'm going to have all the polls in the same forum. Is there any way I can change this so that I can specify the poll ID instead? If not, does anybody know how I can write my own module that can do this? Do I use the same templates the current module uses and make a different php page to include (based on the cyrrentpoll.php)? What do I have to change in this php page? thanks Last edited by gfd; 10-05-2004 at 05:05 PM. |
|
#2
|
||||
|
||||
|
Open your currentpoll.php file and look for:
forumid IN Replace that with: poll.pollid IN |
|
#3
|
|||
|
|||
|
That is very, very close, but it won't quite do it. In the code, polls are sorted by DESC, so you would get the same darn poll even if you specified several.
Instead, 1. in currentpoll.php replace that line (around line #22) Code:
### MEC REPLACE $query['pollquery'] = 'AND forumid IN(' . $vba_options['portal_poll_forumid'] . ') ORDER BY poll.pollid DESC';
$query['pollquery'] = 'AND poll.pollid IN(' . $vba_options['portal_poll_forumid'] . ') ORDER BY RAND()';
###
12,22,13 To get the poll id numbers you can hover over the Edit Poll link on your forum and it will show in the navbar. Regards, Matt Last edited by memobug; 10-06-2004 at 02:24 PM. |
|
#4
|
|||
|
|||
|
Excellent!
works like a charm ![]() thank you very very much |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help: Forum stopped working :( | SelRahc | Troubleshooting / "How do I..." Questions | 11 | 09-24-2004 11:09 AM |
| Poll results stretched across screen | Zen | Troubleshooting / "How do I..." Questions | 2 | 08-12-2004 05:46 AM |
| Slight Forum Changes | Brian | Site Feedback & Updates | 0 | 07-08-2004 06:19 PM |
| Poll problem | contramontanum | Troubleshooting / "How do I..." Questions | 2 | 06-21-2004 12:46 PM |