artmaker Posted November 27, 2010 Share Posted November 27, 2010 Hallo nice people! My theme included a "prestacuber" slider in it when I installed it. But now I dont know how I can to stop it displaying in a every page except homepage? I tried from admin/modules/positions and Transplant a module/Exceptions files as : (identity.php, history.php, order.php, product.php and breadcrumb.php)... but it dont stop to display in a all pages... Please, give me some advice Thanks in advance Link to comment Share on other sites More sharing options...
rocky Posted November 27, 2010 Share Posted November 27, 2010 I'm not familiar with the module, but you could try adding the following to the top of the TPL file: {if $page_name == 'index'} and the following at the end: {/if} Link to comment Share on other sites More sharing options...
artmaker Posted November 27, 2010 Author Share Posted November 27, 2010 I'm not familiar with the module, but you could try adding the following to the top of the TPL file: {if $page_name == 'index'} and the following at the end: {/if} Hi rocky! Thank you for your reply! I checked out modules tpl but its a empty.. instead there XML files! I added those codes in a empty TPL file and XML files but nothing happened... Is there another way to fix it? Thanks in advance! Link to comment Share on other sites More sharing options...
rocky Posted November 27, 2010 Share Posted November 27, 2010 I guess you will have to edit the PHP file instead, find the hook that writes the code, then add the following to the top of the function: if ($page_name == 'index') { and the following at the bottom: } Link to comment Share on other sites More sharing options...
artmaker Posted November 27, 2010 Author Share Posted November 27, 2010 Hi rocky again! I added this code in a modules PHP as below and tested it in a different places of around the "function hook". But all modules in the admin disappears after this : if ($page_name == 'index') { function hookHome($params) { global $smarty; return $this->display(__FILE__, 'prestacuber.tpl'); } function hookLeftColumn($params) { return $this->hookHome($params); } function hookRightColumn($params) { return $this->hookHome($params); } } ?>} I also copied the "hook" codes from other Cuber modules which works as normal... but nothing happens yet..What do you think it is? Link to comment Share on other sites More sharing options...
rocky Posted November 28, 2010 Share Posted November 28, 2010 You put the code in the wrong place. That module appears to be using the "Homepage content" hook, so it should already only be displayed on the homepage. Did you transplant it to the left or right column? If so use: function hookHome($params) { global $smarty; return $this->display(__FILE__, 'prestacuber.tpl'); } function hookLeftColumn($params) { if ($page_name == 'index') return $this->hookHome($params); } function hookRightColumn($params) { if ($page_name == 'index') return $this->hookHome($params); } } ?> Link to comment Share on other sites More sharing options...
artmaker Posted November 28, 2010 Author Share Posted November 28, 2010 Hi rocky. The module transplanted only to Homepage content (originally) but it displays in everywhere and thats a very weird... I tested with this code too, unfortunately still unsuccessful... I think, it must be something with template files that the module is "hardly integrated" on pages. But I dont know where to start looking... On the other hand I like this modules look but it can be irritating for customers or at least I have to change it displaying a different stuff than Homepage, on products pages. Link to comment Share on other sites More sharing options...
rocky Posted November 28, 2010 Share Posted November 28, 2010 I can't help any more without a link to your site. Link to comment Share on other sites More sharing options...
artmaker Posted November 28, 2010 Author Share Posted November 28, 2010 Here it is. Please, remove the (*) after (d) when you go to address: www.d*mmöbler.com or www.d*mmobler.se Link to comment Share on other sites More sharing options...
rocky Posted November 28, 2010 Share Posted November 28, 2010 I've had a look at your site and the problem is that the PrestaCuber isn't installed as a module. It is hardcoded in the theme. You need to edit themes/smoke/header.tpl and change: to: {if $page_name == 'index'} <script language="JavaScript" src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/images.php">[removed] <embed src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/cu3er.swf?id={1|rand:20}" width="975" height="319" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" base="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/" scale="exactfit" wmode="transparent"></embed> {/if} <script language="JavaScript" src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/images.php">[removed] <embed src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/cu3er.swf?id={1|rand:20}" width="975" height="319" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" base="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/" scale="exactfit" wmode="transparent"></embed> Link to comment Share on other sites More sharing options...
razaro Posted November 28, 2010 Share Posted November 28, 2010 Open header.tpl in your theme folder find this code <script language="JavaScript" src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/images.php"></script> <embed src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/cu3er.swf?id={1|rand:20}" width="975" height="319" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" base="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/" scale="exactfit" wmode="transparent"></embed> and like rocky said put if condition around it {if $page_name == 'index'} <script language="JavaScript" src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/images.php"></script> <embed src="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/cu3er.swf?id={1|rand:20}" width="975" height="319" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" base="{php}echo __PS_BASE_URI__;{/php}modules/prestacuber/" scale="exactfit" wmode="transparent"></embed> {/if} EDIT: was little late and didn't saw your response rocky, you can delete post Link to comment Share on other sites More sharing options...
artmaker Posted November 28, 2010 Author Share Posted November 28, 2010 My fault! I should link to my site from beginning... I dont know how to thank you guys!! This forum would be useless without you! Link to comment Share on other sites More sharing options...
shacker Posted December 8, 2011 Share Posted December 8, 2011 i updated the theme to ps 1.4 http://catalogo-onlinersi.com.ar/en/artplace-prestashop-template/300-smoke-prestashop-template.html 1 Link to comment Share on other sites More sharing options...
artmaker Posted December 8, 2011 Author Share Posted December 8, 2011 i updated the theme to ps 1.4 http://catalogo-onli...p-template.html Thanks for information, I used this theme more than one year! You got a PM from me, so please, check it Link to comment Share on other sites More sharing options...
Recommended Posts