Jump to content
kymation

[Addon] Banner Box for 2.3

Recommended Posts

Hey Jim,

 

Thank you for this great add-on! I have one question about the image size. I have installed Protected Images before this add-on and now all banners in banner box shows up as a square. The width of the info box is 164px and I have 5px padding so the image width is 154px. When I upload picture which is 154x230px large in the box it shows 154x163px image. If I disable overflow: hidden for #bannerRotatorBox in the css I can see the full size image, but it goes over the next boxes content. Can I make the height of the rotator box responsive so that I can upload images with different heights and I can still see the full image?

 

Thank you in advance!

 

Janis

Share this post


Link to post
Share on other sites

It sounds like your Protected Images addon is conflicting with this one. I can't help you with that.

 

I've found that images in osC look and work best when they are square, and all of the small images are the same size. Large images can be different sizes, but they should be larger than the display size on the Products Info page.

 

Regards

JIm


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks Jim for a good add-on.

I use this on http://www.tennisfashion.se/ and have created one to the left and one to the right. I did this by duplication of your mod and creating a new group in addition to box_module. It seems to work well. Isn't this the preferred way. You have mentioned other instructions in previous post.

But I have problems with links, it seems that its necessary to have complete path beginning with http://...

Hope this helps new users

Share this post


Link to post
Share on other sites

The new group is not necessary, since all boxes are in the group "boxes". Otherwise, if it works you've done it right.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I have checed the instructions for this contribution and did not see an answer for the question I have. I have a banner which uses javascript to access the image. I assume I would add the code to HTML text box. When I do this and activate banner, I see the javascript and not the image I expect to see. Is there any additonal code I need to add to make this work

 

Here is the code I am trying to use:

 

 

<script type="text/javascript" data-pp-pubid="b5b1b5731e" data-pp-placementtype="800x66"> (function (d, t) {

"use strict";

var s = d.getElementsByTagName(t)[0], n = d.createElement(t);

n.src = "//paypal.adtag.where.com/merchant.js";

s.parentNode.insertBefore(n, s);

}(document, "script"));

</script>

 

Any help would be appreciated I have also installed modular front page contribution

Edited by PhilPoxon

Share this post


Link to post
Share on other sites

That should actually work. The Generic Box addon would probably be a better choice if that's the only image you want to display. Otherwise I'd have to go do some debugging.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Dear kymation, dear community,

 

In the following file:

catalog/admin/banner_manager.php

 

Found a small misspelling in line 140:

 

if (function_exists('imagecreate') && tep_not_null($banner_extensio)) {

 

Assume it should be:

 

if (function_exists('imagecreate') && tep_not_null($banner_extension)) {

 

All credits to the author. Like the feature.

 

Kind Regards

heranke


Recommended SEO Addons:

Most Important: Header Tags SEO - Ultimate SEO V 2.2d

Recommended Addons:

Also Purchased (AP) Preselection - Contribution 3294

Share this post


Link to post
Share on other sites

That was a bug in the osCommerce 2.3.1 distribution. It's been fixed in the current version, and I need to update the file in this package as well. Thanks for bringing this to my attention.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi,

I don't know whether this issue was already discussed or not... After click on banner on web page the link opens in new window. How and where (perhaps in admin or is it code?) can I set that it would be opened in the same window; so left, right coulmn, header and footer would remain the same, only textarea would changed in the same window?

Regards.

Share this post


Link to post
Share on other sites

Hi.

One question more... I don't see in admin option that banner could be set to a header area (just beneath the header). Only to left and right column. Is that correct? Can you pelase advise me how to add a banner (option with rotator) to the header area.

Thanks and regards.

Share this post


Link to post
Share on other sites

The Banner Box uses the stock osC function tep_display_banner() in catalog/includes/functions/banners.php. You can change this by finding this line:

 

 	  $banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';

 

and changing it to:

 

 	  $banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';

 

This will change the behavior of links for all banners on your site.

 

This box only appears in the left or right column. You could convert it to work with the Header Footer Content Modules addon so it can be used in the header. I may have a module around here that has been converted. I'll take a look when I wake up.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Good morning, Jim:) Thanks a lot for your reply. I will wait for your addon...

Regards.

Share this post


Link to post
Share on other sites

I've updated the release package with this option, and added the instructions to the manual.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi, Jim, again. Great job. I've followed the install instruction for header/footer banner and succesfully installed it. I asume that banner is configured by banner manager in admin. But I can not find in banner module a field for banner group; which would define correct banner in banner manager. There are only fields: Enable/Disable banner module; Sort order; Title link; Content Placement; Content Alignment. I asume that without banner group definition, banner manager can not connect banner with header. Isn't it?

Thanks and regards,

Matjaz

Share this post


Link to post
Share on other sites

This one is a little simpler than the column box. The Banner Group needs to be named hfc_module. I'll add that to the instructions.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi, Jim. Is there a way to set this banner in header or footer only in index.php? Not on every page...

Share this post


Link to post
Share on other sites

Yes. Find this code in the module file:

 

 global $language, $oscTemplate;

if ($banner = tep_banner_exists('dynamic', 'hfc_module')) {

 

and change it to this:

 

 global $language, $oscTemplate, $current_category_id, $PHP_SELF;

if ($banner = tep_banner_exists('dynamic', 'hfc_module') && $PHP_SELF == 'index.php' && $current_category_id == 0 ) {

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello.

We are very close:) Instead of correct banner in header there is now some other one. When I disable in admin new one I get this message:

 

TEP ERROR! (tep_display_banner(static, 1) -> Banner with ID '1' not found, or status inactive

 

How can I get back in header the right banner?

Regards,

Matjaz

Share this post


Link to post
Share on other sites

You need to set the Banner Group that I gave you in your Banner Manager for the correct banner. See the instructions that came with osCommerce on how to use the Banner Manager.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello: I’m very new at this, and I'm feeling a bit lost.

I'm trying to add a Rotating Banner Box to my store on the top of the right column.

I see on this forum the following response when asked how to do this: “The same as any box -- Log into your Admin, then Click Modules, then Boxes. Click the install button, select the module, then click install again. This is all covered in the User's Manual BTW.“

However, I’m stumped. I’ve downloaded the file onto my computer, but I have no idea how to get it to where it needs to go so that I can access it on my Admin page. I've looked in the Banner Manager instructions that came with osC, but I'm not seeing what I need to do.

Can you please give me direction?

Thank you.

Share this post


Link to post
Share on other sites

Unpack the archive file on your computer. You may need to install a program such as 7zip to open the archive file. Once you have the archive unpacked, read the User's Manual in the Read Me directory. That should cover the rest, but ask here if you have any more questions.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thank you so much. I appreciate your help. I will work on this and try to make it work. :rolleyes:

Share this post


Link to post
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

×