RSS - Latest posts Posts Tagged ‘plugin’

Home » Tags » plugin
22Apr
2012

Quick fix for the Social Counter Widget plugin

I’ve been doing some charity work recently and as they will have a social presence the blog was in need of some social media buttons. I thought the Social Counter Widget plugin looked quite nice (after the slightly prettier Social Impact Widget decided to just error when I did not enter a Google plus account – guess you have to go all or nothing for this plugin).

Unfortunately it wouldn’t even install, giving the following error:

PHP Parse error:  syntax error, unexpected $end in 
/(...)/wp-content/plugins/social-counter-widget/scw_stats.class.php on line 73

A quick check revealed that it was a mistyped php open tag on line 70 that caused the problems. If you need to fix it before the plugin author submits an updated version just change “<?” to “<?php” on line 70 of the wp-content/plugins/social-counter-widget/scw_stats.class.php file.

Categories:

25Dec
2010

Zend Application Resource Plugin Loading Issues

Admittedly thinking while feeling feverish is slightly impaired, but it took me a little while to figure this one out… Trying to integrate ZF 1.11 with Doctrine2 to as per this article, I was trying to be a smart-ass and use TS_Resource_EntityManager instead of the ugly looking TS_Resource_Entitymanager.

Unfortunately all this got me was this very unhelpful error:

Zend_Application_Bootstrap_Exception with message Resource
matching "entityManager" not found

It turns out that although the case of the resource name in the application.ini dosn’t really matter the class name does not like mixed case. So had to settle with TS_Resource_Entitymanager as the plugin name.

Categories:

29Jul
2009

Redirect in controller plugin – Zend Framework 1.8

If you need to redirect while inside a controller plugin, for example in preDispatch() here is a quick way to do it:

$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
$redirector->gotoUrl('/login/');

Categories: