vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 10-05-2004, 04:57 PM
gfd gfd is offline
Junior Member
 
Join Date: Sep 2004
Posts: 8
Default Specify Poll by Poll ID, not Forum ID

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  
Old 10-06-2004, 12:34 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Specify Poll by Poll ID, not Forum ID

Open your currentpoll.php file and look for:

forumid IN

Replace that with:

poll.pollid IN
  #3  
Old 10-06-2004, 02:20 PM
memobug memobug is offline
Senior Member
 
Join Date: Aug 2004
Posts: 121
Default Re: Specify Poll by Poll ID, not Forum ID

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()';
###
2. Now in your CMPS defaults screen, you can use a list of poll ids in place of the line that formerly held the poll forum ID. Separate them with a single comma and no spaces. Order doesn't matter. For example.

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  
Old 10-07-2004, 05:48 AM
gfd gfd is offline
Junior Member
 
Join Date: Sep 2004
Posts: 8
Default Re: Specify Poll by Poll ID, not Forum ID

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

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

Forum Jump

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


All times are GMT -4. The time now is 05:29 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.