|
|
|
|
|
|
|
|
|
GauGau
Noobie

Posts: 18

Klugscheisserei grood recht!
|
 |
Direct link to poll
« Reply #69 on: July 19, 2002, 05:07:52 PM » |
|
Great add-on, I've been waiting for it. I added a little extra to it on my site: the user can a) vote or b) jump to the voting thread in the board itself. You only need 1 extra query.
For those interessted: see it "live" here (sorry, german language only). <search for> $poll_votes_array=array($array0_poll["votes1"],$array0_poll["votes2"],$array0_poll["votes3"],$array0_poll["votes4"],$array0_poll["votes5"],$array0_poll["votes6"],$array0_poll["votes7"],$array0_poll["votes8"]); <add after> // find out board and thread of current poll $query1_thread_poll=mysql_query("SELECT * FROM ".$dbprefix_poll."topics WHERE ID_POLL='".$poll_id."';",$server); $array1_thread_poll=mysql_fetch_array($query1_thread_poll); and <search for (2x)> echo "<font color=$font_color style=\"FONT-FAMILY: $font_face; FONT-SIZE: $font_size\"><b>$poll_question</b><br>"; <replace with (2x)> echo "<font color=$font_color style=\"FONT-FAMILY: $font_face; FONT-SIZE: $font_size\"><a href=\"$fullurl?board=$array1_thread_poll[1];action=display;threadid=$array1_thread_poll[0]\"><b>$poll_question</b></a><br>"; One little issue: the original code itself isn't HTML 4.01 compliant (but YaBB SE isn't neither  , although it says something else in the "out-of-the-box" installation  ) - why not modify the poll code accordingly? GauGau
|
|
|
Logged
|
|
|
|
|
Nossie
Full Member
  
Posts: 192

If it aint broke, you haven't played with it enuff

|
 |
Re:[BETA] YaBB Poll v0.1 Released
« Reply #71 on: July 27, 2002, 08:41:52 PM » |
|
Hi, was wondering if someone could help me with this.... I setup the script and *only* edited it so that the title was a hyper link to the poll thread... the way I have my page set out is like this... I have an index.shtml file.. that calls the following: nav2.html (the navigation include) main.php (this calls the ssi.php and then further down calls poll.php) the problems I'm having are thus... when a member who hasnt already voted tries to vote... it doesnt register the vote and then forwards them to the main.php file and not back to the index file... can someone help me work this out... or help with a work around.. would be greatly appreciated thanks 
|
|
« Last Edit: July 27, 2002, 08:49:42 PM by Nossie »
|
Logged
|
|
|
|
GauGau
Noobie

Posts: 18

Klugscheisserei grood recht!
|
 |
Re:[BETA] YaBB Poll v0.1 Released
« Reply #72 on: July 28, 2002, 08:30:16 AM » |
|
Quote from: Nossie on July 27, 2002, 08:41:52 PMthe way I have my page set out is like this... I have an index.shtml file.. that calls the following:
nav2.html (the navigation include) main.php (this calls the ssi.php and then further down calls poll.php)
Nossie, sounds to me like a cookie problem (see http://www.yabb.info/community/index.php?board=140;action=display;threadid=9762;start=0 ). Did you include ssi.php in the very first line of your index.whatever? Seems not to be so. Remember: cookie information must be sent before header data is sent. Another possibility: did you define functions which handle the inclusions? Remembered to make the vars global? You try this in your index.whatever (in the given order): - include ssi.php - include nav2.html - do the things that main.php is expected to do - include poll.php For further help some more code bits would be helpful. GauGau
|
|
|
Logged
|
|
|
|
Nossie
Full Member
  
Posts: 192

If it aint broke, you haven't played with it enuff

|
 |
Re:[BETA] YaBB Poll v0.1 Released
« Reply #73 on: July 28, 2002, 01:15:40 PM » |
|
Thanks GauGau... the reason it would appear I'm calling SSI.php half way down the page is because its actually being called and processed at the top of the main.php file ? I saw in here someplace that that was the best way to do it without renaming your index file to .php the poll script is being called half way down the main.php file... main.php <? require("/home/3283/planet/www.3dhomeworld.com/public_html/yabbse/SSI.php"); ?>
<LINK REL="stylesheet" href="Ian.css" type="text/css">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="d3Homeworld"> <!--DWLayoutTable--> <tr> <td width="100%" height="66" valign="top"><p align="center">3D HomeWorlds <a href="yabbse/index.php">forum</a> is:<br> <img src="images/online.gif"><br> </p></td> </tr> <tr> <td height="18" align="center" valign="top"> <? welcome(); ?> </td> </tr> <tr> <td height="23" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="50" height="22" valign="top"><img src="Menu/left.gif" width="50" height="22"></td> <td width="100%" valign="top" background="Menu/middle.gif"><img src="Menu/middle.gif" width="38" height="22"></td> <td width="89" valign="top"><img src="Menu/right.gif" width="89" height="22"></td> </tr> <tr> <td height="1"><img src="spacer.gif" alt="" width="50" height="1"></td> <td></td> <td><img src="spacer.gif" alt="" width="89" height="1"></td> </tr> </table></td> </tr> <tr> <td height="32" valign="top"><div align="center"> <p>Recent Forum Topics:<br> </p> </div></td> </tr> <tr> <td height="18" align="left" valign="top"><p> <? recentTopics(); ?> </p></td> </tr> <tr> <td height="16" valign="top"><div align="center">Current Poll:</div></td> </tr> <tr> <td height="29" valign="top"> <? require("/home/3283/planet/www.3dhomeworld.com/public_html/poll.php"); ?> </td> </tr> <tr> <td height="23" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="50" height="22" valign="top"><img src="Menu/left.gif" width="50" height="22"></td> <td width="100%" valign="top" background="Menu/middle.gif"><img src="Menu/middle.gif" width="38" height="22"></td> <td width="89" valign="top"><img src="Menu/right.gif" width="89" height="22"></td> </tr> <tr> <td height="1"><img src="spacer.gif" alt="" width="50" height="1"></td> <td></td> <td><img src="spacer.gif" alt="" width="89" height="1"></td> </tr> </table></td> </tr> <tr> <td height="47" align="center" valign="top"><p> Users Online:<br> <? whosOnline(); ?> </p></td> </tr> </table> I tried renaming the index file to php and calling both the SSI and poll scripts from the very top of the page... same thing happened... I'm not sure what to do about global variables because I'm very new to php... so maybe that is the problem... I followed the hack in the previous post to make it a link to a 'T' but that was when I was bored (and couldnt work out why the poll wasnt working) I've renamed the poll.php to .txt and uploaded it for you to look at hereI think the reason its opening back in the include is similar to the frames problem where you need to specifiy 'top' yes? but I've no idea how to do that in php... rest of the ssi works fine.... so my guess is that it has nothing to do with the positioning of the script ?
|
|
|
Logged
|
|
|
|
|