pLog Poll Plugin

Postby jondaley on Wed Nov 01, 2006 8:27 am

Yeah - phunkphorce just asked why I had uploaded the changes - he says they are incorrect. So, this plugin wasn't ever updated to 1.1 correctly. I will have to ask the author.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby albert22 on Wed Nov 01, 2006 8:48 am

Fine! I hope you'll let us know when the new version is ready. :wink:
albert22
 
Posts: 25
Joined: Fri Oct 20, 2006 2:33 pm

Postby jondaley on Wed Nov 01, 2006 8:51 am

I looked at it for a bit, but I am not familiar with the new database-independent stuff, so it will take me too long to update the plugin.

Here is the author's original post, where he released it for 1.0:
http://forums.lifetype.net/viewtopic.php?t=2839

I updated the wiki to say it is only for 1.0. Maybe phunkphorce will fix it, otherwise, you will have to wait for Matt/woodzy to update it himself.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby phunkphorce on Wed Nov 01, 2006 6:03 pm

Perhaps all it takes is to replace "NewDataDictionary" with "NewPDbDataDictionary"?
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby jondaley on Thu Nov 02, 2006 4:35 am

hrm - that's what it was before. Maybe you (or someone, not the author) already fixed it from his version.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby albert22 on Sun Nov 05, 2006 6:51 am

I don't get it: does it mean it should work?
albert22
 
Posts: 25
Joined: Fri Oct 20, 2006 2:33 pm

Postby jondaley on Mon Nov 06, 2006 8:15 am

I don't think so. I think the author is using LifeType version 1.0.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby panying on Sat Nov 11, 2006 8:08 am

You should process follow step to make it work :

a) remove the Call-time pass-by-reference has been deprecated warning
In plogpollpolls.class.php change
Code: Select all
return $this->updatePoll(&$poll);

to
Code: Select all
return $this->updatePoll($poll);


in adminplogpolladdpollaction.class.php change
Code: Select all
if (!$pollsmodel->addPoll(&$poll))

to
Code: Select all
if (!$pollsmodel->addPoll($poll))


b)replace the deprecated function
in pluginplogpoll.class.php
change
Code: Select all
$dict = NewDataDictionary($db);

to
Code: Select all
$dict = $db->getDriverDataDictionary();


c)remove controller no view warning
in plogpollregistervoteaction.class.php
change
Code: Select all
header("Location: ". $redir);

to
Code: Select all
include_once( PLOG_CLASS_PATH."class/view/redirectview.class.php" );
       $this->_view = new RedirectView($redir);


d)lifetype is used cache , which may cause vote not update in page.
Maybe best way is clear cache after every vote .
But i use another way .

use

Code: Select all

{if  ($plogpoll neq "")}
<h3>votes</h3>   
{assign var=blogid value=$blog->getId()}
{insert name="getPlogPollHtml" pollvar=$plogpoll pollid=$blogid}
{/if}



to output vote in the template.

And add the following code in pluginplogpoll.class.php :
Code: Select all
function insert_getPlogPollHtml($params)
{
   return $params['pollvar']->generateActivePollHTML($params['pollid']);
}


I will try to release a package later , when i verify everything is properly .
panying
 
Posts: 26
Joined: Mon Sep 25, 2006 11:17 pm

Postby jondaley on Sun Nov 12, 2006 12:07 am

Thanks for your work - please upload your package to bugs.lifetype, so it can get included in the builds.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby panying on Sat Nov 18, 2006 12:42 am

do not test it throughly , but it runs ok on my lt 1.1.1 blog .

upload it for bug 0001121: http://bugs.lifetype.net/view.php?id=1121

if you read chinese , get to there : http://www.pactofshadow.com/lifetype/~n ... le/52.html
panying
 
Posts: 26
Joined: Mon Sep 25, 2006 11:17 pm

Postby panying on Tue Nov 21, 2006 10:29 pm

panying wrote:do not test it throughly , but it runs ok on my lt 1.1.1 blog .

upload it for bug 0001121: http://bugs.lifetype.net/view.php?id=1121

if you read chinese , get to there : http://www.pactofshadow.com/lifetype/~n ... le/52.html


found one bug at feedback .

It will report

Fatal error: Undefined class name 'db' in \plugins\plogpoll\pluginplogpoll.class.php on line 77


a quick fix is add
Code: Select all
include_once( PLOG_CLASS_PATH."class/database/db.class.php" );


before line 77
Code: Select all
$db =& Db::getDb();
panying
 
Posts: 26
Joined: Mon Sep 25, 2006 11:17 pm

Postby pto on Sat Mar 31, 2007 6:19 am

I am using plog1.1 Uploaded poll files. In the admin nothing has appeared automatically. Shall I insert some code in the main templates?
On the frontend side I inserted the code found in the readme file and also extended my CSS files according to the readme.

Frontend produces the following error message:

Smarty error: [in simple_sky/footer.template line 35]: [plugin] could not load plugin file 'insert.getPlogPollHtml.php'
(core.load_plugins.php, line 118)<br/><b>Error code</b>: 256<br/>

Admin side does nothing. Where should it appear on the admin side? Under MANAGE main admin menu?

Thanks for your help in advance!
pto
 
Posts: 5
Joined: Thu Mar 08, 2007 8:09 am

Postby jondaley on Mon Apr 02, 2007 10:17 am

I think the readme is a little bit wrong, I don't think "neq" is a smarty term.
The first line should be:
{if $plogpoll}

That will make your template error go away.

On the admin side, you should go to the plugin center, and hit refresh (if you need to) to make the plogpoll plugin get installed. Once it is installed, it should put a menu somewhere, probably under control center.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby blacksnday on Mon Apr 02, 2007 12:13 pm

jondaley wrote:I think the readme is a little bit wrong, I don't think "neq" is a smarty term.


Yes it is a correct alternative to !=
http://smarty.php.net/manual/en/languag ... ion.if.php
blacksnday
 
Posts: 400
Joined: Sun Jul 18, 2004 5:23 am
Location: Ohio, USA!

Previous

Return to Plugin Development Team

cron