Jump to content

[Module] Free Banners 1.1 for Prestashop 1.4.x with NivoSlide


devsoft
 Share

Recommended Posts

  • 1 month later...

Banners 1.0 with NivoSlide Module for Prestashop 1.4.x avaible.

Changes :

-Banners 1.0

1. Fix uninstall problem.

2. Fix blank images in configure.

3. Fix translation problem.

4. Add Spanish translation (thank you Dimar).

- Banners 1.0 RC1 :

1. multilanguage :

- name

- description

- photos

installation :

1. install as normal module.

Now under your tab you can add photos.

Download url : http://www.presta-mo....cc/prestashop/

if you have problem please check url in you browser.

38308_un8ocsEq4KxG1x2mYOUU_t

38309_2CfWDXrUKQvC9A313E8y_t

38310_EKqnaC2OVrH2PspHNkYH_t

38311_fZN8jk9knwZDeihmELfH_t

38312_IlFjebfTV4g5N3wu5JFB_t

banners.zip

  • Like 5

Share this post


Link to post
Share on other sites

Thanks.. can it work with 1.3.6?


great but Banners 1.0 RC1 doesn't work with current 1.3.6 unfortunately.

Julien Breux wrote a tutorial about creating automatically tab on module install.
http://www.julien-breux.com/2009/08/22/tutoriel-prestashop-creer-un-module-avec-onglet/

32 caracters max is too short for url, else should not be required

Image displayed but slideshow not working, tested on PS1.4.0.3

Share this post


Link to post
Share on other sites

version 1.0 RC2 is only for prestashop 1.4.X

1.0 RC2 :
- longer url characters
- easy installation (@jolvil - thank you for link)

just tested on clean 1.4.0.12 and it works

version 0.7/0.8 is for 1.3.X

0.8 RC
- longer url characters
- easy installation

Share this post


Link to post
Share on other sites

Install is OK now with 0.8! slideshow is working
but the name of tab in Tools shows only "n" and there is no icon showed.

Interesting features:

- It could be nice to have ability to show or not title, description, link on image (now it's not posible).

- Setting differents slides effects as a dropdown list in BO

Share this post


Link to post
Share on other sites

0.8RC

- correct tab name

- added icon


Thanks works fine now :-) great job

Only missing features, for those who dont' want to show title and description comment in bannershome.tpl or others tpl
{$banner.name}{$banner.description}



I did a french translation but some parts are not tranlated
Effects
Image width
Image heigh

and translation doesn't work in banners tab form (when click new)

fr.php

  • Like 1

Share this post


Link to post
Share on other sites

If you upload your images in banners section under tools tab imges should show on your home/left side/right it depends on your hook type.

I've just tested on clean 14013 on my local and it works.

Image from your config section shows like urls for css are not correct you can check it with firebug if module css and js file load correct.


@jolvil - thank you for translation I'll add it in next upgred as I'm busy now.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

uninstall module delete tables manuale if they exists ps_banners ps_banners_lang


edit banners.phpand change line 52 to
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'banners` (
line 61 to
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'banners_lang` (

and install

do not copy/paste use yours brackets!

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Hello again,

I had tried with 1.4.0 estable and do not work.
i had change the DB_prefix and appears this error:

Warning: Invalid argument supplied for foreach() in /usr/home/domain/web/modules/banners/banners.php on line 183

Warning: Invalid argument supplied for foreach() in /usr/home/domain/web/modules/banners/banners.php on line 183

Warning: Invalid argument supplied for foreach() in /usr/home/domain/web/modules/banners/banners.php on line 183

Warning: Invalid argument supplied for foreach() in /usr/home/domain/web/modules/banners/banners.php on line 183

Warning: rmdir(/usr/home/domain/web/modules/banners/../../img/banners/1) [function.rmdir]: No such file or directory in /usr/home/manitas1907.com/web/modules/banners/banners.php on line 191
how can i fix this problem?
I had tried to uninstall and appears this warning and it do not uninstalling.
please help me....

Thanks

Share this post


Link to post
Share on other sites

hi ... my db prefix is ps_table

i have installed this module is create the 2 tables ps_banners and ps_banners_lang but when i try to add banner i get this
message

