[+] MO : homeslider is now replacing editorial in default installation

[-] MO : homeslider bugfix multishop + add samples
[-] MO : blocksupplier updated hookname

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11011 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mMarinetti
2011-12-06 17:53:23 +00:00
parent f2fbf0687b
commit eae123dbeb
9 changed files with 77 additions and 39 deletions
+2 -2
View File
@@ -48,9 +48,9 @@ class BlockSupplier extends Module
{
if (!parent::install())
return false;
if (!$this->registerHook('leftColumn'))
if (!$this->registerHook('displayLeftColumn'))
return false;
if (!$this->registerHook('header'))
if (!$this->registerHook('displayHeader'))
return false;
Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', true);
Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', 5);
+6 -6
View File
@@ -57,10 +57,10 @@ class HomeSlider extends Module
public function install()
{
/* Adds Module */
if (parent::install() && $this->registerHook('home') && $this->registerHook('backOfficeTop') && $this->registerHook('header'))
if (parent::install() && $this->registerHook('displayHome') && $this->registerHook('backOfficeTop') && $this->registerHook('displayHeader'))
{
/* Sets up configuration */
$res = Configuration::updateValue('HOMESLIDER_WIDTH', '550');
$res = Configuration::updateValue('HOMESLIDER_WIDTH', '535');
$res &= Configuration::updateValue('HOMESLIDER_HEIGHT', '300');
$res &= Configuration::updateValue('HOMESLIDER_SPEED', '1300');
$res &= Configuration::updateValue('HOMESLIDER_PAUSE', '7700');
@@ -90,7 +90,7 @@ class HomeSlider extends Module
protected function createTables()
{
/* Slides */
$res = Db::getInstance()->execute('
$res = (bool)Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider` (
`id_slide` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_shop` int(10) unsigned NOT NULL,
@@ -650,14 +650,14 @@ class HomeSlider extends Module
hss.`active`,
hssl.`title`,
hssl.`url`,
hssl.`legend`
hssl.`legend`,
hssl.`description`
FROM '._DB_PREFIX_.'homeslider hs
LEFT JOIN '._DB_PREFIX_.'homeslider_slides hss ON (hs.id_slide = hss.id_slide)
LEFT JOIN '._DB_PREFIX_.'homeslider_slides_lang hssl ON (hssl.id_slide = hs.id_slide)
WHERE id_shop = '.(int)$id_shop.' OR id_shop = 0
WHERE (id_shop = '.(int)$id_shop.' OR id_shop = 1)
AND hssl.id_lang = '.(int)$id_lang.
($active ? ' AND hss.`active` = 1' : ' ').'
GROUP BY hs.id_slide
ORDER BY hss.position');
}
+2 -2
View File
@@ -10,9 +10,9 @@
<ul id="homeslider">
{foreach from=$homeslider_slides item=slide}
{if $slide.active}
<li><a href="{$slide.url}"><img src="modules/homeslider/images/{$slide.image}" alt="{$slide.legend}" height="{$homeslider.height}" width="{$homeslider.width}"></a></li>
<li><a href="{$slide.url}" title="{$slide.description}"><img src="modules/homeslider/images/{$slide.image}" alt="{$slide.legend}" title="{$slide.description}" height="{$homeslider.height}" width="{$homeslider.width}"></a></li>
{/if}
{/foreach}
</ul>
{/if}
<!-- /Module HomeSlider -->
<!-- /Module HomeSlider -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB