Welcome to Geeklog Tuesday, July 23 2019 @ 12:38 pm EDT

Geeklog Forums

Polls on Each Topic


Status: offline

itsreal

Forum User
Newbie
Registered: 06/05/06
Posts: 1
Location:Florida USA
artistic

I hope that no one has already made this hack but just in case here it is. I wanted a way to Have a poll show up only on a related topic so I came up with a solution.

In the /plugins/polls/functions.inc I made this Mod

PHP Formatted Code
function phpblock_polls()
{
    $retval = POLLS_showPoll( 1,$_GET['topic']);

    return $retval;
}

 


Then you Give the PollID the same ID as The TopicID that you want the poll to show on. Example. I want to show a Poll on Topic Hurricane Stories, the topicID is hstories so the PollID will be hstories.

Then you make a Block restricted to the Topic you want the poll to show on. Make it a PHP Block, with the function call phpblock_polls and walla.


If anyone thinks I did something wrong, please let me know.

You can see it in action at
It's Real Florida

All times are EDT. The time is now 12:38 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content