Richiesta SQL non valida

I have tried to unistall it a few times but the same

Share this post


Link to post
Share on other sites

  • 3 weeks later...

If you have problem with uninstallation


Go to your img folder delete banners folder if exists.
Go to your phpmyadmin drop tables (yourprefix)banners (yourprefix)banners_lang (only if any other module use this tables names)
edit Banners.php under /modules/banners/ and change unistall function to

public function uninstall()
   {
       foreach ($this->settingshome AS $set){
           Configuration::deleteByName($set['title']);
               }

               foreach ($this->settingsleft AS $set){
           Configuration::deleteByName($set['title']);
               }

               foreach ($this->settingsright AS $set){
           Configuration::deleteByName($set['title']);
               }

   if(!parent::uninstall() OR !$this->uninstallModuleTab('AdminBanners'))
       return false;

 return true;

   } 




And unistall as normal.

This uninsallation instuction should work in any problems with module unistallation

Share this post


Link to post
Share on other sites

Thank you for sharing this great module. I tried on Prestashop v1.4.0.17 . Firstly, everything works ok, but when I try to uninstall it gives error
"The following module(s) were not installed successfully: banners"

and I have some suggestions.
1. Configure Page is perfect but don't use different page for adding images. Can you merge it. For example, if i haven't read your forum message carefully, I couldn't find tools->banners tab. You can use this one in the configure page.
2. Make option for caption. Maybe someone don't want to use captions. For me, I don't want to use captions, just images is enough for me.

Share this post


Link to post
Share on other sites

Hi

Try couple times again uninstall. If it doesn't work use solution (post before)

As I remember if you don't add description it won't show up.




There is image missing under tools/banners so edit /banners/AdminBanners.php change line 68 to

'.$this->l('Banners').'

Share this post


Link to post
Share on other sites

Thanks Devsoft for your contribution. I will try to translate it into Spanish, as a way of thanks.


2. Make option for caption. Maybe someone don't want to use captions. For me, I don't want to use captions, just images is enough for me.


It can, changing captionOpacity to 0 (zero), and it works

EDIT:

Here is the translation into Spanish. Thanks!

NOTE: Do not know why not translate the part where you add the image and the title and description. O.o

es.zip

Share this post


Link to post
Share on other sites

Banners 1.0 for Prestashop 1.4.X Changes :

1. Fix uninstall problem.
2. Fix blank images in configure.
3. Fix translation problem.
4. Add Spanish translation (thank you Dimar).

Download first page.

Share this post


Link to post
Share on other sites

  • 2 weeks later...
Thank you for sharing this great module. I tried on Prestashop v1.4.0.17 . Firstly, everything works ok, but when I try to uninstall it gives error
"The following module(s) were not installed successfully: banners"



Hi!

I had the same problem, and after many laps I found that the problem is that if you uninstall the module, you must remove ALL the img/banners there and then if it works.

I think in the latest version corrects this error

Share this post


Link to post
Share on other sites

Hi devsoft

Apparently there is an error with the BackOffice images that are not shown, the file: jquery-ui-1.8.9.custom.css

I changed all the images:

