Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2009-01-22 15:23:58

MikeTheVike
Member
Registered: 2008-06-17
Posts: 47

Re: [archived] pap_xpoll (multiple poll plugin)

This thread is really old, but I thought I would post my questions just in case…

I have the polls working, but I don’t think the language file is working, because instead of seeing “Total Votes:” I’m seeing “total_votes:”. other text parts have underscores instead of spaces as well. The instructions say to copy the language file to the “lang” directory, but I already had a file by that name in there, and didn’t want to mess anything up. How do I get the new languages working?

Offline

#98 2010-05-20 21:39:00

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: [archived] pap_xpoll (multiple poll plugin)

Is someone still using this plugin?
I have a problem get it to work with clean urls. The link “View votes” doesn´t show up the appropriate results
url?results=1 isn´t aiming to the right url …
Has someone else this problem or has someone else a solution for this problem?

Offline

#99 2010-06-21 11:10:34

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: [archived] pap_xpoll (multiple poll plugin)

pff.
There is some way to stylize result form? when i apply a class or not to result form, all divs are crashing..
there is no one normal poll?((((


<txp:txp_me />

Offline

#100 2010-06-24 04:58:48

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: [archived] pap_xpoll (multiple poll plugin)

This is normal view, before voting : http://img576.imageshack.us/f/screen1sh.jpg/

This is after: http://img401.imageshack.us/f/screen2jx.jpg/

how to style results? pls help…


<txp:txp_me />

Offline

#101 2010-07-06 16:26:55

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: [archived] pap_xpoll (multiple poll plugin)

hmmmm… no one don’t use this plugin??? i can stylize results.. i dont know how…


<txp:txp_me />

Offline

#102 2010-07-06 16:49:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [archived] pap_xpoll (multiple poll plugin)

Hi Ziya,

Archived plugins are not supported and as such alternative solutions should be used whenever available


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#103 2010-07-06 17:01:29

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: [archived] pap_xpoll (multiple poll plugin)

colak wrote:

Hi Ziya,
bq. Archived plugins are not supported and as such alternative solutions should be used whenever bq. available

i can use your adviced plugin as a standart poll pluin without stars?)


<txp:txp_me />

Offline

#104 2010-07-06 18:05:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [archived] pap_xpoll (multiple poll plugin)

Katalonian wrote:

i can use your adviced plugin as a standart poll pluin without stars?)

You’ll have to ask JM, the plugin’s author for that. Maybe a question in the plugin’s thread will return a satisfactory answer for you.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#105 2010-12-27 08:32:22

ark-a-dva
New Member
Registered: 2010-12-27
Posts: 2

Re: [archived] pap_xpoll (multiple poll plugin)

In PHP 5.3.0 ereg_replace is deprecated

ERROR: “Function ereg_replace() is deprecated on line 317”

314 $regexp = '[?&]results=[0-9]+';
315 $replace = '';
316 $httpreferer = ereg_replace($regexp, $replace , $httpreferer);

fix it by this way:

314 $regexp = '#[?&]results=[0-9]+#';
315 $replace = '##';
316 $httpreferer = preg_replace($regexp, $replace , $httpreferer);

Offline

#106 2011-02-11 07:59:34

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: [archived] pap_xpoll (multiple poll plugin)

Oi Oi – I just upgraded a site to 4.3 which was using this plugin and got the following errors:

The First error is a ‘Undefined Variable’ and is something to do with safe_row

$rs = safe_row("ext, h", "txp_image", "id='$id' limit 1");

So I changed this to:

$rs = safe_row('ext, h', 'txp_image', 'id="$id" limit 1');

And it works :) – why is that?

The Second error is an ‘Undefined Index’ (poll & results) on this line

if ((!isset($_REQUEST['option']) | $_REQUEST['poll'] != $xpoll_data['poll']) && (!isset($_REQUEST['results']) | $_REQUEST['results'] != $xpoll_data['poll']) && $xpoll_data['votecookies'] != 'no' && $xpoll_data['voteip'] != 'no' && $xpoll_data['blocked'] != 'yes' && $xpoll_data['started'] == 'yes' && $xpoll_data['expired'] == 'no' && $xpoll_data['voting'] == 'yes') {

And I think its to do with $_REQUEST[‘poll’] and $_REQUEST[‘results’].

I tried to wrap it with isset (don’t laugh :)) and also found out that $_REQUEST is not a good idea – so tried this code to it use $_GET and $_POST

$_REQUEST = array_merge($_GET, $_POST);

But that didn’t work :(

So I settled on putting a @ before – @$_REQUEST[‘poll’]

Which works :) but I’d like to know why it is wrong in the first place and how to fix it if anyone has the time.

Not a biggy – but if anyone has time to explain :)

Thanks

Offline

#107 2011-02-11 10:30:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: [archived] pap_xpoll (multiple poll plugin)

tye wrote:

I changed this to: $rs = safe_row('ext, h', 'txp_image', 'id="$id" limit 1'); And it works :) – why is that?

Because you’ve masked the error :-) Stuff inside single quotes isn’t parsed by PHP so it’s not ‘seeing’ the $id variable any more and therefore can’t complain that it’s not set. A better method would be to revert the quotes to what they were originally and initialise the $id variable somewhere above that line. Not sure of the specifics of the plugin — you don’t want to override this value if it’s an attribute, for example — but the general approach would be:

$id = (isset($id)) ? $id : '';

(or, if desired, you could initialise the id value to something instead of using '')

The Second error is an ‘Undefined Index’ (poll & results) on this line

Same thing applies here. You need to initialise the variables. Instead of using raw $_GET and $_POST you could use TXP’s built in handler function gps() (‘Get/Post Set’)

$option = gps('option');
$poll = gps('poll');

And then wherever you see $_REQUEST['poll'], swap it out with $poll and so forth.

Hope that helps. We’ll make a programmer of you yet :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#108 2011-02-11 10:56:27

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: [archived] pap_xpoll (multiple poll plugin)

Thanks Stef – I’ll try those tomorrow

WARNING – do not hold your breath whilst trying to make me a programmer :)

Offline

Board footer

Powered by FluxBB