View Full Version : vBulletin Forum Sideblocks - Show Poll In Forum Sideblock
Badshah93
07-07-2011, 10:00 PM
.::Show Poll In Forum Sideblock::.
-> Special Thanks To Paul M (https://vborg.vbsupport.ru/member.php?u=63698) For allowing me to use one of the code from his one of the mod.
What is it?
=====================================
This mod will show the Poll in Forum Sideblock.
Features
=====================================
1. Enable/Disable the mod from admincp.
2. Get Latest Poll From Multiple Forum. New!
3. Get Poll From Particular Thread.
4. Fully Integrated with Vbulletin Forum Sideblock Manager
-> You can change display order
-> Cache Time
5. No Template Edits.
Upgrade Instructions
=====================================
1. Upload The New xml from Product manager in Admincp. (Don't Forget to click on overwrite)
2. Enable the mod and enter threadid or forumid's for fetching the poll.
3. Run clear system cache under Maintenance
New Installation Instructions
=====================================
1. In the Product Manager in AdminCP, import the product XML file.
2. Open Settings -> Show Poll In Forum Sideblock
Enable the mod and enter threadid or forumid for fetching the poll.
3. Run clear system cache under Maintenance
Uninstalling:
=====================================
1. You can disable the mod from admincp OR Uninstall the product from the Product Manager in the AdminCP.
Mod History:
v1.0 : 08 Jul 2011 : First Release.
v2.0 : 10 Jul 2011 : With More Features And Integrated with Vbulletin Forum Sideblock Manager.
v2.1 : 28 Jul 2011 : Fix Table Prefix Issue and added multiple forums feature.
-> Click On Mark As Installed If You Have Installed This Mod.
-> You Can Nominate it also for Mod Of The Month.
dlewisr
07-08-2011, 04:38 PM
Great mod and so easy to install too. Marked as installed and rated too.
Thank you
Dr.osamA
07-08-2011, 05:32 PM
thank you
installed
TheLastSuperman
07-08-2011, 07:40 PM
Please keep comments related to this modification, all recent messages have been removed, those who posted will realize why otherwise reference here: https://vborg.vbsupport.ru/info.php?do=rules
Da-Vinci
07-08-2011, 11:26 PM
Any chance we could have this mod to pull the latest polls from a Forum, rather than from a thread?
What I mean is this is designed for me to select the latest poll.
On my forum I have a dedicated section for polls, so Ideally, I would put that forum ID in and the latest poll would be displayed automatically rathter than me adding the the latest thread ID for a poll manually. Also is there a way to make the Poll's display at the top of my sidebar instead of at the bottom?
IMO, this should be a deafault Sidebar block for VB, but good work all the same installed and rated 4.
Badshah93
07-09-2011, 02:29 AM
Any chance we could have this mod to pull the latest polls from a Forum, rather than from a thread?
What I mean is this is designed for me to select the latest poll.
On my forum I have a dedicated section for polls, so Ideally, I would put that forum ID in and the latest poll would be displayed automatically rathter than me adding the the latest thread ID for a poll manually. Also is there a way to make the Poll's display at the top of my sidebar instead of at the bottom?
IMO, this should be a deafault Sidebar block for VB, but good work all the same installed and rated 4.
Good Idea. will add that feature in updated version which i will releases soon.
and you can move the Poll at top of Sideblock by doing this:
Find:
{vb:raw sidebar}
ADD ABOVE IT
{vb:raw sideblock_poll}
BlueCheri
07-09-2011, 06:13 AM
Thanx very useful
David_R
07-09-2011, 06:52 AM
Thank You I have installated, looks good. :)
Aramist
07-09-2011, 01:08 PM
HI
Any way to put it inside a forum block?
I guess it will be more flexible as a block.
Btw nice work. Gratz
Ty in advance..
tanerokutan
07-09-2011, 04:35 PM
Installed but did not work. My version is 4.1.0
Badshah93
07-09-2011, 05:14 PM
Installed but did not work. My version is 4.1.0
i haven't tested this in 4.1.0 but it should work i think.
did u added
{vb:raw sideblock_poll}
After
{vb:raw sidebar}
AND
Enable the mod and enter threadid where poll is posted in Settings -> Show Poll In Forum Sideblock
Aramist
07-09-2011, 07:48 PM
Same for me... 4.1.4..
I did all the steps bot does not show anything.. =/
Any clue?
Ty in advance
Badshah93
07-09-2011, 08:03 PM
Same for me... 4.1.4..
I did all the steps bot does not show anything.. =/
Any clue?
Ty in advance
have u made any sideblock for latest threads, or latest posts or custom html..
if not, then u need to create it to get these mod working.
Aramist
07-09-2011, 11:35 PM
I have block for custom html
thank you so much
Only a question:
the poll block appears at the end
Is it possible to move up in the sidebar?
Badshah93
07-10-2011, 07:08 AM
thank you so much
Only a question:
the poll block appears at the end
Is it possible to move up in the sidebar?
You can move the Poll at top by doing this:
Find:
{vb:raw sidebar}
ADD ABOVE IT
{vb:raw sideblock_poll}
OR
I will be releasing a new updated version soon which will be having all feature as other sideblock.
Ex:
Cache Time:
Displayorder
thank you for your help
I think this mod is very useful
bluered
07-10-2011, 11:04 AM
Thanks:)
tanerokutan
07-10-2011, 12:04 PM
i haven't tested this in 4.1.0 but it should work i think.
did u added
{vb:raw sideblock_poll}
After
{vb:raw sidebar}
AND
Enable the mod and enter threadid where poll is posted in Settings -> Show Poll In Forum Sideblock
Yes I did all of them but did not work :mad:
anyway, thank you . :)
Badshah93
07-10-2011, 12:58 PM
Yes I did all of them but did not work :mad:
anyway, thank you . :)
New Version (2.0) is now released which has little different coding then prev released. I would suggest you to try this.
reddyink
07-10-2011, 01:32 PM
excellent features added on 2.0 update. Author seem to be taking feedback seriously and providing timely updates.
Aramist
07-10-2011, 03:36 PM
I have no idea why.... but it doesnt work with "Everywhere Siderbar" Mod.
When i turn off "Everywhere Siderbar" it works fine.
Any Tip?
Ty
Lord. Dela
07-10-2011, 03:40 PM
Dont Work For me :(
VB 4.05
Badshah93
07-10-2011, 03:49 PM
I have no idea why.... but it doesnt work with "Everywhere Siderbar" Mod.
When i turn off "Everywhere Siderbar" it works fine.
Any Tip?
Ty
Open Plugin Manager in Admincp
Search For Poll For Forum Sideblock By Ayush
Below that you will see a Cache Templates plugin, click on edit
Replace All with
$cache = array_merge((array)$cache,array(
'sideblock_polloption',
'sideblock_polloptions_table',
'sideblock_polloption_multiple',
'sideblock_pollresult',
'sideblock_pollresults_table'));
$cache[] = 'block_sideblock_poll';
let me know if this works out as i am using sidebar for index page only.
Aramist
07-10-2011, 05:48 PM
No effects =/
It does not shows the poll block on the side bar...even in index.
=/
Badshah93
07-10-2011, 06:29 PM
No effects =/
It does not shows the poll block on the side bar...even in index.
=/
i don't use everywhere sideblock mod so for me there is default sideblock, which comes in index page only.
i will test this mod with everywhere sidebar mod and will try to find out the solution for it.
UPDATE:
HERE IS TRICK TO MAKE IT WORK WITH EVERYWHERE SIDEBAR MOD
Edit Poll For Forum Sideblock By Ayush in Forum Blocks Manager
find:
Template to Use
Change block_sideblock_poll to block_html
and save it...
Now Open Block_html template in style and manager
Paste the Following Code At Top
<style type="text/css">
.pollbar1,
.pollbar2,
.pollbar3,
.pollbar4,
.pollbar5,
.pollbar6 {
height:10px;
margin-top:1px;
}
.pollbar1 {
background:{vb:stylevar pollbar1_background};
}
.pollbar2 {
background:{vb:stylevar pollbar2_background};
}
.pollbar3 {
background:{vb:stylevar pollbar3_background};
}
.pollbar4 {
background:{vb:stylevar pollbar4_background};
}
.pollbar5 {
background:{vb:stylevar pollbar5_background};
}
.pollbar6 {
background:{vb:stylevar pollbar6_background};
}
#pollbarwrapper {
position: relative;
width: {vb:math {vb:stylevar pollbars_result_bit_width}+13};
display:block;
float: {vb:stylevar left};
clear: {vb:stylevar right};
}
#pollbarwrapper div {
float:{vb:stylevar left};
}
.percentvotes {
position: relative;
margin: -12px 0 0 0;
font-size:{vb:stylevar small_fontSize};
font-weight:bold;
}
.pollquestion {
font-size:12px;
}
.pollbuttons {
margin-top: 10px;
}
.pollres {
font-weight: bold;
font-size: 13px;
display: inline-block;
color: #B00;
}
.pollquestionmain {
font-weight: bold;
font-size: 13px;
display: inline-block;
color: #3E3E3E;
}
</style>
Aramist
07-10-2011, 08:46 PM
Nice !
Works fine now.!!
Ty for the mod and your support !:D
Dr.osamA
07-11-2011, 12:03 AM
thank you for update
keep it up man
You've made a great job with this update, thank you
Big-K
07-11-2011, 06:25 PM
Installed, and nominated. thanks
wildheart
07-13-2011, 03:05 PM
I love this mod but I am clearly doing something wrong.
I also have everywhere sideblock mod and I followed all your instructions on what to do, thanks.
I think I am misunderstanding this part:
2. Enable the mod and enter threadid or forumid for fetching the poll.
Do I only type in threadid? When I do and save it just goes back to 0?
What am I suppose to type there?
Sorry, I know it is a stupid question.
Badshah93
07-13-2011, 03:13 PM
I love this mod but I am clearly doing something wrong.
I also have everywhere sideblock mod and I followed all your instructions on what to do, thanks.
I think I am misunderstanding this part:
2. Enable the mod and enter threadid or forumid for fetching the poll.
Do I only type in threadid? When I do and save it just goes back to 0?
What am I suppose to type there?
Sorry, I know it is a stupid question.
You need to enter threadid if u want to fetch poll from particular poll..
if u want to fetch latest poll from a particular forum, then enter the forumid.
it goes back to zero, because you maybe typing threadtitle.
for ex:
http://x.com/x-forum/3463-x.html
3463 is a threadid
wildheart
07-13-2011, 03:14 PM
Ok so I did everything right. Is it suppose to go back to zero after I typed threadid and saved?
wildheart
07-13-2011, 03:17 PM
Wait a minute you mean the ID? I only learned that the forums actually had ID's a few hours ago. LOL. Sorry, I only started using vB on Saturday and I am Afrikaans spoken.
wildheart
07-13-2011, 03:22 PM
Ok but I have several different numbers (Id's) where a poll can be, how do I add more than one Id?
This is how my forum is setup so far: http://reptile-parrots.com/forums/forum.php
I started a poll just to test this and added that forum's id and it is still not working.
Badshah93
07-13-2011, 03:24 PM
Ok so I did everything right. Is it suppose to go back to zero after I typed threadid and saved?
it should not go to zero.
Wait a minute you mean the ID? I only learned that the forums actually had ID's a few hours ago. LOL. Sorry, I only started using vB on Saturday and I am Afrikaans spoken.
Ya every thread has id and which is unique. Just open any thread in ur forum which has poll and see for number in a url.
Badshah93
07-13-2011, 03:28 PM
Ok but I have several different numbers (Id's) where a poll can be, how do I add more than one Id?
This is how my forum is setup so far: http://reptile-parrots.com/forums/forum.php
I started a poll just to test this and added that forum's id and it is still not working.
For ex:
http://reptile-parrots.com/forums/showthread.php?42-Reptile-First-Aid-Emergancy-Kits
42 is a threadid. enter that in sidebar poll settings.
then see if that works.
If it doesn't work
then disable everywhere sidebar mod and then see if sidebar poll working.
wildheart
07-13-2011, 03:34 PM
That means I have to search my whole board for where a poll is, or how would I put more than one Id in the forum part?
I did what you said and my test poll is now showing but with the wrong wording? Is it showing right or is it suppose to show the actual poll question and options?
http://reptile-parrots.com/forums/forum.php
wildheart
07-13-2011, 03:36 PM
I see that the colour in my top stats has now gone to grey where it was white? Plus right at the top is now a forum bar in white that never used to be there and the part under it used to be white and is now grey?
Badshah93
07-13-2011, 03:55 PM
That means I have to search my whole board for where a poll is, or how would I put more than one Id in the forum part?
I did what you said and my test poll is now showing but with the wrong wording? Is it showing right or is it suppose to show the actual poll question and options?
http://reptile-parrots.com/forums/forum.php
1. you can enter the forumid if u want to fetch latest poll automatically. (only 1 forumid)
2. you must have done something wrong, thats why colour is changed.
3. You change sidebar Poll Title from Forum Sideblock manager
4. you can uninstall the mod if u don't like it :)
wildheart
07-13-2011, 04:16 PM
No, we are working to get it right, I really appreciate your help especially because I am still so much in the dark. Do you suggest I undo everything and try again?
cherylferraro
07-16-2011, 05:32 PM
Great mod thank you for sharing it. It works well with the thread id however when I try to use a forum id instead of the thread id loading the forum page generates the following error:
Database error in vBulletin 4.1.4:
Invalid SQL:
SELECT forum.forumid as forumidd, thread.threadid, thread.pollid, thread.forumid, thread.open, thread.lastpost FROM vb_forum
LEFT join vb_thread ON thread.forumid = forum.forumid where forum.forumid = 64 ORDER BY thread.pollid DESC LIMIT 1;
MySQL Error : Unknown column 'forum.forumid' in 'field list'
Error Number : 1054
Request Date : Saturday, July 16th 2011 @ 11:23:12 AM
Error Date : Saturday, July 16th 2011 @ 11:23:13 AM
Script : http://www.mysite.com/forum/
Referrer : http://www.mysite.com/forum/
IP Address : *
Username : me
Classname : vB_Database
MySQL Version : 5.1.56
Badshah93
07-17-2011, 04:19 AM
Great mod thank you for sharing it. It works well with the thread id however when I try to use a forum id instead of the thread id loading the forum page generates the following error:
Database error in vBulletin 4.1.4:
Invalid SQL:
SELECT forum.forumid as forumidd, thread.threadid, thread.pollid, thread.forumid, thread.open, thread.lastpost FROM vb_forum
LEFT join vb_thread ON thread.forumid = forum.forumid where forum.forumid = 64 ORDER BY thread.pollid DESC LIMIT 1;
MySQL Error : Unknown column 'forum.forumid' in 'field list'
Error Number : 1054
Request Date : Saturday, July 16th 2011 @ 11:23:12 AM
Error Date : Saturday, July 16th 2011 @ 11:23:13 AM
Script : http://www.mysite.com/forum/
Referrer : http://www.mysite.com/forum/
IP Address : 98.164.244.76
Username : me
Classname : vB_Database
MySQL Version : 5.1.56
try this xml
AttalaEA
07-18-2011, 05:51 PM
Thank you so much :)
AttalaEA
07-18-2011, 06:03 PM
How can I change poll title to anything else in the sideblock same vbulletin.
Badshah93
07-18-2011, 06:26 PM
How can I change poll title to anything else in the sideblock same vbulletin.
Edit this phrase
sideblock_poll_title
AttalaEA
07-18-2011, 06:31 PM
Edit this phrase
sideblock_poll_title
Thank You Sherif. This works great. :)
I'm having the same problem as the other person mentioned with the SQL error and using a ForumID. I tried your new XML, but the problem continues.
Badshah93
07-19-2011, 05:46 AM
I'm having the same problem as the other person mentioned with the SQL error and using a ForumID. I tried your new XML, but the problem continues.
uninstall the product and delete all poll sideblock forum block manager. then install this new xml.
i tested this mod on a forum with table prefix, its working fine there hopefully it will be for u also.
mjp1111
07-19-2011, 06:16 AM
Can I show a poll from multiple or all forums if I separate with a comma or do something else?
Badshah93
07-19-2011, 06:26 AM
Can I show a poll from multiple or all forums if I separate with a comma or do something else?
no.. i have not integrated that feature yet but will be doing later tonight. (as i got many request for it)
wildheart
07-19-2011, 11:21 AM
All my edit problems has been sorted and I reinstalled this mod! Works perfectly and I love the look of it.:up:
Thanks for your help. :D
Here is an example of what it looks like: http://reptile-parrots.com/forums/
Dennis Kaczor
07-19-2011, 06:57 PM
Been looking for something like this and installed OK.
My only problem is I have a dark skin and the tittle text is very dark looking, where can I edit that to make it lighter to read... Anyone point me in the right direction on this, and thanks in advance.
Dennis
cherylferraro
07-19-2011, 07:08 PM
try this xml
Thank you for the suggestion. I installed the xml file you provided but unfortunately when I switch the selection from thread id to forum id it generates this error:
Database error in vBulletin 4.1.4:
Invalid SQL:
SELECT forum.forumid as forumidd, thread.threadid, thread.pollid, thread.forumid, thread.open, thread.lastpost FROM vb_forum
LEFT join vb_thread ON thread.forumid = forum.forumid where forum.forumid = 64 ORDER BY thread.pollid DESC LIMIT 1;
MySQL Error : Unknown column 'forum.forumid' in 'field list'
Error Number : 1054
Request Date : Tuesday, July 19th 2011 @ 01:02:13 PM
Error Date : Tuesday, July 19th 2011 @ 01:02:14 PM
Script : http://www.mysite.com/forum/
Referrer : http://www.mysite.com/forum/index.php
IP Address : *
Username : me
Classname : vB_Database
MySQL Version : 5.1.56
Badshah93
07-20-2011, 03:10 AM
Thank you for the suggestion. I installed the xml file you provided but unfortunately when I switch the selection from thread id to forum id it generates this error:
Database error in vBulletin 4.1.4:
Invalid SQL:
SELECT forum.forumid as forumidd, thread.threadid, thread.pollid, thread.forumid, thread.open, thread.lastpost FROM vb_forum
LEFT join vb_thread ON thread.forumid = forum.forumid where forum.forumid = 64 ORDER BY thread.pollid DESC LIMIT 1;
MySQL Error : Unknown column 'forum.forumid' in 'field list'
Error Number : 1054
Request Date : Tuesday, July 19th 2011 @ 01:02:13 PM
Error Date : Tuesday, July 19th 2011 @ 01:02:14 PM
Script : http://www.mysite.com/forum/
Referrer : http://www.mysite.com/forum/index.php
IP Address : *
Username : me
Classname : vB_Database
MySQL Version : 5.1.56
please see this post
https://vborg.vbsupport.ru/showpost.php?p=2222317&postcount=49
Been looking for something like this and installed OK.
My only problem is I have a dark skin and the tittle text is very dark looking, where can I edit that to make it lighter to read... Anyone point me in the right direction on this, and thanks in advance.
Dennis
GO to edit templates -> Block Templates -> block_sideblock template
in that you can change the color by editing css.
Dennis Kaczor
07-20-2011, 01:30 PM
GO to edit templates -> Block Templates -> block_sideblock template
in that you can change the color by editing css.[/QUOTE]
I seen this in your code, but did not know where to find it, and thanks worked like a charm
VBUsers
07-22-2011, 11:57 PM
nothing is showing up for me
Badshah93
07-23-2011, 04:10 AM
nothing is showing up for me
Please read all the pages of this thread, i am sure you will find your answer.
netzwart
07-28-2011, 06:08 PM
This sounds like a cool MOD. I have two questions:
1. Is it possible to let the MOD choose the polls randomly ? In other words, the polls shown in the sidebar should change regularly without the need to define which poll should be shown in the admincp.
2. Is this MOD working with vB 4.0.8 ?
Thank you
Netzwart
Badshah93
07-28-2011, 06:49 PM
Version 2.1 Added.
New Feature -> user can enter multiple forumid's to fetch latest poll.
Bandit8007
07-30-2011, 08:00 AM
works fine on 4.14 and a great mod!
however i do have a feature request..
could be added on what usergroups it will show only?
or a selectable field for it?
for wish users it can view in sidebar?
think thats a great addon! :)
shrimpca
07-30-2011, 08:07 AM
Don't work for me T^T
I'm use Everywhere in sidebar
netzwart
07-30-2011, 10:38 AM
What I found out myself:
1. Is it possible to let the MOD choose the polls randomly ? In other words, the polls shown in the sidebar should change regularly without the need to define which poll should be shown in the admincp.
NO, it is not possible!
2. Is this MOD working with v4.0.8 ?
NO, the whole forum collapses as soon as this MOD is activated!
Unfortunately, none of the MODs I would use.... :(
Netzwart
Badshah93
07-30-2011, 11:07 AM
Don't work for me T^T
I'm use Everywhere in sidebar
Please see this post to find out ur answer
https://vborg.vbsupport.ru/showpost.php?p=2219039&postcount=26
Badshah93
07-30-2011, 11:13 AM
works fine on 4.14 and a great mod!
however i do have a feature request..
could be added on what usergroups it will show only?
or a selectable field for it?
for wish users it can view in sidebar?
think thats a great addon! :)
ya it can be done.
i will add in next version.
Bandit8007
07-30-2011, 01:06 PM
thank you Sherif :)
fevredsuk
08-07-2011, 10:32 PM
hi thanks for this mod, but I have a problem
using vb 4.13
the poll shows fine in the sidebar, but if a member votes in the poll in from the side bar, the vote isn't registered
votes are only registered if the go to the actaul thread and vote
which really defeats the object of having the poll in the side bar
Im using a public poll
Badshah93
08-08-2011, 03:55 AM
hi thanks for this mod, but I have a problem
using vb 4.13
the poll shows fine in the sidebar, but if a member votes in the poll in from the side bar, the vote isn't registered
votes are only registered if the go to the actaul thread and vote
which really defeats the object of having the poll in the side bar
Im using a public poll
when member votes in the poll, his votes are registered first and then he is redirected to showthread page.
You might be getting the problem of cache time.
Open Show Poll in forum block in Forum Block Manager
and Set Cache time -> to 0 (if it is something else)
David_R
08-08-2011, 10:21 AM
Sheriff,
Thanks for the Poll, My concerned Can i added in my menu bar of forums ?
SᴩiDᴇЯ
08-08-2011, 02:53 PM
WOW awesome Mod, I have nominated it for MOTM and installed it on vB4.1.4 works great first go, no problems at all, I would like to ask why the top tcat is missing and same for the bottom, i will show you what i mean:
look: http://screensnapr.com/v/uLUy5Y.png it looks nothing like the theme for my sidebar blogs, any way of fixing this?
Thank you in advance.
SᴩiDᴇЯ
Badshah93
08-08-2011, 03:17 PM
WOW awesome Mod, I have nominated it for MOTM and installed it on vB4.1.4 works great first go, no problems at all, I would like to ask why the top tcat is missing and same for the bottom, i will show you what i mean:
look: http://screensnapr.com/v/uLUy5Y.png it looks nothing like the theme for my sidebar blogs, any way of fixing this?
Thank you in advance.
SᴩiDᴇЯ
Your having custom skin and sidebar is also custom. Open block_htrml template and send me the contents of it by PM.
SᴩiDᴇЯ
08-08-2011, 04:09 PM
Sherif i cant PM you i must put it here, look what happens when i try to send you a PM: http://screensnapr.com/v/qZCrJE.png
XLCR GODFATHER
08-14-2011, 11:37 PM
Great MOD works fine. Is it possible to have it show more then 1 poll at a time in the side block similar to the poll widget in the CMS?
Snowman_175
09-06-2011, 06:01 PM
works fine when only one forum ID is selected. When more than one are selected it shows no polls...
any ideas?
gnagplank6
09-12-2011, 06:53 AM
Cool hack, Installed!!
hi thanks for this mod, but I have a problem
using vb 4.13
the poll shows fine in the sidebar, but if a member votes in the poll in from the side bar, the vote isn't registered
votes are only registered if the go to the actaul thread and vote
which really defeats the object of having the poll in the side bar
Im using a public poll
Did you ever find out whether your issue was the result of cache time?
inphoenix
10-05-2011, 12:33 AM
works fine when only one forum ID is selected. When more than one are selected it shows no polls...
any ideas?
Same thing here on 4.1.5. Would love to have this working for all forums.
Sam Lee
10-05-2011, 10:49 AM
installed but didnt work on V5.1.4
inphoenix
10-09-2011, 03:44 AM
This was working for 1 forum. I just installed Everywhere sidebar and this stopped working at all.
https://vborg.vbsupport.ru/showthread.php?t=233871
isurua
10-11-2011, 04:09 AM
Is it possible to have this as a CMS widget? (The default cms poll widget doesnt allow voting)
Badshah93
10-12-2011, 03:24 PM
Is it possible to have this as a CMS widget? (The default cms poll widget doesnt allow voting)
well i created for CMS also but final touch is yet to give. If i get free time, then i will release it here..
tkhalbiz
10-17-2011, 01:04 PM
Hello,
Im also waiting tour cms version im very interested,
Thanks
ZemantiX
10-20-2011, 11:07 AM
I'm also using Everywhere Sidebar and after following your instructions it worked like a charm. Great mod!
But, is it normal that admin (or the polls creator?) can't see the poll in the sidebar, other than the title, question and the edit button? When I log out and visit as guest I can see the poll results, also if I log in as a junior member, but not as admin.
Also, is it possible to set it so that members can vote directly in the sidebar (as in your screenshots)? I can't seem to find out how.
reversedesigns
11-15-2011, 07:18 PM
i can say this will not work on vbulletin 4.1.5 this product gave me a database error
betts02
01-13-2012, 05:44 PM
Any update on this ?
Bulbucan
02-05-2012, 02:59 PM
works on 4.1.10 g r e a t job !!! :) thats what i was looking for 4 months.
mjfan227
02-05-2012, 06:10 PM
I really would like to use this mod, but this is what shows up on my forum (4.1.10):
https://vborg.vbsupport.ru/external/2012/02/45.jpg
And these are my settings:
https://vborg.vbsupport.ru/external/2012/02/46.jpg
Is there something I'm missing or doing wrong? Please help. Thanks.
coloradomoms
02-17-2012, 03:16 PM
I have this installed along with Everywhere SideBar and followed the instructions on page 2 in this thread, but it is still not showing up. Any ides? my site is coloradomoms.com/forums and I have vb4.1.10 and your latest version as well as ESB Gold, latest version. Please advise.
coloradomoms
02-17-2012, 03:38 PM
Ignore the above question, got it to work finally. Thanks!
Winter Sonata
02-21-2012, 03:28 AM
Works great on 4.1.10 default theme!
It's an excellent mod, something I have been looking for since a very long time, thank you very much for that.
However I have a litte styling issue. I use this code to add an extra background graphic to the block titles:
#sidebar_container .block {
background: url("images/style/bg.png") top repeat-x;
} My sidebar poll block is now looking like on the image attached to this post (before voting).
I went through all the templates, the block code, the plugin. But I simply don't manage to find the code to remove this background graphic from inside of the block and from behind the poll question.
Do you have any idea how and where I can remove it? Thanks a lot!
Krusty1231
02-23-2012, 05:09 AM
Nifty....thanks.
KHALIK
02-24-2012, 09:03 PM
hi thanks for this mod, but I have a problem
using vb 4.13
the poll shows fine in the sidebar, but if a member votes in the poll in from the side bar, the vote isn't registered
votes are only registered if the go to the actaul thread and vote
which really defeats the object of having the poll in the side bar
Im using a public poll
Same problem, it is not a problem with the cache.
Uninstalled.
vb 4.1.15
nektar
03-13-2012, 07:47 AM
Not working with 4.1.11 when choosing to show poll from forum ids.
Nothing is shown.
sensimilla
04-05-2012, 10:24 AM
Not working with 4.1.11 when choosing to show poll from forum ids.
Nothing is shown.
Not true, works fine in 4.1.11
Nirjonadda
04-30-2012, 01:32 PM
Hide poll results not working?you can update with this mod hide work? Sakera's Hide Poll Results (https://vborg.vbsupport.ru/showthread.php?t=231976)
Paul.
05-12-2012, 02:38 AM
I downloaded and installed twice and mine remains as 2.0
I did allow overwrite and I also removed 2.0 and comes back as 2.0 and not 2.1
Badshah93
05-12-2012, 03:13 AM
I downloaded and installed twice and mine remains as 2.0
I did allow overwrite and I also removed 2.0 and comes back as 2.0 and not 2.1
looks like i forgot to change version number in xml file.
Leica.Robbiani
05-12-2012, 09:06 AM
Not true, works fine in 4.1.11
Works fine in Suite4.1.12, not working in Forum4.1.12.
L.R.
marccap
05-14-2012, 12:29 AM
Works fine in Suite4.1.12, not working in Forum4.1.12.
L.R.
Yep not working in forum block in 4.1.12
Badshah93
05-14-2012, 03:04 AM
Yep not working in forum block in 4.1.12
It works fine in 4.1.12 (forum and suite) also.
http://awesomescreenshot.com/0195jp275
after installing mod, run clear system cache under Maintenance.
marccap
05-14-2012, 08:15 AM
It works fine in 4.1.12 (forum and suite) also.
http://awesomescreenshot.com/0195jp275
after installing mod, run clear system cache under Maintenance.
I take that back then lol - It works fine on 4.1.12 as you say only when you clear the cache
Thanks :up:
Badshah93
05-14-2012, 10:03 AM
I take that back then lol - It works fine on 4.1.12 as you say only when you clear the cache
Thanks :up:
vbulletin by default clear caches once in a hour, so even if you don't clear cache and leave it alone, it would have started working after an hour time.
Chadi
05-24-2012, 10:36 PM
Hi there,
Thanks for the mod. Not working for me on 4.2.0
I installed the mod, cleared system cache, and enabled the mod.
It shows up strange though
My forum ID for polls is 21
http://www.talkjesus.com/polls/
http://www.talkjesus.com/xxxxxx/forum.php?do=edit&f=21
Is it just some incompatibility with 4.2.0?
When you move a thread, it appears to confuse this mod even if the thread has no poll. It looks like it thinks the moved thread redirect is a poll. If you remove the forum id where the redirect is, the mod starts working again. V4.1.12
Badshah93
05-25-2012, 03:53 PM
Hi there,
Thanks for the mod. Not working for me on 4.2.0
I installed the mod, cleared system cache, and enabled the mod.
It shows up strange though
My forum ID for polls is 21
http://www.talkjesus.com/polls/
http://www.talkjesus.com/xxxxxx/forum.php?do=edit&f=21
Is it just some incompatibility with 4.2.0?
it works fine with vb 4.2.0, checked few hours ago.
Chadi
05-25-2012, 04:01 PM
But that doesn't answer my question. I was asking about why it appears the way it does, inconsistent with the other block styles (head, borders, etc)
Badshah93
05-25-2012, 04:40 PM
But that doesn't answer my question. I was asking about why it appears the way it does, inconsistent with the other block styles (head, borders, etc)
your forum is inactive right now, so can't answer your question until i see that sideblock.
----------------------------------------------
i visited vbstyles.com to see that element skin (http://www.vbstyles.com/style.php?id=1) and i found that this skin is having a custom sideblock. (different from Default vB Sideblock)
So, you will need to edit "block_sideblock_poll" template to match poll sideblock with your forumskin.
mkkochan
05-25-2012, 07:05 PM
hw i can show on sideblock ?
Badshah93
05-26-2012, 02:48 AM
hw i can show on sideblock ?
1. Upload The New xml from Product manager in Admincp. (check overwrite if you are upgrading )
2. Enable the mod and enter threadid or forumid's for fetching the poll.
3. Run clear system cache under Maintenance
Chadi
05-26-2012, 05:48 AM
Your new xml just screwed up my entire forumhome. I uninstalled it and that didn't solve it!
I cleared system cache after install and after uninstall, tried two browsers.
What on earth is with the xml update???
edytwinky
05-26-2012, 05:54 AM
Installed on 4.2.
Entered one forum ID to test it out on and it brought up no polls. The result is blank
Badshah93
05-26-2012, 09:13 AM
Your new xml just screwed up my entire forumhome. I uninstalled it and that didn't solve it!
I cleared system cache after install and after uninstall, tried two browsers.
What on earth is with the xml update???
i just changed dependency version to 4.9.9 as without it you can't install this mod on vb 4.2.0 +
check vB default skin ? (is it also messed up)
Remove Poll Sideblock from Forum Block Manager, if by chance it is not removed after uninstalling the mod.
Badshah93
05-26-2012, 09:15 AM
Installed on 4.2.
Entered one forum ID to test it out on and it brought up no polls. The result is blank
Run clear system cache under Maintenance.
edytwinky
05-26-2012, 12:11 PM
Run clear system cache under Maintenance.
I did and it still comes up blank
Badshah93
05-26-2012, 12:54 PM
I did and it still comes up blank
ok.. do you have any poll inside that forum ?
and set threadid to '0'
edytwinky
05-26-2012, 12:56 PM
I have
Fetch Latest Poll From Forum: 56
Fetch Poll From Thread: 0
And I just created a poll in forum 56 to test.
edytwinky
05-26-2012, 09:03 PM
FYI I just tried out POLLID and that doesn't work.
I'm using the default theme for VB4 as well.
kevius
06-09-2012, 03:43 PM
problem with 4.2 : twice or more poll are displayed into the side bar !
Badshah93
06-10-2012, 02:59 AM
problem with 4.2 : twice or more poll are displayed into the side bar !
clear the cache or wait for few days will be releasing Ajax Poll SIdeblock.
dustoff99
06-10-2012, 11:16 AM
Getting double poll blocks as well. Looking forward to your Ajax Poll Sideblock.
Badshah93
06-10-2012, 11:18 AM
Getting double poll blocks as well. Looking forward to your Ajax Poll Sideblock.
in Forum Block Manager delete one pollblock.
dustoff99
06-10-2012, 11:23 AM
Awesome, that did it - thanks
edytwinky
06-13-2012, 08:05 PM
Anybody having problems getting this to work with 4.2?
My polls are coming up empty
edytwinky
06-13-2012, 08:30 PM
I just figured out the issue. I tried the poll block with each forum and it doesn't seem to work with particular forums. One forum has numerous polls in it and doesnt return a poll, just comes up blank, would this cause the issue?
kevius
06-14-2012, 11:26 AM
perfect now thanks !
chikuru
07-01-2012, 05:11 PM
i want to use this on a custom template and not on sidebar (template name: RightSidebar)..
how can i do this?
deverill2010
07-07-2012, 04:47 AM
Is this working ok on 4.2? I see a couple of people have had a few issues?
deverill2010
07-07-2012, 11:24 AM
I've installed this and I have the 'everywhere sidebar mod' installed - https://vborg.vbsupport.ru/showthread.php?t=233871
Your poll block is only showing on the activity stream and no where else for some reason?
deverill2010
07-08-2012, 11:54 AM
Bump Badshah93's can you answer my question please. I'd appreciate it.
Badshah93
07-08-2012, 12:27 PM
Bump Badshah93's can you answer my question please. I'd appreciate it.
You will need to edit one plugin of Everywhere Sidebar Mod.
Open Plugin "sidebar_global"
Find: (3 times)
$fullblockid = str_replace('sgdiscussions', 'sgnewdiscussions', $fullblockid);
Add After it:
$cccache = unserialize($block['configcache']);
if (strpos($cccache['html_template'], 'block_sideblock_poll') !== false)
{
$fullblockid = 'sidebar_poll';
}
I haven't tested it but i expect it to work.
deverill2010
07-08-2012, 12:42 PM
You will need to edit one plugin of Everywhere Sidebar Mod.
Open Plugin "sidebar_global"
Find: (3 times)
$fullblockid = str_replace('sgdiscussions', 'sgnewdiscussions', $fullblockid);
Add After it:
$cccache = unserialize($block['configcache']);
if (strpos($cccache['html_template'], 'block_sideblock_poll') !== false)
{
$fullblockid = 'sidebar_poll';
}
I haven't tested it but i expect it to work.
Unfortunately that doesn't work :(
Badshah93
07-08-2012, 01:23 PM
Unfortunately that doesn't work :(
Try this in place of previous code..
$cccache = unserialize($block['configcache']);
if (strpos($cccache['html_template'], 'block_sideblock_poll') !== false)
{
$fullblockid = 'sidebar_poll_1';
}
After doing this, upload attached xml.
deverill2010
07-08-2012, 02:03 PM
Ok now it's showing twice. do I need to remove the originaly product? Thanks by the way.
Badshah93
07-08-2012, 03:58 PM
Ok now it's showing twice. do I need to remove the originaly product? Thanks by the way.
remove one of the poll sideblock from block manager. (anyone)
deverill2010
07-08-2012, 04:43 PM
Ok I've done that. I removed one and am left with this one which is active -
Poll This mod will create Poll Sideblock.
but now no polls are showing? agh
Badshah93
07-09-2012, 03:08 AM
Ok I've done that. I removed one and am left with this one which is active -
Poll This mod will create Poll Sideblock.
but now no polls are showing? agh
remove all poll sideblock and reinstall the mod.
deverill2010
07-09-2012, 01:17 PM
It's working great now thanks!
LuisUrquilla
07-26-2012, 02:37 PM
Great little widget, just what I was looking for.
Kavada
08-09-2012, 01:02 AM
downloaded this looks great, but how do i move the poll to the top of my sideblock and how do i change the title of the widget to something other than "poll"?
deverill2010
08-13-2012, 04:55 AM
I'm having a issue with this, I'm not sure if it's because I'm using the every where side bar. However when on the main forum page, if I haven't voted in the poll, the poll box gets wrapped around all the other boxes.
deverill2010
08-20-2012, 08:22 AM
Hello? There are big style issues with this mod!
Mr GRiM
08-26-2012, 04:50 PM
thanks, nice mod :)
Vick98
09-10-2012, 02:14 PM
How can I change the font color of the question in the poll?
*Fixed
SNATCH3R
09-12-2012, 03:38 PM
installed and working like charm....
initiald
09-28-2012, 04:56 AM
Is it possible to have it randomly pick a poll from a forumid?
TPirate
10-05-2012, 02:14 AM
Works flawlessly!! Very nice and thx for this!! ;)
YOODA230
02-04-2013, 09:22 AM
4.2.3 WORKING
Impromptu
02-17-2013, 01:43 AM
Works fine for me 4.2
- Is there a way it can show the last x number of polls? (such as last 3 polls rather than 1?)
- Is there a way I can show showthread.php?t=203 to thread/203-title (which I've used re-direct via .htaccess?
Great mod! Marked as Installed and MOTM rated 5 stars
Jpolola
03-20-2013, 09:25 AM
I installed it at 4.2 PL3 but nothing happened. it display nothing.
rhody401
03-21-2013, 03:06 PM
This is fantastic. :up::up::up:
However, it seems to show the results before they vote. Is that intentional?
Thanks
thang28101993
04-15-2013, 05:37 AM
I installed Mod and it is working well, but I have a small issue with template before vote, as this image:
https://vborg.vbsupport.ru/external/2014/04/20.jpg
And after Vote thread, that issue not appear:
https://vborg.vbsupport.ru/external/2014/04/21.jpg
So how I can make for the poll before vote is not wrong and clear as after vote:
Excuse me, I'm a new fan of Vbb, and I have to learn more! So, please help me to solve that problem! Thanks in advanced.
I use Vbb 4.2.0 Pl3
Impromptu
06-12-2013, 11:54 AM
I have
Fetch Latest Poll From Forum: 56
Fetch Poll From Thread: 0
And I just created a poll in forum 56 to test.
Anybody having problems getting this to work with 4.2?
My polls are coming up empty
I just figured out the issue. I tried the poll block with each forum and it doesn't seem to work with particular forums. One forum has numerous polls in it and doesnt return a poll, just comes up blank, would this cause the issue?
Is this working ok on 4.2? I see a couple of people have had a few issues?
Using 4.2.
Been using it for a while and it works for a selected forumid in my case it's id4. The reason is because it's my website I initially had polls only for my threads. However, over the last 6 months, I've noticed that other members are creating posts with legitimate polls thus I've decided to show the poll results on forumid2...unfortunately it goes blank when I show forumid2 and yes there are a lot of polls in forumid2..
strangely when I have 2,4 (ie comma) it shows a blank...like edytwinky..any issue? in the worst case scenario ill just show poll results from my threads (forumid4) but would love it to show forumid2 (ie general members)
thanks
aboayoy
08-06-2013, 09:34 AM
how can generate poll show as html cod to put it on external html page ?
Bob_R
10-31-2013, 04:06 PM
So, this will just display the latest poll in a specified forum or thread until a new poll is created?
Is there or can there a cron job to run it whenever one wishes?
john7911
11-01-2013, 03:55 PM
Edit this phrase
sideblock_poll_title
How can I edit this phrase?
Thank you ;)
albibak
11-01-2013, 04:26 PM
How can I edit this phrase?
Thank you ;)
AdminCP -> Languages & Phrases -> Phrase Manager
And search the varname "sideblock_poll_title" in GLOBAL
john7911
11-01-2013, 04:53 PM
Thank you albibak :)
Bob_R
11-02-2013, 07:32 PM
So, this will just display the latest poll in a specified forum or thread until a new poll is created?
Is there or can there a cron job to run it whenever one wishes?
Anyone? Please. :)
Impromptu
12-24-2013, 11:26 AM
Using 4.2.
Been using it for a while and it works for a selected forumid in my case it's id4. The reason is because it's my website I initially had polls only for my threads. However, over the last 6 months, I've noticed that other members are creating posts with legitimate polls thus I've decided to show the poll results on forumid2...unfortunately it goes blank when I show forumid2 and yes there are a lot of polls in forumid2..
strangely when I have 2,4 (ie comma) it shows a blank...like edytwinky..any issue? in the worst case scenario ill just show poll results from my threads (forumid4) but would love it to show forumid2 (ie general members)
thanks
uninstall
ru55ian
01-03-2014, 06:23 PM
Using 4.2.
Been using it for a while and it works for a selected forumid in my case it's id4. The reason is because it's my website I initially had polls only for my threads. However, over the last 6 months, I've noticed that other members are creating posts with legitimate polls thus I've decided to show the poll results on forumid2...unfortunately it goes blank when I show forumid2 and yes there are a lot of polls in forumid2..
strangely when I have 2,4 (ie comma) it shows a blank...like edytwinky..any issue? in the worst case scenario ill just show poll results from my threads (forumid4) but would love it to show forumid2 (ie general members)
thanks
Have been having same issues with 4.2.2
Only can use 1 forum at the time in settings, if use more than 1 forum, comes out blank.
Paul.
03-08-2014, 05:15 PM
Is it possible for more than one poll to be displayed in the side block, or in other separate blocks?
4.2.2
MaLTRaiN
03-13-2014, 12:04 AM
Is it possible for more than one poll to be displayed in the side block, or in other separate blocks?
4.2.2
I need the same option!!!
:up:
Bob_R
04-16-2014, 04:05 PM
Can anyone help with this alignment issue? (see screenshot)
Thanks. :)
Bob_R
04-23-2014, 04:50 AM
I installed Mod and it is working well, but I have a small issue with template before vote, as this image:
https://vborg.vbsupport.ru/external/2014/04/20.jpg
And after Vote thread, that issue not appear:
https://vborg.vbsupport.ru/external/2014/04/21.jpg
So how I can make for the poll before vote is not wrong and clear as after vote:
Excuse me, I'm a new fan of Vbb, and I have to learn more! So, please help me to solve that problem! Thanks in advanced.
I use Vbb 4.2.0 Pl3
Can anyone help with this alignment issue? (see screenshot)
Thanks. :)
Post #164 the one right above this one????
Morrus
04-24-2014, 02:27 PM
Using 4.2.
Been using it for a while and it works for a selected forumid in my case it's id4. The reason is because it's my website I initially had polls only for my threads. However, over the last 6 months, I've noticed that other members are creating posts with legitimate polls thus I've decided to show the poll results on forumid2...unfortunately it goes blank when I show forumid2 and yes there are a lot of polls in forumid2..
strangely when I have 2,4 (ie comma) it shows a blank...like edytwinky..any issue? in the worst case scenario ill just show poll results from my threads (forumid4) but would love it to show forumid2 (ie general members)
thanks
Same problem. I see you asked this back in June 2013, and it's April 2014 now, I assume that's not getting fixed.
GPOClan
05-09-2014, 05:55 PM
I want the sideblock to be only visible to members, what do I have to do?
Thanks for your help.
Best regards,
Fields
Bob_R
05-14-2014, 01:24 PM
Is there an answer in our future?
thang28101993, Impromptu, and Morrus needs answers as well!!!!
nope... not working even if I put one forum ID :( works only with thread IDs :(
fxdigi-cash
09-10-2014, 02:34 AM
ok, spent few minutes on this and just noticed that the PHP code in the mod doesn't get filled up when installed to the vb board. when you go to your sideblock in the forum blocks manager, you can edit the poll block and find no PHP code; it is empty. That's why it won't work. I grabed the code from the xml file so anyone can use it. place it in the PHP code area in the sideblock for poll and save it. it works fine.
global $vbulletin, $vbphrase, $db;
if ($vbulletin->options['poll_on_sideblock_vb4']) {
if (!empty($vbulletin->options['poll_on_sideblock_vb4_thread'])) {
$getthread = $db->query_first("SELECT threadid, pollid, forumid, open, lastpost FROM ".TABLE_PREFIX."thread where threadid = ".$vbulletin->options['poll_on_sideblock_vb4_thread']."");
}
elseif (!empty($vbulletin->options['poll_on_sideblock_vb4_forum'])) {
$getthread = $db->query_first("SELECT forum.forumid, thread.threadid, thread.pollid, thread.forumid, thread.open, thread.lastpost FROM ".TABLE_PREFIX."forum as forum
LEFT join ".TABLE_PREFIX."thread as thread ON thread.forumid = forum.forumid where forum.forumid IN (".$vbulletin->options['poll_on_sideblock_vb4_forum'].") ORDER BY thread.pollid DESC LIMIT 1");
}
$poll = '';
if ($getthread['pollid'])
{
$pollbits = '';
$counter = 1;
$pollid = $getthread['pollid'];
$show['editpoll'] = iif(can_moderate($getthread['forumid'], 'caneditpoll'), true, false);
// get poll info
$pollinfo = $db->query_first_slave("
SELECT *
FROM " . TABLE_PREFIX . "poll
WHERE pollid = $pollid
");
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$pollinfo['question'] = $bbcode_parser->parse(unhtmlspecialchars($pollinfo['question']), $getthread['forumid'], true);
$splitoptions = explode('|||', $pollinfo['options']);
$splitoptions = array_map('rtrim', $splitoptions);
$splitvotes = explode('|||', $pollinfo['votes']);
$showresults = 0;
$uservoted = 0;
$forumperms = fetch_permissions($getthread['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canvote']))
{
$nopermission = 1;
}
if (!$pollinfo['active'] OR !$getthread['open'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0) OR $nopermission)
{
//thread/poll is closed, ie show results no matter what
$showresults = 1;
}
else
{
//get userid, check if user already voted
$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
if ($voted)
{
$uservoted = 1;
}
}
if ($pollinfo['timeout'] AND !$showresults)
{
$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
$show['pollenddate'] = true;
}
else
{
$show['pollenddate'] = false;
}
foreach ($splitvotes AS $index => $value)
{
$pollinfo['numbervotes'] += $value;
}
if ($vbulletin->userinfo['userid'] > 0)
{
$pollvotes = $db->query_read_slave("
SELECT voteoption
FROM " . TABLE_PREFIX . "pollvote
WHERE userid = " . $vbulletin->userinfo['userid'] . " AND pollid = $pollid
");
if ($db->num_rows($pollvotes) > 0)
{
$uservoted = 1;
}
}
if ($showresults OR $uservoted)
{
if ($uservoted)
{
$uservote = array();
while ($pollvote = $db->fetch_array($pollvotes))
{
$uservote["$pollvote[voteoption]"] = 1;
}
}
}
$left = vB_Template_Runtime::fetchStyleVar('left');
$right = vB_Template_Runtime::fetchStyleVar('right');
$option['open'] = $left[0];
$option['close'] = $right[0];
foreach ($splitvotes AS $index => $value)
{
$arrayindex = $index + 1;
$option['uservote'] = iif($uservote["$arrayindex"], true, false);
$option['question'] = $bbcode_parser->parse($splitoptions["$index"], $getthread['forumid'], true);
// public link
if ($pollinfo['public'] AND $value)
{
$option['votes'] = '<a href="' . fetch_seo_url('poll', $pollinfo, array('do' => 'showresults')) .
'">' . vb_number_format($value) . '</a>';
}
else
{
$option['votes'] = vb_number_format($value); //get the vote count for the option
}
$option['number'] = $counter; //number of the option
//Now we check if the user has voted or not
if ($showresults OR $uservoted)
{ // user did vote or poll is closed
if ($value <= 0)
{
$option['percentraw'] = 0;
}
else if ($pollinfo['multiple'])
{
$option['percentraw'] = ($value < $pollinfo['voters']) ? $value / $pollinfo['voters'] * 100 : 100;
}
else
{
$option['percentraw'] = ($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100;
}
$option['percent'] = vb_number_format($option['percentraw'], 2);
$option['graphicnumber'] = $option['number'] % 6 + 1;
$option['barnumber'] = round($option['percent']) * 2;
$option['remainder'] = 201 - $option['barnumber'];
// Phrase parts below
if ($nopermission)
{
$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
}
else if ($showresults)
{
$pollstatus = $vbphrase['this_poll_is_closed'];
}
else if ($uservoted)
{
$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
}
$templater = vB_Template::create('sideblock_pollresult');
$templater->register('names', $names);
$templater->register('option', $option);
$pollbits .= $templater->render();
}
else
{
if ($pollinfo['multiple'])
{
$templater = vB_Template::create('sideblock_polloption_multiple ');
$templater->register('option', $option);
$pollbits .= $templater->render();
}
else
{
$templater = vB_Template::create('sideblock_polloption');
$templater->register('option', $option);
$pollbits .= $templater->render();
}
}
$counter++;
}
if ($pollinfo['multiple'])
{
$pollinfo['numbervotes'] = $pollinfo['voters'];
$show['multiple'] = true;
}
if ($pollinfo['public'])
{
$show['publicwarning'] = true;
}
else
{
$show['publicwarning'] = false;
}
$displayed_dateline = $getthread['lastpost'];
$pollinfo['threadid'] = $getthread['threadid'];
if ($showresults OR $uservoted)
{
$templater = vB_Template::create('sideblock_pollresults_table') ;
$templater->register('pollbits', $pollbits);
$templater->register('pollenddate', $pollenddate);
$templater->register('pollendtime', $pollendtime);
$templater->register('pollinfo', $pollinfo);
$templater->register('show', $show);
$templater->register('pollstatus', $pollstatus);
$poll = $templater->render();
}
else
{
$templater = vB_Template::create('sideblock_polloptions_table') ;
$templater->register('pollbits', $pollbits);
$templater->register('pollenddate', $pollenddate);
$templater->register('pollendtime', $pollendtime);
$templater->register('show', $show);
$templater->register('pollinfo', $pollinfo);
$poll = $templater->render();
}
return $poll;
}
}
else {
}
Mohammad Kamal
04-03-2017, 05:27 AM
How can I show more than one poll?
oldfan
04-08-2023, 12:02 AM
dont work 4.2.5. php 7.2
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.