All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: Tips & Tricks For WP-Polls  (Read 33414 times)

0 Members and 1 Guest are viewing this topic.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Tips & Tricks For WP-Polls
« on: 06 December 2006, 01:53 »
This is the page to find all the tips and tricks for WP-Polls.  ;)

How to display more than one poll in sidebar? by eleight
You can use this little dirty hack ;) It will output $limit active polls. You can easily extend this function to suit your needs!
Code: [Select]
function get_active_polls($limit) {
        global $wpdb;
        $rez = $wpdb->get_results("SELECT pollq_id FROM $wpdb->pollsq WHERE pollq_active = 1 ORDER BY pollq_id DESC LIMIT ".$limit);
        foreach($rez as $poll) {
                get_poll($poll->pollq_id);
        }
}
and then in sidebar replace
Code: [Select]
get_poll(); with
Code: [Select]
get_active_polls();
Note: If you are using widgets, there is already support for multiple polls. Under "WP-Admin -> Presentation -> Widgets -> Polls". Configure Poll Widget by clicking on the square icon besides the Widget Title, under "Current Active Poll", choose "Display Multiple Polls".
« Last Edit: 04 July 2008, 17:42 by GaMerZ »
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline JonB

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #1 on: 11 May 2007, 09:36 »
Thanks for this. Was just about to come and post a question regarding your first tip!  ;D

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #2 on: 11 May 2007, 23:19 »
No problem. ;)
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline waterbender

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #3 on: 21 May 2007, 21:05 »
It's not letting me display polls outside of wordpress... Help?
I have all the right stuff in the head section, and the php get poll code where I want it, but all I get is errors.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #4 on: 22 May 2007, 00:20 »
Page? Site? Errors? Anything?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline relax

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #5 on: 25 May 2007, 17:35 »
Hi,
I found some issues in posting an individual poll in a Post.

I am using wordpress 2.1.3 - it works but only using - [poll=2] - The rest of the code in the examples you used caused problems. All that was needed was the variable [poll=2] the php code was not necessary 

you  can see here          We-relax.com poll

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Tips & Tricks For WP-Polls
« Reply #6 on: 25 May 2007, 17:36 »
yeap it is, the example in the first post was to display wp-polls outside of WordPress

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #7 on: 26 May 2007, 00:29 »
.
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline phiden

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #8 on: 03 October 2007, 16:36 »
I too am having an issue with outside-usage. As a php novice I don't know if there's something interfering with the code...

Code: [Select]
<?php include_once('http://www.greenlightsusa.com/public_html/blog/wp-blog-header.php');?><!--ADDED 100307-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{TPL_VAR_METATITLE}</title>
<?php wp_head(); ?><!--ADDED 100307-->
<meta name="description" content="{TPL_VAR_METADESCRIPTION}" />
<meta name="keywords" content="{TPL_VAR_METAKEYWORDS}" />
<meta name="title" content="{TPL_VAR_METATITLE}" />
<meta http-equiv="Content-Type" content="{TPL_VAR_CENCODING}" />
<meta http-equiv="Content-Language" content="en-gb" />
<meta name="robots" content="all" />
<meta name="Revisit-After" content="7 days" />
<meta http-equiv="imagetoolbar" content="false" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="author" content="www.greenlightsusa.com" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="/store2/css/{TPL_VAR_CSSFILE}" media="screen" />
<link rel="stylesheet" type="text/css" href="/store2/css/inline_editor.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/store2/css/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="/store2/css/menu.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="/store2/css/ie6.css" />
<![endif]-->
<script language="Javascript" type="text/javascript" src="/store2/jscript/validations.js"></script>
<script type="text/javascript" src="/store2/jscript/menu.js"></script>
</head>

<body>
<a id="top"></a>
<!-- BEGIN TPL_VAR_INLINE_EDITOR_BLK -->
<div id="inline_editor" class="null">