.ui-widget-content { display:block; border: 1px solid #a6c9e2; background: #fcfdfd url(/images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }

By:

.ui-widget-content { display:block; border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }

Just remove the slash sloped, and was solved for me.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

theoric, it is a very good module actually. but I can't bring it to work correctly.

the problem with the css at the backoffice
the problem with the IE Browser

would you as the developer of this module repair it?

EDIT:

Sorry for the previous post to the developer and other Member.
I have to correct it, that this module works in safari 5 firefox 4 and of course in internet explorer 8 and 9.
you only have to correct the jquery-ui-1.8.9.custom.css file in folder /modules/banners/css like the post number 32 from Dimar. I tried his solution but it still didn't work.

so you need to rename all:

url(/images/



to:

url(../images/



too bad that it doesn't work in IE7

thanks alot to the developer who made this module for free!

Share this post


Link to post
Share on other sites

Please those who have problems, make them clearer so that they can help. If you do not say what the problem is I doubt anyone is encouraged to help.

devsoft apparently there is a conflict with firefox, when you are filling out a form, and you want to edit a text, is complicated return to the left and right keys.

When you press the keys (arrow) left and right, the animation is active in the Banners module.

Prestashop 1.4.1

Share this post


Link to post
Share on other sites

Then what is the solution to work with IE?


I don't understand, why this module doesn't work with yours?
I tested it on my windows vista pc using IE8 IE 9, Firefox 4 and mac os (safari and firefox) and it works well except with ie 7 on windows pc.
did I make something right during the installation or did you do something wrong during the installation process.

anyway I only have one problem, which is, if I want to delete one or some entries from the list in the Banners tab, I got this error (see attachment) it's not worse because I can still disable instead of deleting it. I think it is due the file permissions. because all images upload by this module are owned by apache. and if I want to delete the images from the ftp. it is such a pain, because I have to do it per shell script.

otherwise, there is nothing to complain.

EDIT due the deletion problem:

strangely, if i delete the entry by pressing the TRASH ICON at the right side, it works, but if I want to delete multiple entry by checking some and the click the button at the end, I got that error. but as I said, I can live with this bug :)

46613_1HeUaJHMD2Ysn5tf68be_t

Share this post


Link to post
Share on other sites



devsoft apparently there is a conflict with firefox, when you are filling out a form, and you want to edit a text, is complicated return to the left and right keys.

When you press the keys (arrow) left and right, the animation is active in the Banners module.

Prestashop 1.4.1


I answer myself:

Must disable the option: keyboardNav in FALSE

Share this post


Link to post
Share on other sites

anybody got a valid download link for this?


Unfortunately the module's website is down. If anyone wants, I can upload the module with some changes that I had to make, as it presented some problems to see the images.

I tested this module in Firefox 3.16.17 - Chrome - IE and not had significant operational problems. Under Prestashop 1.4.1

Share this post


Link to post
Share on other sites

anybody got a valid download link for this?


Unfortunately the module's website is down. If anyone wants, I can upload the module with some changes that I had to make, as it presented some problems to see the images.

I tested this module in Firefox 3.16.17 - Chrome - IE and not had significant operational problems. Under Prestashop 1.4.1



Sure I be most appreciative!

Share this post


Link to post
Share on other sites

anybody got a valid download link for this?


Unfortunately the module's website is down. If anyone wants, I can upload the module with some changes that I had to make, as it presented some problems to see the images.

I tested this module in Firefox 3.16.17 - Chrome - IE and not had significant operational problems. Under Prestashop 1.4.1



Sure I be most appreciative!


Here it is.

I had to put the exact web address of the image address, so they could see in IE 8. See lines 61 - 87 and 101 of the file: bannersleft.tpl

banners v1.0.zip

  • Like 1

Share this post


Link to post
Share on other sites

anybody got a valid download link for this?


Unfortunately the module's website is down. If anyone wants, I can upload the module with some changes that I had to make, as it presented some problems to see the images.

I tested this module in Firefox 3.16.17 - Chrome - IE and not had significant operational problems. Under Prestashop 1.4.1



Sure I be most appreciative!


Here it is.

I had to put the exact web address of the image address, so they could see in IE 8. See lines 61 - 87 and 101 of the file: bannersleft.tpl


thx to Dimar, i install yours, but nothing display in FO. i currently use 1.4.2.5. thx.

Share this post


Link to post
Share on other sites

anybody got a valid download link for this?


Unfortunately the module's website is down. If anyone wants, I can upload the module with some changes that I had to make, as it presented some problems to see the images.

I tested this module in Firefox 3.16.17 - Chrome - IE and not had significant operational problems. Under Prestashop 1.4.1



Sure I be most appreciative!


Here it is.

I had to put the exact web address of the image address, so they could see in IE 8. See lines 61 - 87 and 101 of the file: bannersleft.tpl


thx to Dimar, i install yours, but nothing display in FO. i currently use 1.4.2.5. thx.



Hello, this in Tools > Banners

Share this post


Link to post
Share on other sites

anybody got a valid download link for this?


Unfortunately the module's website is down. If anyone wants, I can upload the module with some changes that I had to make, as it presented some problems to see the images.

I tested this module in Firefox 3.16.17 - Chrome - IE and not had significant operational problems. Under Prestashop 1.4.1



Sure I be most appreciative!


Here it is.

I had to put the exact web address of the image address, so they could see in IE 8. See lines 61 - 87 and 101 of the file: bannersleft.tpl


thx to Dimar, i install yours, but nothing display in FO. i currently use 1.4.2.5. thx.



Hello, this in Tools > Banners


so i see a screen that allows us to manage setting for hook home hook left and hook right- where do you input banner images? in the tpl file?

Share this post


Link to post
Share on other sites

  • 2 months later...
  • 2 weeks later...

Hi all,

 

good module. I got a JS error in IE 6 and IE 7 and the slider was not working (and had not tried on IE 8 or IE 9).

 

I have fixing the following at bannershome.tpl (around line 20):

 

captionOpacity:{$captionOpacity}, //Universal caption opacity

 

should be change to:

captionOpacity:{$captionOpacity} //Universal caption opacity

 

That is, removed the unnecesary comma as that is the list item in the list. This is a typical mistake that causes JS erros in IE.

 

Thanks for the module.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Hi Guys,

 

I downloaded the zip file from topic #53 and I tried to install it with prestashop version 1.4.4.0. The installation fails with error "There was an error during the extraction module (the file may be corrupted)".

 

I repeated the operations (donwload+ installation) four times but the same error occurs.

 

Someone can help me ?

 

Thank you so much

Share this post


Link to post
Share on other sites

Hi I have problem that its sayes bad SQL query. Don´t you know how to fix it? And after if I just try to add new and I click on save it write this: banners (Table 'd8046_4judo.ps_banners' doesn't exist). Can you help me to fix it please?

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Tested and updated for 1.4.5.1

 

- added footer hook

- added top hook

- correct IE display

- correct image size

- remove link back

- should now work a little faster.

 

If you don't want to use module for all transplant remove it from module positions, This will make your website works a little faster.

 

Download - first page.

Share this post


Link to post
Share on other sites

Hi devsoft. very, very nice! Easy to install, no problems at all on 1.4.5.1

 

One question. Maybe i´m small minded, but how to make the module "work" in all languages without uploading every picture again on every language?

Share this post


Link to post
Share on other sites

@aqueron - Thank you. Solution for you : edit modules/banners/banners.php

@holle75 - this will be first thing to do in next update

 

 

change function hookTop to this

 

   function hookTop ($params)
   {
    global $smarty,$cookie;

   $page = str_replace(  __PS_BASE_URI__, '', $page);

  if($page == 'index.php')
  {
	  $hook = 'top';

	  $bannerstop = Db::getInstance()->ExecuteS('
	  SELECT * FROM `'._DB_PREFIX_.'banners` b
	  LEFT JOIN `'._DB_PREFIX_.'banners_lang` bl ON (b.id_banners = bl.id_banners)
	  WHERE bl.id_lang = '.intval($params['cookie']->id_lang).'
		    AND b.`hook` = "'.$hook.'" AND b.`active` = 1 AND bl.name != ""');
    if($bannerstop){
	    $smarty->assign(array( 'bannerstop' => $bannerstop ));

	   foreach ($this->settingstop AS $set) {
		  $smarty->assign(array( $set['title'] => Configuration::get($set['title']) ));
	   }

	  $smarty->assign('lang', intval($params['cookie']->id_lang));

	  $smarty->assign('this_path', $this->_path);
	  return $this->display(__FILE__, 'tmp/bannerstop.tpl');
   }
 }
   }

Share this post


Link to post
Share on other sites

@aqueron - Thank you. Solution for you : edit modules/banners/banners.php

@holle75 - this will be first thing to do in next update

 

 

change function hookTop to this

 

function hookTop ($params)
{
	global $smarty,$cookie;

   $page = str_replace(  __PS_BASE_URI__, '', $page);

  if($page == 'index.php')
  {
	  $hook = 'top';

	  $bannerstop = Db::getInstance()->ExecuteS('
	  SELECT * FROM `'._DB_PREFIX_.'banners` b
	  LEFT JOIN `'._DB_PREFIX_.'banners_lang` bl ON (b.id_banners = bl.id_banners)
	  WHERE bl.id_lang = '.intval($params['cookie']->id_lang).'
			AND b.`hook` = "'.$hook.'" AND b.`active` = 1 AND bl.name != ""');
	if($bannerstop){
		$smarty->assign(array( 'bannerstop' => $bannerstop ));

	   foreach ($this->settingstop AS $set) {
		  $smarty->assign(array( $set['title'] => Configuration::get($set['title']) ));
	   }

	  $smarty->assign('lang', intval($params['cookie']->id_lang));

	  $smarty->assign('this_path', $this->_path);
	  return $this->display(__FILE__, 'tmp/bannerstop.tpl');
   }
 }
}

 

thanks for your code, devsoft but if i change for this don´t show nothing in browser. The module don´t show in home or other pages into the site. Something it´s wrong.

 

I usually use firebug to find errors but the code don´t show and i don´t know why.

 

When i use the code without the change works fine in the site and i try to change this to view in the center of web:

 

margin: 10px 0 10px -260px; (in modules/banners/tmp/bannerstop.tpl #slider-wrapper-top)

 

For this:

 

margin: 10px 0 10px 0;

 

But the module always show in the same position 10px 0 10px -260px

 

Somethig theory?

Thanks a lot for your time and your contribution in this forum... and sorry for my bad english, i hope you understand me!

Share this post


Link to post
Share on other sites

forget to past one line :

 

 

function hookTop ($params)
	{
			global $smarty,$cookie;
	  $page = $_SERVER['PHP_SELF'];
	   $page = str_replace(  __PS_BASE_URI__, '', $page);
	  if($page == 'index.php')
	  {
			  $hook = 'top';

			  $bannerstop = Db::getInstance()->ExecuteS('
			  SELECT * FROM `'._DB_PREFIX_.'banners` b
			  LEFT JOIN `'._DB_PREFIX_.'banners_lang` bl ON (b.id_banners = bl.id_banners)
			  WHERE bl.id_lang = '.intval($params['cookie']->id_lang).'
							AND b.`hook` = "'.$hook.'" AND b.`active` = 1 AND bl.name != ""');
			if($bannerstop){
					$smarty->assign(array( 'bannerstop' => $bannerstop ));

			   foreach ($this->settingstop AS $set) {
					  $smarty->assign(array( $set['title'] => Configuration::get($set['title']) ));
			   }

			  $smarty->assign('lang', intval($params['cookie']->id_lang));

			  $smarty->assign('this_path', $this->_path);
			  return $this->display(__FILE__, 'tmp/bannerstop.tpl');
	   }
	 }
	}

 

 

now should be only on homepage

  • Like 1

Share this post


Link to post
Share on other sites

forget to past one line :
 function hookTop ($params) { global $smarty,$cookie; $page = $_SERVER['PHP_SELF']; $page = str_replace( __PS_BASE_URI__, '', $page); if($page == 'index.php') { $hook = 'top'; $bannerstop = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'banners` b LEFT JOIN `'._DB_PREFIX_.'banners_lang` bl ON (b.id_banners = bl.id_banners) WHERE bl.id_lang = '.intval($params['cookie']->id_lang).' AND b.`hook` = "'.$hook.'" AND b.`active` = 1 AND bl.name != ""'); if($bannerstop){ $smarty->assign(array( 'bannerstop' => $bannerstop )); foreach ($this->settingstop AS $set) { $smarty->assign(array( $set['title'] => Configuration::get($set['title']) )); } $smarty->assign('lang', intval($params['cookie']->id_lang)); $smarty->assign('this_path', $this->_path); return $this->display(__FILE__, 'tmp/bannerstop.tpl'); } } } 

now should be only on homepage

 

Great!!

Thank you very much!!

 

Now I only need the correct position in the center of web deleting the margin left -260px

When I can solved I posted it the solutions.

 

See you!

Share this post


Link to post
Share on other sites

-260px this is just for default theme find it and change to 0 then clean cache delete files UNDER

tools/smarty/compile

tools/smarty/cache

 

now works great!! I don´t know the smarty tools could make this

thanks again devsoft!!

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 3 weeks later...