If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Poll grouping  XML
Forum Index » Support Forum
Author Message
Anonymous



Any idea how to run polls in groups as
1 to 20 -> sports
21 to 30 -> music
31 to 40 -> leisure

and any idea on how to delete polls without disturbing the lists. or how to make new pollls using old poll id's?

Are there hidden comands to do this?

Thanks
Anonymous



As far as I remember a similar question was posted before. I wish I could do that but also don't know how. Auron, Carbonize or a hacker out there might have an answer or some ideas on this regard.

Paul
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Can you explain on what you want to do a bit?
Do you mean like group several polls together to make like a
questionnaire with one large total at the end? Or separate totals
for each poll / question?

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Johncr
Beginner

Joined: 21/09/2004 03:01:15
Messages: 28
Offline

Auron the one who posted that question before was me.

This is my code:



(have edited this post because I included the graphics and comments code and the problem regards to the poll list only.)

The problem is that poll.php accepts one argument and not a range.
The list code on top displays all 30 polls at once. What I wanna do is to call in batches of 10 polls each using three different links. Something like the following pseudo code:

/poll.php?poll_id=1 to 10
/poll.php?poll_id=11 to 20
/poll.php?poll_id=21 to 30


So that the called page displays a group of ten diferent links and not all at once. In other words, we can group polls so that polls 'n to n+10' or whatever figures you wish are displayed per page.
Anonymous



Johncr wrote:The problem is that poll.php accepts one argument and not a range.


Right. The only arguments allowed are newest, random and x (x=poll_ic)

It would be great to have another argument to select a list range.

Paul
Johncr
Beginner

Joined: 21/09/2004 03:01:15
Messages: 28
Offline

Okay.
I spent a couple of hours modifying the code and now I can list from poll n to poll nn using online arguments like:



these arguments displays poll 10 to poll 20, plus poll 5 results and all the displayed links carry the same plist_start and plist_end to mintain the poll list within range.

So, now I can group my polls as needed, say 1 to 20 for sports, 21 to 30 for politics, 31 to 40 girls, and so on.

Next mod desired is to set aside poll blocks in order to create new polls at any poll_id. The workaround is creating hidden dummy polls.
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

You've been busy.

What you really need is a feature to group polls in the admin area and
then have a string to list that group of polls in various styles.

On a feature to select a number of polls...

Eg. 1-3, 5,7 Like you can in word when printing out certain pages.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Anonymous



Johncr wrote:


That´s enough for me. Will you share your code?
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

I'm still figuring out your code lol.
I didn't know you specify what the start and end poll's were for the poll list : )

If I put any code together i'll release it as a mod along with the other mods
i made for adv. poll 2.0.2 which i'll convert to 2.0.3 if necessary.

Most the mods are simple things that i put into do this, then that, and the
other kind of files like you get with phpBB when you have to install a mod.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Johncr
Beginner

Joined: 21/09/2004 03:01:15
Messages: 28
Offline

Hi,
I'm late. What I did is basically the following:

I call the script, let say you wish to display from poll 21 to poll 30, as follows:



poll.php calls the /* poll list */ this way:




I modified the function call view_poll_plist':



then after:



I added:



Remember to close with an additional '}'

Then I customized here and there.

As a result you can group your polls in one HTML page as I posted before: 1 to 20 dogs, 21 to 40 cats, 41 to 60 horses and so on. The main problem with this approach is the limitation that you can't insert polls so I use dummies and the hidden option to conceal them.

Auron, since the page is still closed to the public, just let me know if you wish to take a look (the page is in Spanish) and I will PM the URL. There are a couple of minor cosmetic problems but it is fully workable.
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Okay, that seems a pretty good start : )

(Maybe i should write my own poll lol)

I'll have a look over the next couple of weeks I guess if i'm not to busy.
Currently i've got an assignment to do which has some PHP in it so I
might be able to have a play with a few things then hopefully.

I still have to release my version of the poll with some improvements and
a built-in help system. Which i'm gonna have to redo since I did it for 2.0.2.
and not 2.0.3 ^^;;

Just thought, I can't remember how the code looks off the top of my head
but I might try and put some 'coding standards' into like phpbb has. This is
mainly for myself so the code is well structured and will hopefully make it
easier for people to modify it, such as yourself : )

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Johncr
Beginner

Joined: 21/09/2004 03:01:15
Messages: 28
Offline

I'll be glad to help with an idea or two.
In the mean time I'll try to fix the graphic bug and the refresh problem after writing a comment.
Anonymous



I wish that mod!
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum