Poll system?

Started by Hyperion (noobKID), July 24, 2012, 09:08:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hyperion (noobKID)

Quote from: denede on September 04, 2012, 08:09:11 PM
can't download the attachement, it always redirects me to the login page
please upload it on another host

hmm... i think somfthing is wrong with your browser, im using firefox/google chrome... and its working fine with me... try logout from google-c+firefox, and then clear (delete) all cookies ect... and login again... check if that works... (it should)...

denede

#11
can't download the attachement, it always redirects me to the login page
please upload it on another host

Hyperion (noobKID)

hello...
my teacher(s) was sick today due to some sort of food problems in their body they told us, so my class was not in school today...

but i asked some friends, and they could not either find the problem...
so we stand where we began... nofthing -'.'-...

MJF

Hope you can get it done mate :-)

Hyperion (noobKID)

3 pictures?...
dont you use CSS for them to be loaded?...
hmm...

well, inside the .JS file of my, i see this:

(fadeIn)

and i suppose that is the function to make it come in... so if that is so, then i suggest making 3 of those on each picture if so... but i am noob when it really comes to JS... i know how to read, but not to code it within... but i can try ask some friends, i have some that might be able to help ya out... im starting in schools tomorrow also... so i can also ask my teacher for a little help if so...

MJF

İ tried to use jquery but can not figure out how to do it.. There are 3 pictures that has to be loaded with jquery and i just cant figure out how to do it..

Maybe you can help??

İf you will find something then just let me know please :-)

And youre welcome :-)

Hyperion (noobKID)

#6
to the fade part, could you not use Jquery that allready has been used in the JS Script you have attached?...

EDIT: thanks... will test...

MJF

Find this line:

print("<tr><td align=\"left\" width=\"40%\">".$result[1]."</td><td align=\"left\" width=\"60%\" valing=\"middle\"><div class=\"bar".($i == 0 ? "max" : "")."\"  name=\"".($result[0] / $total * 100)."\" id=\"poll_result\">&nbsp;</div></td><td>&nbsp;<b>".number_format(($result[0] / $total * 100),2)."%</b></td></tr>\n");


Change it to:

print("<tr><td align=\"left\" width=\"20%\">".$result[1]."</td><td>&nbsp;<b>".number_format(($result[0] / $total * 100),2)."%&nbsp;&nbsp;<img src=\"{$TBDEV['pic_base_url']}bar_left.gif\"><img src=\"{$TBDEV['pic_base_url']}bar.gif\" height=9 width=". $result[0] * 100 ."><img src=\"{$TBDEV['pic_base_url']}bar_right.gif\"></b></td></tr>\n");


It worked for me :)

But i would really like to know how i could make the bars fade in slowly  :(..

Hyperion (noobKID)

hello again,
just one question, finally installed and its working like a charm! :)...

but this: (PICTURE ATTACHED)

is it possible to make it like this?... at the picture you can see that between each poll answer/question, there is a little collor change... where to do this if so?... ideas?...

-thanks alot if so! :)...

[attachment deleted by admin]

Hyperion (noobKID)

thanks alot!... i think this is the one i was actually searching for :)...

i was just thinking that this one was named extended... i did not remember, that was why i wrote as i did :)... but thanks! :)...

rickandmary

here is the poll system for 09, i can't find any extensive one but you can possibly adapt this.

