News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Poll Mod

Started by clemenzo, June 09, 2007, 11:09:33 AM

Previous topic - Next topic

srm

Quote from: srm on September 04, 2007, 08:45:36 AM
Quote from: clemenzo on June 14, 2007, 09:17:06 AM
Quote from: qubbah on June 13, 2007, 11:34:53 AM
Quote from: clemenzo on June 09, 2007, 11:09:33 AM
Link to Mod

This mod will rotate 10 colours to the poll bars and allow voting from SSI block on default theme of SMF.

To show poll in tinyportal block, add a phpbox and type "ssi_showPoll(X);" into block body where X is a topic number.

Demo
======

Default theme:

http://dev.voixbox.com/index.php?theme=1
http://dev.voixbox.com/index.php?theme=1&topic=2


Custom theme:

http://www.voixbox.com
http://www.voixbox.com/index.php?topic=15182.0


when i used this "ssi_showPoll(X);" with php block this msg appeard

Parse error: syntax error, unexpected $end in /home/myforum/public_html/v3/Sources/Load.php(1735) : eval()'d code(35) : eval()'d code on line 1

Did you replace "X" with a topic number where your poll resides? In my examples, I would have used ssi_showPoll(2); or ssi_showPoll(15182.0);.


Hi, Im getting this same error here and I do have the poll number between the paranthasees exactly right.

Hlep

could someone please help me with this problem..It's very important.

srm

Jesus Christ , Buddah , Darth Vador wtf?

srm

I guess nobody here either doesnt know how to resolve this issue or they are just too careless to so.

Golin

#63
Quote from: srm on September 09, 2007, 09:45:50 AM
I guess nobody here either doesnt know how to resolve this issue or they are just too careless to so.
No, the author of the mod just hasn't been online since last week.

But I would like to add another error, incase he does get online :)

I get, even after altering Subs.php as suggested:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40961 bytes) in /www/s/t/o/domainname.eu/public_html/aof/Sources/Subs.php on line 2733

Modlist:

1.   FlashChat Integration  ---->>> this one caused the error
2.   RSS Feed Poster
3.   Users Online Today Mod
4.   SMF Gallery Lite
5.   TinyPortal
6.   RSS Feed Icon
7.   Group on Registration
8.   TinyPortal
9.   Reason For Editing Mod
10.   WoW Character Profiles
11.   Itemstats BBC Tag (XHTML Compliant)
12.   Custom Action Mod
13.   Ultimate Shoutbox
14.   SMF Shoutbox
15.   SMF 1.1.2 Update Package
16.   SMF 1.1.1 Update Package
17.   PaypalDonations
18.   WoW-Itemstats 1.25.5
19.   SMF 1.0.11 / 1.1.3 Update
20.   Welcome Topic Mod
21.   SMF Poll Mod

subs.php attached


edit: solved by removing the FlashChat mod

srm

Im glad you solved it.

Any ideas yet whats causing my problem?

asdas2

Installing this package will perform the following actions:  Type Action Description
1. Extract Tree ./Themes/default/images/poll 
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Themes/default/Display.template.php Test failed
4. Execute Modification ./Themes/default/Display.template.php Test successful
5. Execute Modification ./Themes/default/Display.template.php Test successful
6. Execute Modification ./Themes/default/Display.template.php Test successful
7. Execute Modification ./SSI.php Test successful
8. Execute Modification ./SSI.php Test successful
9. Execute Modification ./SSI.php Test successful
10. Execute Modification ./SSI.php Test successful
11. Execute Modification ./SSI.php Test successful
12. Execute Modification ./SSI.php Test successful
13. Execute Modification ./SSI.php Test successful
14. Execute Modification ./SSI.php Test successful
15. Execute Modification ./SSI.php Test successful
16. Execute Modification ./SSI.php Test successful
17. Execute Modification ./SSI.php Test successful
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

Golin

Quote from: srm on September 16, 2007, 09:22:09 AM
Im glad you solved it.

Any ideas yet whats causing my problem?

Nope, I'm not a coder. What I usually do is check the error code and look for clues there. What it points to etc. I also try a search on the error code, try this site first, or else just Google it or parts of it.

I hope for you the author will be online soon, was last active on 3 sept.

clemenzo

Can those of you who are unable to run the mod successfully as least provide a link to your site? I cannot visualize what you see..

asdas2

my link was in my siggy . anywayz its www.chillparadise.com
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

clemenzo

Quote from: asdas2 on September 23, 2007, 02:09:28 AM
my link was in my siggy . anywayz its www.chillparadise.com

Not sure if you have other mods that have altered your ./Themes/default/Display.template.php file. Anyway, this mod applies 4 changes in that file and from your log, the first one failed.

You can try open up the file and check the part that is supposed to be searched and replaced. Make a backup before you make any changes.

