instructions updated to 1.9, just a small syntactic update for UBB pb 2.1
Same as my ubb integrated polls for 6.0x. Code cleanup for 6.1.x including functionality for displaying public or login name on comments.
big thanks to Tech-Ni-Kal for wordletizing it, doing XHTML (with a lot of help from Gamer
Features:
Full CP interface to control who can post polls, where they can be posted, and what names to display on comments. Ability for admins (and mods of the forum where poll is posted) to edit polls, close polls (no further voting) and keep poll results hidden (while still allowing voting). Nicely integrated poll creation page. Templates for all publicly displayed HTML. XHTML compliant Wordletized Etc, Etc. ) - http://www.nl-forums.co.uk/ubb/multihack/ubbpolls.mhp
So far all is working well!! One suggestion, if you want me to I could document it, but I think there should be an option in style templates to change the bar gif and such. If you would like any help creating it I would be glad to save you the time.
Question: When creating a new topic with a poll, where do you put the options for each option for the poll? Because whenever I click create Poll and put 3 options. I get this:
You did not fill out all options. » Please use your browser's back button to return.
well if you create a poll with 3 options(by putting a 3 in the box on the new topic page), you will need to fill in all three of the options and the question on the subsequent page. ill add the bar gifs to the style templates sometime (i have it all doc'd up cause i did the same type of thing in sticky threads, so it wont be a problem).
so the sequence for posting a poll is: 1) click new topic button 2) fill in topic subject and message like normal, click the checkbox next to Add Poll, enter a number of options and click the submit button (Add Topic button). 3) fill in poll question and options (all must be filled in), and click submit - your post and your poll will then both be made.
by "controlling where you can post" does this mean that you can control what forums you are allowed to post a poll in? that's the kind of control i'm dying to see
like allen said play nice. i thought you just checked over the XHTML gamer, didnt know you helped, so thank you for doing what you did . heh, and if my html was sloppy, dont blame me, its the exact format of Ubb templates html...
youll want to rehack everything, and reupload everything. sorry, but because of wordlets being added it needs to be completely reinstalled to go from 1.7-1.8
/homepages/38/d19856222/htdocs/planetboards/cgi-bin/ubb-cgi/ubb_poll_lib.cgi: syntax error at /homepages/38/d19856222/htdocs/planetboards/cgi-bin/ubb-cgi/ubb_poll_lib.cgi line 157, near "@voters = split(/" syntax error at /homepages/38/d19856222/htdocs/planetboards/cgi-bin/ubb-cgi/ubb_poll_lib.cgi line 166, near "hoice"
(called by /homepages/38/d19856222/htdocs/planetboards/cgi-bin/ubb-cgi/ultimatebb.cgi, 602)
Please inform the board administration of this error so that they may fix the problem. Thank you!
the syntax error there disappears however several other errors now pop up:
An error has occured:
/home/iambornagainru/cgi-bin/ubb/ubb_poll_lib.cgi: syntax error at /home/iambornagainru/cgi-bin/ubb/ubb_poll_lib.cgi line 215, near "if ($permission eq 'private') { $exact_path .= "/private" In string, @this_topic now must be written as @this_topic at /home/iambornagainru/cgi-bin/ubb/ubb_poll_lib.cgi line 215, near "; }
# grab topic @this_topic" syntax error at /home/iambornagainru/cgi-bin/ubb/ubb_poll_lib.cgi line 223, near "poll"); " syntax error at /home/iambornagainru/cgi-bin/ubb/ubb_poll_lib.cgi line 246, near "}"
(called by /home/iambornagainru/cgi-bin/ubb/ultimatebb.cgi, 519)
soooooooo I don't know if that was the syntax error or if I am just creating other errors by changing the placement of the !
Stang5_0 - if you mean that when you go to the Poll CP it comes up blank, then you need to make sure cp_vars_poll.pl is uploaded to the Templates directory in ASCII mode. if you mean that the main Control Panel Page is coming up blank, then check that everything was added correctly in cp.cgi and also in cp_common.pl.
ok thanks Allen, instructions in zip updated. now as for the other problems, this is a weird one. when i originally moved the poll options page to a page after the post a new topic page, i was getting the same error. i was reproducing all the %in values from the previous (post topic) form as hiddens, but for some reason it only would look at the first 3 of them, then ignore the rest. i fixed it by hard coding the forum (f) hidden as the first one then putting all the rest. now i dont know why its popping up again, cause it works perfect on my test board. so as soon as i can figure out how to replicate it again ill get it fixed. or if you have any ideas of course. take a look for yourself, you can search for $post_data_from_in in ubb_poll_lib.cgi and public_new_poll_form.pl:/
ok i dont know whats up but i totally cant replicate this problem. ive checked and rechecked and im 99.9% sure i have the same files as in the zip (i just upped them from the zip in fact). so im not sure. if someone who is having this problem would like to try something for me that i think will fix it, pm me, i cant be sure though as im not actually having the problem
A couple of small bugfixes. I was having problems with the option text being really really tiny, as well as the view results and edit poll links. This fixes that problem.
Another thing, you don't have to &set_page_elements in ubb_poll_lib.cgi and public_poll_page.pl, otherwise there will be 3 in the topic (like "UBBDev.com: : : Windows or Mac?")
Fix: In ultimatebb.cgi:[code][/code] Also, ubb_poll_lib.cgi should censorcheck/checkhtml the subject, and censor/html/Graemlin/UBBCode check the poll options. Can I post an updated ubb_poll_lib.cgi?
Hey jordo, is there anyway to do an anonymous poll? Or atleast make it so that, if desired on a certain poll, you wouldn't be able to see the results without looking at the data files directly? One of our webmasters asked about this, so I thought I'd ask you.
package 'vars' not registered for warnings at Modules/AutoLoader.pm line 4
Please inform the board administration of this error so that they may fix the problem. Thank you!
Ideas?
Ok, now it has gotten worse, I did in fact back up my files.....Restored them till I got an answer on the above, and I am still getting the same error.... Do you suppose this is server side?
LK - thanks for the tips, a few things got missed in the upgrade to 6.1.0 and wordletizing. ill sit down later today and fix em and a few other things ive been meaning to fix.
afterlab - only admins and mods (of that forum) can edit the polls. the poll starter cant (because you can change # of votes).
would it be possible for me to add a poll button beside the new reply button, and then make a new template file just for the poll? Would it require much work?
Bookie - it would require a number of modifications in addition to the template. its set up to be integrated with normal posting routines. its not impossible or anything, just might take a little work. and to enable polls in whichever forums you want go into your CP and under primary settings, there is a Poll Settings option. from there you can set what forums allow polls, etc.
zips updated with some fixes. smilies are now allowed in poll titles (not in options though). and checks for html as well as query method are done. i also cleaned up the code in the poll_lib and got everything in that file wordletized.
to upgrade, simply reupload vars_wordlets_polls.cgi, and ubb_poll_lib.cgi, then rehack ultimatebb.cgi.
Another question Jordo. Is it possible to have the last post time updated when a vote is made instead of just when comments are made? It could be easy to lose a poll in a high-traffic forum even if it's getting votes, if noone is making comments.
TedBrown - does that only happen when you try to delete a thread with a poll, or when you try to delete any thread? if only threads with polls, try removing the one thing this hack adds to ubb_topic_maint.cgi and see if it still gives that error.
Maybe it was posted/fixed before, but there is a bug with quotes in posts:
Fix in ubb_poll_lib.cgi:
Code
code:
I'm using the first beta because of many changes (like to use member numbers instead of names in topic.poll, check for many things, etc), but I don't think it's fixed also in the current one.
[edit: replaced " with " so you can see it. it automatically translates it to " otherwise]
Newbie here...encountered an error while installing.
-------
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
------
Hi can anyone highlight which part of the steps in installation that i have done wrongly and resulted in this error?
I hacked everything, twice, and a poll button is NOT showing up. Also, under my STYLES option in CP, there isn't a place for the to set the Poll button, unless it's there and I just don't see it.
Also, everything is working right (no errors or anything), I'm just not seeing a poll button or a place to set it! Someone help? LoL, so very very weird...
V00D00 - he means that this is not the hack that adds a second button. to post a poll, (make sure you have set the forum you wish to post in to on in the poll options CP) go to post a new topic as normal, and you will see a checkbox at the bottom, checking that and putting a number in the poll options box will let you post a poll. write your topic as normal, check the poll box, put a number of options in the box, then submit, and it will let you set the poll topic and options.
Ok.. Here's a situation I didn't see anyone mention in the six pages I just read.
My cp.cgi is working fine.. apprently.. and I can see the poll check box under the "Post new topic" I did have to add a
after the line to get it move the signature question to the next line.
Here's the problem: When I add a title, message, check the poll box, and put a number in the poll options and click on "Add new topic" I get a white screen.. nothing else.. nada zippy.. if I leave any of the options off it says I missed something so that's working.. I'm just lost as to what file I might have f'd up.. or what's going on??
Can someone help me? Aceman Admin Scifi-meshes.com
Jordo Thanks again on you speedy responce. I did as you told me and it worked fine.. but a new situation has arisen. After I fill out the poll information, it accepts the thread.. then posts it.. but when you view it there is no poll? just the title and orginal message?
Just wanted to let ya know I got it working.. I'd apprently uploaded 1 file to the wrong location I thought I was uploading to the proper location but I wasn't sorry. Thanks again. And nice work on the hack.
Does anyone really use this hack all that much? I think it's cool. What I want to do is have a sidebar panel like here on UBBDev and have a poll system that would allow people to click on a selection in the sidebar. It would then re-generate and give the current statistics in %'s per answer. Anyone know if this is currently possible?
It's not. I just took out the Beta Release info. I did that because I'm sIck of waiting for the final to be released so I can install hacks. So I installed them and vut out Beta Release 1.4 Now, I'm just going to wait until 6.2 is releeased, which will allegedly have all the "hacks" I wanted to add.
Just wanted to say that this hack interferes with ubb version 6.1 beta 2.1 You will not be able to post a new topic while logged in. The problem lies in the coding in public_new_topic_form.pl I believe. I tested this and narrowed down as this was the only hack that replaced any variables there.
Easy fix until this problem is fixed. Turning off all polls via control panel will allow people to post. Unless of course you want to uncode everything which you can do.
its working 100% on version 2.1 for me... i did change one thing in cp.cgi, but it wouldnt have caused such a problem. try rehacking becuase ive updated the instructions because some of the places to insert code have changed (like upper to lower case type stuff ).
fyi this hack is not compatable with the PHP ubb accelerator.
Hate to tell you but your hack is causing this problem. I even tried upgrading to 1.9 from 1.8. I have coded exactly as stated. I have had your poll hacks for sometime. If I turn polls off in every forum members can post new topics!!! If not here is the error recieved.
The form you submitted appears to be incomplete! You did not complete: your_name
» Please use your browser's back button to return.
This only happens when your logged in. Maybe your hack is having a problem with another hack? I have who's online,chat,calendar and the poll hack. Thats it!! I narrowed it down by coding each hack and testing. When I installed yours it did it again. I have tested and coded many times and the problem is the same!! I know the first response is always recode but I have done this and the problem still exists and does not go away. I have tested this with the PHP off.
BTW when is this going to be PHP accelerator compatable
I have tried that already. Like I said I only have 4 hacks installed. I have reinstalled the entire hack many times looking for any error.
Just a side note to help track down the error. A user can not post if I turn polls on. As I stated this before it comes up with incoomplete form your_name missing
also when you go to edit a poll ( I am an admin ) it says you are not logged in
It seems your hack is having a little problem finding names?
Hey Jordo please reread my comments above. I redid this many times. Uploading new forms rehacking. UBB 2.1 worked great. Only when I turn on poll options in control panel does the problem exist. so therefore by process of elimination it is your hack. I will repost the exact errors here so maybe some of the experienced hackers could help.
Okay it recognizes me as admin I guess cause wordlets for edit poll are on the poll. I click to edit the polls I already have and it says I am not logged in. I am oh course logged in. here is the exact error
Quote
quote:
When I try and post a topic ( does not even have to be a poll just a topic ) it gives the error that I did not complete form your_name
the thing is this. with this hack if you post a topic that isnt a poll, well then it goes through the normal posting routines, there are no changes to the posting form, etc. so your_name will be submitted just the same as if polls were turned off or not installed. the second thing is no matter what i do i cant reproduce this error. this is on a board with no other hacks... so maybe there is a leftover from removing a hack, or a mistake in adding code somewhere.
There is no leftover hack?? This is brand new 2.1. I stated what hacks I have installed. whos online stars calendar poll
The fact remains that if I turn off polls in each forum you can post. If I turn polls on you cant. This by default goes against everything you are saying? You hack has to be interfering? What more do you want me to say I am not dreaming this problem. Does anyone have any problems as there can be no left over hacks.
I have done everything you suggested and I have the same error.
Jordo here is an update.
I set up a test board and only installed this hack with who's online. this is the error recieved?
You are not logged in. You must be logged in (and registered) to perform this function. Login
» Please use your browser's back button to return.
So it seems consistent even with the other hacks I have installed. YOUR HACK SEEMS TO ME IS HAVING A PROBLEM RECOGNISING LOGINS?
register a name and check out what I am talking about there are no other hacks involved here.
If it helps, if you logout, then go to post new topic, so that you have to login during the post, it works fine. It's only when you are already logged in that there is a problem. You might want to setup a clean test board rather than a copy of your other board for a better test.
It was a clean setup?? I simply used the vars files!!! and styles. All the cgi and pl files are new.
This problem exists and I am not dreaming it. I have coded this hack many times and there is an error as you can see. The only hack installed on this test board is who's online. I dont see how cleaner of an install you can get that unpacking an infopop file and hacking UBB POLL into it. Vars files would not make any difference. The coding is all in CGI and PL files. The UBB POLL files are all the new ones.
I am having a little problem understanding that noone else can duplicate this problem when I am following the same instructions as everyone else on a clean board.
I was just talking about how it looked like you copied over your forums and threads, unless there are people using that forum for non-test purposes.
As for recreating the problem, I haven't tried this on 2.1 yet so I have no idea if it's reproducable. I will probably be putting 2.1 on a server tomorrow and polls will be one of the first things I put in. If I have any problems I'll be sure to post here to try to help clear it up.
Well I'm going to have to back the guy with the problem up as I just downloaded the hack and after an hour of installing it (carefully) - JESUS it's big =), I got a similar problem.
Oh and I also noticed a cosmetic glitch that's new to PB2.1, in fact this whole problem is only around in the PB 2 / 2.1.
Anyhoooo, after installing, setting the poll options in the CP and clearing cache I went into my test board:
Now when you post anywhere in the forum (all enabled for polls), select polls and click 'Add New Topic' then all it does is goes to a blank screen with the above forum URL. Nothing gets posted.
Disable polls and you can post again, enable them and you can't.
I also noticed a cosmetic glict, after the poll line and two files (radio and box):
Poll: Check to Create a Poll With Topic Number of Poll Options:
The 'Email Notification: emails sent to you whenever someone replies.' line starts directly after instead of having a line break.
I also found that two files, public_edit_poll.pl and vars_wordlets_polls.cgi aren't even mentioned in the .txt install file. I uploaded them reguardless.
Following all that I went through the install step-by-step and nothing has solved the problem, so there is an issue or two here that seems to have arrisen in PB2.
Note, I have the following hacks installed (all latest versions as of the last day or so):
Who's Online Mods Wordlets Stats Hack UBBNews Latest Threads (v1.1) Authority List ICQ & Aim Last Reply By Moderator Log Signature Fix Print Page
Please fix this since it's not an issue on my 6.04e board (v1.7 or 1.8 UBB Int Poll) and that has twice as much installed. I'd like to upgrade but I can't till this is fixed as it's an important element.
Thanks I invited jordo to my test board which no one uses. I only have who's online installed and get this problem with the poll. Seems jordo has stated the cookie routines and the poll are conficting and producing this error.
END RESULT WHOS ONLINE AND POLL ARE CONFLICTING. JORDO DOES NOT HAVE THIS PROBLEM AS HE HAS NO WHOS ONLINE INSTALLED
He is going to install whos online and hopefully we should have a fix.
You were right =), I'd confess to being an idiot if it wasn't for the fact that Jordo also left the file you mention out of the upload instructions - that's the third one then hehe.
However having done that it now goes through to the poll form, yet after I put even a simple question it returns with the following:
Quote
quote:
Name? What name, my display name is 'Mark Jackson' and the login is a simple word.
I think jordo is heads on the problem your fix did not work. it involves the way whos online changes cookies. UBBPOLL works without whos online and does not when its installed.
LOL Well glad to hear but as I am the only person here stating this hack does not work correctly I tried your snipet of code as you have been of help before on solving various voding issues.
You did after all just make the Stats hack PHP compliant
Okay Jordo you are half way there. You can now post a topic only if you post a poll along with it. If you only want to post you still have the problem if polls are enabled in the forum.
You were only somewhat successful in recreating the problem? How so?
Anyway as a admin you still cant edit the poll? You cant close it etc.
Can't speak for the other guy, but it's working fine for me now, no more weird 'NAME' errors when trying to post. Both posting with and without polls works, as does the ability to edit them.
On another note, in your instructions you neglect to add a break to the ubb_new_topic.cgi code right at the end. Thus the line merges with the next 'Sugnature' option under MS IE browsers.
In other words, the first code you have to add into the above file and right at the bottom needs to be more like this:
$vars_wordlets_polls{ipolls_num_options}: ;
Note the
, or just use , the format still isn't perfect, but it's better.
I've got a small problem.... I realize that you cant change the bar images that come with the poll in the style templates but, when I try and update my style templates it tells me that the poll fields (gif images middle/left/right) are required and weren't filled out?
Yes you can simply put it down the bottom bar.gif for the middle poll bar-l.gif for the left poll and bar-r.gif for the right poll. Your style template will update fine. Your bar.gif's should have been copied to your noncgi directory per the instructions.
omegatron - you need to hack the line in public_new_topic_form.pl where it says something like: make sure this section in ultimatebb.cgi is in there correctly:
I am not sure if I am posting this at the right forum, but it is about this poll script, ... I just noticed, if someone insert html tags into the poll options, it messes everything up, maybe you could make it, so the script would ignore html tags?
ok i got a fix, routine wasnt doing what i thought it was. ill post again when i update the instructions (i want to fix a couple things to do with editing so it may be tomorrow).
I've installed the hack and it works great.. but the only thing its missing is when someone votes, it won't move the "topic" to the top like regular messages do.. so eventually, the poll will not even be seen unless someone reply's with a message.
When you go to a Poll topic, you see the results at the top of the topic, however by default I am not getting the option to vote! My users have to view the comments and then back out to get the voting option.
TheBlueFalcon - ok i found the problem. the php accelerator has built in functionality for the polls which i didnt write, but it doesnt take into account polls in private forums. now i havent tried this but it should work (and dont worry it wont break anything:
Okay, maybe I have made an error, but I do not think so, I have re-checked the changes.
I have two problems, maybe they are related?
In the control panel the wordlets list is blank - nothing appears, apart from the button to update the Poll Wordlets - and in each new topic box, there are two boxes above the box to tick for receiving notification via email, but the two boxes have not text next to them.
I also had the control panel issue. It would not let me finish until I forced an image for 3 graphics. I just used a dark star and haven't had any issues, however you guys may want to know!
Thanks again Jordo for all you attention and a great addition to my board!
Yep - did that - even though it is not in the instructions - some of the files are not mentioned.
However - I have just altered it offline, making the phrases English - we do not understand the phase to 'Check a box' I then uploaded it, and it worked - so I guess in the uploading of the file, something failed.
Anyway thanks for a great hack - it apears to be working - so I will release it to the lions
i'm having trouble getting the wordlits working right.. I've done everything it has said, and uploaded the all the files, and set the permission. But the words are just not showing up.
HybridPWF - the modifications wordlets hack might change that line, i cant remember. ill look this weekend and change the instructions if so. thanks for pointing it out.
Ok, I just realized this is not the place for questions, but I can't seem to delete my post (but I can edit it) Anyway, I do have a question RE: The Integrated Poll Hack, which I have posted in the "Questions about Mods" forum.
Ok, i hacked the files right now, but this error occurs: Information Fehler: Kein Forum ausgewählt » Bitte benutzen Sie die ZURÜCK-Funktion Ihres Browsers.
can someone please tell me where these lines are located in cp.cgi:
Quote
quote:
i havent tested anything yet but it seems to all be there except i have no wordlets and when i click on poll settings it tell me that i dont have access to that area.
What the hell did I do? =( TIA
UPDATE: I just tested it and when I try to create a poll it tells me that there is no forum selected.
PROBLEM NOW FIXED---- When I deleted the post, it deleted just that..the post. However, it left the postnumber.poll file on the server so when someone created the next topic, Ubb gave that thread the next number which was the same as the deleted post. So therefore the postnumber.poll file kicked in. All I had to do was delete that .poll file and it's working great. Thanks Jordo and all you other guys that helped him..
Tom
I have a problem and I scanned through the other replies and didn't see this so I'm going to ask.
I got the hack running on my site and it runs great. However, let's say I create a poll and submit it. Then I decide that I don't like it and delete it. The next person to post a topic it that forum will have the poll I created and deleted on the top of there message. Is there a way to fix that?
Here is a link to my site. In the General Discussion is where I'm talking about. I created a test poll, then after seeing that the poll hack worked, I deleted that thread. When one of my members posted the next topic, it put my test poll at the top of his thread... Here is the link. Osok Boards
tomjinx1 - how did you delete the poll? it is set up to delete the .poll file when the thread is deleted through editing, or though the delete button, or through the cp prune...
maybe it's already posted, but when u try to move a poll it only moves the post no the poll, would be nice if the whole poll would can be moved in a other forum, but it's not so important. Great hack anyways !
Thanks for the quick reply Jordo, I'll try it right away.
-------
And can someone tell me whats wrong with LK?
*AIM CONVO*
LK UBB: who are you LK UBB: ? CNASDG: Andrew aka CNA aka Andrewstovold on AIM. It doesn't matter now LK, got Jordo's help. Thanks anyway. LK UBB: why did you AIM me with 2 accounts? CNASDG: coz I thought you blocked me on my first one after yesterday LK UBB: I'm removing both of them from AIM LK UBB: and blocking LK UBB: and all the other ones as well CNASDG: Why? CNASDG: What have I done? LK UBB: because it's like the 5th time you're doing it LK UBB: have a nice da LK UBB: y LK UBB signed off at 20:19:16.
I don't think I did anything wrong, I don't annoy him, just ask for help when I'm in trouble I thought thats what people on here do, Help us with mods etc. and help us with forums. I even said to LK, I know you're not the author, but could you help me.......??
Dayum, first time I've had a problem with a hack (apart from above) for a lonnnnggggg time. Anyway, my problem this time, is that when I go to start a new topic, I tick the polls box, and put (for example) a 4 in Poll Options, but as soon as I press Add New Topic, I'm presented with a blank page.
When I try to start a topic WITHOUT a poll, its fine. So any ideas what I've done wrong?
Firstly, I apologize for my problem being I didn;t upload file, but after you gave me advice on where to put the code where I couldn't find UBB Friend, this is what it looks like now:
This is the code I entered for Public topic Page :
Public topic Page.pl:
[code][/code]
Ok, it looks wrong already, but help the dumb kid with the dumb name
Thanks again, CNA.
Note there are spaces either side of $poll_display.
Greg Hard, a member here installed this hack for me. I haven't heard from him for around four weeks so I suspect he's on vacation or something.
Anyway, the problem I am having is that UBB Poll will tell some members that they have alreay voted when they have not.
This does not happen to every member.
Any ideas on what could be wrong. This was installed about 6 weeks ago so if a new version would solve the issue will the multihack version install ove the top of the older version properly?
I installed the Poll hack fine, everything is working alright, BUT it's killed the Primary Settings column in the CP. I thought it was cp_common.pl but i've quadrouple checked it and it seems fine..
I haven't got XHTML Templates installed. Any help is greatly appreciated.
I have a minor problem (major to me) and I was wondering if you could help. Click here for a screenshot.
If I send you my public_topic_page and my modified public_poll_display pages do you think you can help me get rid of that extra blue stripe above the poll section?
Cobra - i would download the zip file, and upload the file ubb_poll_lib.cgi to your server, it is possible that he used an old version that has a bug in it. do not apply the multihack at this point, afaik it will just double the code since it is already there.
mrnewbie - make sure you have all the latest templates before applying this hack. iirc this happens when a 6.0x template (cp_add_new_style.pl or something like that) is used with 6.1.x.
Morpheus - it would have to be code in cp_common.pl. remove the additions this hack makes to that file and see if it works, if it still does not then compare it to a stock file, as you may have accidentally deleted something.
steamfish81 - all the html is in the templates file, in particular, public_poll_display.pl. you can add center tags in there, look for html code following a line like "sub results {" of something of that sort. should be fairly straightforward.
XPerT - you cannot send ubb files. you most likely have an extra
cell near the top of the file public_poll_display.pl
Boubou - check the additions you made in ubb_topic_maint.cgi. the .poll file should be deleted whenever a topic is deleted if that file was edited correctly.
I've got the Polls working on beta 6.2....well for the most part. The only problem I've encountered, which may be a universal problem, is the polls do not work properly when viewing and writing of posts are restricted to Administrators, the forum Moderator, and other authorized* users.
Does anyone have a multihack file for this?? I need one for the latest version of multihack. I am too lazy to install this huge mod, that is why I need it.
When the forum is made completely private (in the bb CP by checking off "Restrict Viewing and Writing of Posts To Administrators, the forum Moderator, and other authorized* users" in the details section for a particular forum), not all polling functionality works properly ie. all votes cast for that poll are not recognized.
I believe I have found the source to the problem. Forums that are made private create a sub dir within the main forum dir (main dir: Forum#, sub dir name: private-whatever), the initial .poll file is created within the private-whatever dir. Once a vote is cast, the vote gets written to a new .poll file within the main forum dir Forum#. This is what causes the conflict.
The .poll file within the sub dir, private-whatever is what is called on when displaying current poll results. It is inacurate because it never changes. Only the second .poll file (which shouldn't even be there) within the main forum dir, Forum#, is updated with new poll votes.
Since I've pretty much narrowed it down, I'm sure this will be an easy fix. If I get the time, I might even put my novice skills to the test and try to fix it myself. If I do, I'll be sure to post the fix here.
The exact path is constructed when you vote, so it should be writing to the .poll file in the private subdir. on viewing your test board, i notice that the test account has already voted in that poll... have you done something to change it here? or was the test account able to vote and have their vote recorded properly?
quote:Originally posted by jordo: The exact path is constructed when you vote, so it should be writing to the .poll file in the private subdir. on viewing your test board, i notice that the test account has already voted in that poll... have you done something to change it here? or was the test account able to vote and have their vote recorded properly?
It did not properly recognize that the forum was restricted/private, so it would write a new .poll file to the main forum directory and not onto proper .poll file in the private sub dir. Making that change I've listed above corrected the problem and it works perfect now!
quote:Originally posted by GRIDLOCK: It was accidentally removed when I intergrated the forum into my web site design. Don't worry it's on the to do list It's only 1 file!
it sounds like a nice hack but i can't get it to work i've installed and hacked all the files as said but thats what i get everytime ....... i hope someone can tell me whats wrong here
================================================== /usr/local/plesk/apache/vhosts/home.com/cgi-bin/ubb_poll_lib.cgi: syntax error at /usr/local/plesk/apache/vhosts/home.com/cgi-bin/ubb_poll_lib.cgi line 172, near "$permission ~" syntax error at /usr/local/plesk/apache/vhosts/home.com/cgi-bin/ubb_poll_lib.cgi line 226, near "}" ==================================================
/usr/local/plesk/apache/vhosts/home.com/cgi-bin/ubb_poll_lib.cgi: syntax error at /usr/local/plesk/apache/vhosts/home.com/cgi-bin/ubb_poll_lib.cgi line 172, near "$permission ~" syntax error at /usr/local/plesk/apache/vhosts/home.com/cgi-bin/ubb_poll_lib.cgi line 226, near "}"
i checked the ubb_poll_lib.cgi and this is the section thats causing the problem sub do_vote { my(@choice,$new_total,$comment_num);
my $type = param('type'); my $vote = param('vote'); my $comment = param('comment'); my $username = param('username'); my $forum = param('forum'); my $thread = param('thread');
#get forum details my @this_forum = &GetForumRecord($forum);
# determine exact path & check permission if necessary my $permission = $this_forum[6]; my $exact_path = "Forum$forum"; ##line 172## if ($permission ~= m/private/) { $exact_path .= "/private-$this_forum[7]"; }
ok i updated the zip when i replied previously (4 replies before this) and the code you posted is not from the updated version. so... redownload the zip and upload ubb_poll_lib.cgi.
the current problem is lack of sleep and fast typing
Code
[/code] the "~=" needs to be "=~" only change on line 172 that will solve it :D (make sure that u download the zip (now) and use it, 'couse maybe u got a version of it with more errors in it on the private thing) (i've downloaded it about 1 hour ago)
also, i don't know perl, or ubb hacking, but i'm not sure that "m" in the m/private/ is needed (it's not there on my screen at least)
there is however 1 other issue: i started a new poll (test poll) in the subject of the poll (after the "add new topic") i wrote:
Code
</pre></div></div><br>and that was the output:<br>[code]
after some more testing, i've found out that when u create a poll, it ignores the "Disable smilies in this post." and displays them no matter what (including that error)
however, i've installed a Greamlins hack, so it might be that too, i dunno
great hack! ('cept for that minor problem)
-- 1 more thing, the "code" UBB tag does not disable other ubb tags (like the for the graemlins) so what is it for?
(yes, 3rd edit 'couse i forgot to disable smilies again :p) [ 01-18-2002 02:32 PM: Message edited by: TniT ]
quote:Originally posted by TniT: this works! excellent!
the current problem is lack of sleep and fast typing
quote:Originally posted by TniT: there is however 1 other issue: i started a new poll (test poll) in the subject of the poll (after the "add new topic")
... 1 more thing, ...
ill take a look at those, but it uses the standard ubb parsing routines for smilies and ubbcode, so if you have a hack that modified those it may be causeing some conflicts.
Question. Been reading through the thread and it's hard to tell. Does this now work with the acclerator or not? I saw Jordo refer to ultimatebb.php in one post but in the directions it makes no mention of that file. Just curious because as I have it, it won't work with the accelerator and seems people do have it working right with it. I must have missed something.
Can anyone help us regarding whether this works with the acc?
BTW - I have created a MultiHack file for this version. It will work if you have Sticky Threads installed or not. This is based on Version 2.0, which the zip file is, and not 1.9.
I installed the poll and it's working great except for when you view the page before you submitted a vote. than the poll options are centered on the page instead of aligned to the left (that's where I want them)