SQL
CREATE TABLE IF NOT EXISTS `polls` (  `id` int(10) unsigned NOT NULL auto_increment,  `added` int(11) NOT NULL,  `question` varchar(255) collate utf8_bin NOT NULL default '',  `option0` varchar(40) collate utf8_bin NOT NULL default '',  `option1` varchar(40) collate utf8_bin NOT NULL default '',  `option2` varchar(40) collate utf8_bin NOT NULL default '',  `option3` varchar(40) collate utf8_bin NOT NULL default '',  `option4` varchar(40) collate utf8_bin NOT NULL default '',  `option5` varchar(40) collate utf8_bin NOT NULL default '',  `option6` varchar(40) collate utf8_bin NOT NULL default '',  `option7` varchar(40) collate utf8_bin NOT NULL default '',  `option8` varchar(40) collate utf8_bin NOT NULL default '',  `option9` varchar(40) collate utf8_bin NOT NULL default '',  `option10` varchar(40) collate utf8_bin NOT NULL default '',  `option11` varchar(40) collate utf8_bin NOT NULL default '',  `option12` varchar(40) collate utf8_bin NOT NULL default '',  `option13` varchar(40) collate utf8_bin NOT NULL default '',  `option14` varchar(40) collate utf8_bin NOT NULL default '',  `option15` varchar(40) collate utf8_bin NOT NULL default '',  `option16` varchar(40) collate utf8_bin NOT NULL default '',  `option17` varchar(40) collate utf8_bin NOT NULL default '',  `option18` varchar(40) collate utf8_bin NOT NULL default '',  `option19` varchar(40) collate utf8_bin NOT NULL default '',  `sort` enum('yes','no') collate utf8_bin NOT NULL default 'yes',  `location` tinyint(1) NOT NULL default '1',  PRIMARY KEY (`id`),  KEY `location` (`location`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=18 ; 

and
CREATE TABLE IF NOT EXISTS `pollanswers` (  `id` int(10) unsigned NOT NULL auto_increment,  `pollid` int(10) unsigned NOT NULL default '0',  `userid` int(10) unsigned NOT NULL default '0',  `selection` tinyint(3) unsigned NOT NULL default '0',  PRIMARY KEY (`id`),  KEY `pollid` (`pollid`),  KEY `selection` (`selection`),  KEY `userid` (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=14 ; 

to display the poll on index find
$HTMLOUT .= "<div style='text-align:left;width:80%;border:1px solid blue;padding:5px;'>     <div style='background:lightgrey;height:25px;'><span style='font-weight:bold;font-size:12pt;'>{$lang['stats_title']}</span></div> 

add above
$HTMLOUT .="<script type='text/javascript' src='scripts/jquery.js'></script> <script type='text/javascript' src='scripts/poll.core.js'></script> <script type='text/javascript'>     var jq = jQuery.noConflict();     jq(document).ready(function(){         loadpoll();     });</script>"; $pollbutton = ''; $pollbutton1 = ''; $pollbutton1 = "&nbsp;<span style='float:right;'>[<a href='polloverview.php'>{$lang['index_prev']}</a>]</span>\n"; if (get_user_class() >= UC_ADMINISTRATOR) $pollbutton = "&nbsp;<span style='float:right;'>[<a href='makepoll.php'>{$lang['index_new']}</a>]</span>\n";   $HTMLOUT .= "<div style='text-align:left;width:80%;border:1px solid blue;padding:5px;'> <div style='background:lightgrey;height:25px;'><span style='font-weight:bold;font-size:12pt;'>{$lang['index_poll']}</span>{$pollbutton1}{$pollbutton}</div>  <table align='center' class='main' width='758' cellspacing='0' cellpadding='10'> <tr> <td align='center'> <div id='poll_container'> <div id='loading_poll' style='display:none'></div> <noscript> <b>{$lang['index_java']}</b> </noscript> </div>   </td> </tr> </table> </div>\n";

open lang\en\lang_index.php and add
'index_poll' => "Site Poll",
'index_java'    => "This requires javascript enabled",
'index_new'    => "New Poll",
'index_prev'    => "Previos Polls", 


open each of your stylesheets and add
@import "poll.core.css"; 

upload the files from the attachement to your root folder and the 2 files from the scripts folder to your scripts folder and language files to your lang\en folder

[attachment deleted by admin]

Hyperion (noobKID)

yoyo u-232... if anyone have a advanced/extended version of a poll system,
then post... would be happy to have it. thanks :).