Find and replace:
// Are they not allowed to vote but allowed to view the options?
if ($context['poll']['show_results'] || !$context['allow_vote'])
{
echo '
<table>
<tr>
<td style="padding-top: 2ex;">
<table border="0" cellpadding="0" cellspacing="0">';

// Show each option with its corresponding percentage bar.
foreach ($context['poll']['options'] as $option)
echo '
<tr>
<td style="padding-right: 2ex;', $option['voted_this'] ? 'font-weight: bold;' : '', '">', $option['option'], '</td>', $context['allow_poll_view'] ? '
<td nowrap="nowrap">' . $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)</td>' : '', '
</tr>';

echo '
</table>
</td>
<td valign="bottom" style="padding-left: 15px;">';


With:
// Are they not allowed to vote but allowed to view the options?
if ($context['poll']['show_results'] || !$context['allow_vote'])
{
echo '
<table>
<tr>
<td style="padding-top: 2ex;">
<table border="0" cellpadding="0" cellspacing="1" width="100%">';

// Show each option with its corresponding percentage bar.
foreach ($context['poll']['options'] as $option)
echo '
<tr>
<td style="padding-right: 2ex;', $option['voted_this'] ? 'font-weight: bold;' : '', '" class="smalltext">', $option['option'], '</td>', $context['allow_poll_view'] ? '
<td nowrap="nowrap" class="smalltext">' . $option['bar'] . '</td>
<td nowrap="nowrap" class="smalltext">' . $option['votes']. ' (' . $option['percent'] . '%)</td>' : '', '
</tr>';

echo '
</table>
</td>
<td valign="bottom" style="padding-left: 15px;" class="smalltext">';

ChackanPT

Quote from: clemenzo on September 25, 2007, 11:48:37 AM
Quote from: Chackan on September 25, 2007, 11:35:24 AM
http://www.otherworld-portal.com

SMF File    Your Version   Current Version
SMF Package   SMF 1.1.4   SMF 1.1.4
Sources                      1.1.4          1.1.4
Default Template        1.1.2          1.1.2
Language Files           1.1.2           1.1.2
Current Templates   1.1            1.1

Dunno if this helps :S
Can we move the discussion to the SMF Poll mod page at http://www.simplemachines.org/community/index.php?topic=176062.0 ?

I hope you are using version 1.01 of the poll mod.. :)

Yes. Actually i even tried to install version 1.0 :S

clemenzo

Quote from: ChackanPT on September 25, 2007, 12:05:22 PM
Quote from: clemenzo on September 25, 2007, 11:48:37 AM
Quote from: Chackan on September 25, 2007, 11:35:24 AM
http://www.otherworld-portal.com

SMF File    Your Version   Current Version
SMF Package   SMF 1.1.4   SMF 1.1.4
Sources                      1.1.4          1.1.4
Default Template        1.1.2          1.1.2
Language Files           1.1.2           1.1.2
Current Templates   1.1            1.1

Dunno if this helps :S
Can we move the discussion to the SMF Poll mod page at http://www.simplemachines.org/community/index.php?topic=176062.0 ?

I hope you are using version 1.01 of the poll mod.. :)

Yes. Actually i even tried to install version 1.0 :S
What other mods have you installed?

ChackanPT

Only the 1.1.4 update and tiny portal

clemenzo

Quote from: ChackanPT on September 25, 2007, 12:16:45 PM
Only the 1.1.4 update and tiny portal
Have you used this mod before? Could you PM me your email address? I can send you a copy of what I just used to test out.

ChackanPT

Nop, never used it before. Pm sent!

clemenzo

Quote from: ChackanPT
Now i get this error:
"1. Extract Tree ./Themes/default/images/poll
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Themes/default/Display.template.php Test successful
4. Execute Modification ./Themes/default/Display.template.php Test successful
5. Execute Modification ./Themes/default/Display.template.php Test successful
6. Execute Modification ./Themes/default/Display.template.php Test successful
7. Execute Modification ./SSI.php Test failed
8. Execute Modification ./SSI.php Test successful
9. Execute Modification ./SSI.php Test successful
10. Execute Modification ./SSI.php Test successful
11. Execute Modification ./SSI.php Test successful
12. Execute Modification ./SSI.php Test failed
13. Execute Modification ./SSI.php Test successful
14. Execute Modification ./SSI.php Test successful
15. Execute Modification ./SSI.php Test successful
16. Execute Modification ./SSI.php Test successful
17. Execute Modification ./SSI.php Test successful"

I checked that the SSI.php file was unchanged between SMF 1.1.3 and 1.1.4. Could you email me your SSI.php file? Thanks

ChackanPT

Sent. I can't find enough thanking for this :S

clemenzo

Quote from: ChackanPT on September 25, 2007, 10:01:49 PM
Sent. I can't find enough thanking for this :S
From your SSI.php, I believe you have tried to add this poll mod manually as per the original instructions from tinyportal. However, you probably forgot to undo them totally after you remove it.

I have sent you your cleansed SSI.php, hopefully it works for you.

ChackanPT

#78
Also, the bars that show the voting progression are gone :S

Ok, the size i good. Only problem are the bars :O

clemenzo

Quote from: ChackanPT on September 26, 2007, 09:33:18 AM
Alright, installed it, but the poll looks weird and too big. Is there a way to shrink it or something? :S

Also, the bars that show the voting progression are gone :S
You need to unzip the mod and upload the poll folder that contains the bar images into your custom theme images folder. The default theme should have that images loaded when you installed the mod. I do not understand what you mean by weird and big.. A screenshot after you have uploaded the images would be nice..

Advertisement: