Jump to content

TAGs block do not hook on displayLeftColumn.


Recommended Posts

Hi there, for some reason the module Tags block (version 1.3.0) do not hook on displayLeftColumn. I tried unhooking it and hooking it again, tried reseting and reinstalling the module - it is shown as hooked on the hook, but would not appear in the frontend. Please check the screenshot. PS is 1.6.1.1 - www.sangado.ro

post-792606-0-82005100-1444032197_thumb.jpg

Link to comment
Share on other sites

Are you using a custom template? If so, you might want to check the template folder for its tpl. If not, turn on debug mode and start by adding  some code in the module's core file, in the hooking method, like d('test');

Hi Nemo1, thanks for the quick response. I use the stock theme, no custom templates. Im not sure what will I achieve with the debug mode/ adding code to the php of the module. All other modules (like categories, seen products, etc) which are usually hooked there, I reinstalled them and rehook - no problems. If I add:

 

public function hookleftcolumn($params)

{

return $this->hookWHATHERE($params);

}

 

to the module - what should I put in the part WHATHERE?

 

Thanks in advance!

Link to comment
Share on other sites

function hookLeftColumn($params)
	{
		if (!$this->isCached('blocktags.tpl', $this->getCacheId('blocktags')))
		{
			$tags = Tag::getMainTags((int)($params['cookie']->id_lang), (int)(Configuration::get('BLOCKTAGS_NBR')));

			$max = -1;
			$min = -1;
			foreach ($tags as $tag)
			{
				if ($tag['times'] > $max)
					$max = $tag['times'];
				if ($tag['times'] < $min || $min == -1)
					$min = $tag['times'];
			}

			if ($min == $max)
				$coef = $max;
			else
				$coef = (Configuration::get('BLOCKTAGS_MAX_LEVEL') - 1) / ($max - $min);

			if (!count($tags))
				return false;
			if (Configuration::get('BLOCKTAGS_RANDOMIZE'))
				shuffle($tags);
			foreach ($tags as &$tag)
				$tag['class'] = 'tag_level'.(int)(($tag['times'] - $min) * $coef + 1);
			$this->smarty->assign('tags', $tags);
		}
		return $this->display(__FILE__, 'blocktags.tpl', $this->getCacheId('blocktags'));
	} 

In blocktags.php replaced with 

function hookLeftColumn($params)
	{
		return $this->display(__FILE__, 'blocktags.tpl', $this->getCacheId('blocktags'));
	}

And the module is displayed. No tags present, but the module is there... So I suppose the issue is outside of the module - some cache or something. Unfortunately cleaning the cache doesnt help. Any ideas?

Link to comment
Share on other sites

Clear cache from the bo and take he code back, it should work. Cache seems stuck

 

Hi Nemo1, cleared the cache from BO - didnt help. cleared the cache with FTP manually - didn't help either. Tried disabling the cache functions altogether and re-anabling it - no change. what should I do? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...