<!-- [DRK] -->
<dl class="inline_menu">
<dt>Menu</dt>
<dd><a href="#" onclick="document.getElementById('inline_editor').id = 'inline_editor_hidden'; return false;">Hide Side Menu</a></dd>
</dl>
<!-- [/DRK] -->

<dl class="inline_menu">

<dt id="builder">Editor</dt>

<dd><a href="{TPL_VAR_EDITLINK}">Edit This Page</a></dd>

<dd><a href="{TPL_VAR_ADMINURL}" target="_top">Load Admin</a></dd>

<dd><a href="{TPL_VAR_ADMINLOGOUT}" target="_top">Admin Logout</a></dd>

<dd><a href="javascript:history.go(-1)" target="_top">Previous Page</a></dd>

<dd><a href="{TPL_VAR_ASSOCIATE_PRODUCTLINK}" target="_top">Associate Product</a></dd>

<dd><a href="{TPL_VAR_ASSOCIATE_ARTICLELINK}" target="_top">Associate Article</a></dd>

</dl>

<!-- [DRK] -->
<p id="show_menu"><a href="#" onclick="document.getElementById('inline_editor_hidden').id = 'inline_editor'; return false;"><span>S<br />h<br />o<br />w<br /><br />M<br />e<br />n<br />u</a></span></p>
<!-- [/DRK] -->

</div>
<!-- END TPL_VAR_INLINE_EDITOR_BLK -->
<p id="skip">[<a href="#main">skip to main content</a>]</p>

<div id="container">
<div id="test">Questions or Comments? <a href="/contact">Contact Us</a> - 1-888-347-3365
</div>

<div id="header">

<a href="https://www.greenlightsusa.com/"><img src="https://www.greenlightsusa.com/store2/images/header.jpg" width="883" height="148" alt="header graphic" /></a>

       </div>

<div id="center" class="clearfix">
<div class="top-content">


<!--MENU-->
{TPL_VAR_LEFT}
<!--END - MENU-->


<div id="mid">
<div class="inner">




<div id="main">
<div class="inner">


{TPL_VAR_BODY}


</div><!-- end main/inner -->
</div><!--END#main-->





<div id="sidebar">
<div id="my-account">
<p><a href="{TPL_VAR_MYACCOUNT}" {TPL_VAR_ACTCLASS}><span class="account">My Account</span></a></p>
<p ><a href="{TPL_VAR_CARTLINK}"><span class="items_in_cart">Items in Cart</span></a>: {TPL_VAR_TOTALQTY} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="current_subtotal">Current Subtotal: </span>{TPL_VAR_CURRENCY}{TPL_VAR_GRANDTOTAL}</p>

</div>
<div id="replace-n-save">
<h3>Replace More Bulbs and Save!</h3>
<p>Buy 10 or more bulbs Get 5% off your bulb purchase!</p>
</div>
<div id=geo><!-- GeoTrust QuickSSL [tm] Smart Icon tag. Do not edit. -->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="//smarticon.geotrust.com/si.js"></SCRIPT>
<!-- end GeoTrust Smart Icon tag -->
<script type="text/javascript" language="javascript">var ANS_customer_id="3eda7c41-6f07-48e8-8cc3-b0db6ea5885e";</script> <script type="text/javascript" language="javascript" src="//VERIFY.AUTHORIZE.NET/anetseal/seal.js" ></script></div>
<div id="calc">
<p>Average American homes have over 40 light bulb sockets, so each of us has a chance to make a pretty big impact using CFL bulbs. Want to see what kind of difference you can make?  </p>
<img src="https://www.greenlightsusa.com/store2/images/calc.jpg" alt="Savings Calculator" />
<p class="note">click the button below to...</p>
<a href="https://www.greenlightsusa.com/index2.html#calculator"><img src="https://www.greenlightsusa.com/store2/images/getstarted.jpg" alt="Get Started" /></a>
</div><br /><br />
            <?php get_poll(); ?><!--ADDED 100307HEY!-->
            <br /><br /><br /><br /><br />
<img src="https://www.greenlightsusa.com/store2/images/ourmantra.jpg" alt="Our Mantra; Love Our Planet, Live Green" id="mantra" />
</div>
</div><!-- end body/inner -->
</div><!--END#mid -->

<!--END.top-content--></div>
<div class="bottom-content">&nbsp;
<!--END.bottom-content--></div>
<!--END#center--></div>


</div><!-- end container -->

<div id="footer">
   
   <div class="top-footer">
    <a href="https://www.greenlightsusa.com/givegreen"><img src="https://www.greenlightsusa.com/store2/images/give-green.jpg" alt="We GiveGreen!" /></a><br />
<span>10% of our profits go directly to environmental causes.</span>
If you are interested in having us support a specific group, please <a href="https://www.greenlightsusa.com/givegreen" title="">submit an application here</a>.
<div id="business_bureau"><a href="http://www.bbbonline.org/cks.asp?id=1070621134640"><img src="https://www.greenlightsusa.com/images/bbb.gif" /></a></div>
<!--END.top-footer--></div>

 <div id="bottom-footer">
    &copy;2007 GreenLights USA | <a href="https://www.greenlightsusa.com/commercial">info on commercial applications</a>  |  <a href="https://www.greenlightsua.com/contact">contact us</a> 
   
   <!--END#bottom-footer--></div>
<!--END#footer --></div>





<!-- Google Analytics -->
{TPL_VAR_GOOGLEANALYTICS}


</body>
</html>

Sorry, there's a lot going on in there...basically I'd like the poll to show up in the 'sidebar' section. It's not even throwing errors...browsers checked thus far are Safari & Firefox. Thanks for any help!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Tips & Tricks For WP-Polls
« Reply #9 on: 03 October 2007, 17:54 »
sorry, but what is your problem?

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline phiden

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #10 on: 03 October 2007, 18:37 »
That the poll won't show up on the page.
greenlightsusa.com/store2

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #11 on: 03 October 2007, 19:17 »
did you add the code to the correct spot and do what the "Please READ before posting" topic said?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline phiden

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #12 on: 03 October 2007, 19:29 »
I did indeed. And then I ran a search through the forums and followed the directions on another post, which involved moving the php around, also to no avail. That's why I posted the code above--I thought maybe someone with more experience might see something I'm missing with the way the page is structured.

Thanks!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Tips & Tricks For WP-Polls
« Reply #13 on: 03 October 2007, 19:46 »
phiden: When i go your site, the php in your code is not parse and hence it will not work, go view your source and look at the 1st line and you will get what i mean

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline phiden

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #14 on: 03 October 2007, 19:49 »
Okay, that makes sense. To ask a completely newbie question, how do I get it to parse? Or  is that something out of my/our control?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Tips & Tricks For WP-Polls
« Reply #15 on: 03 October 2007, 20:00 »
does ur server support php in the first place? you might want to ask your host about this.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #16 on: 04 October 2007, 02:43 »
Wow... How do you use WP then?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline esta2

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #17 on: 14 July 2008, 15:52 »
I have found a new tip: "Polls with images". it is very easy. You can use html tags in field answers. For example:

Answer1:Car <br/><img src="htpp://url/Photo_car">
Answer2:Tree <br/><img src="htpp://url/Photo_tree">


Offline Grumps

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Tips & Tricks For WP-Polls
« Reply #18 on: 29 November 2008, 18:50 »
Hey guys I'm new here and I'm really interested in finding out how to display WP-Polls outside wordpress. I've tried manual integration but ajax fail to work. Can anyone explain where do I have to place those functions in the first post?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Tips & Tricks For WP-Polls
« Reply #19 on: 30 November 2008, 05:39 »
That is not possible because your browser will block the AJAX request due to the different URL/domain for security reasons.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.