stefan21 Posted June 28, 2016 Posted June 28, 2016 Jim, thank you for your reply. Maybe I should clarify what addon I installed: it's called banner_box_1.2.2 http://addons.oscommerce.com/info/8144 Before installing this addon, there was no drop-down menu in the banner manager. After installing there is a drop-down menu with all languages I installed. I re-installed it twice using my sql-backup and deleting/restoring the added/altered files. Regards stefan Quote
♥kymation Posted June 28, 2016 Author Posted June 28, 2016 Apparently I've forgotten some of the changes that were made to this old module. The module does use the banner language, but only when Rotate Banners is set to True. The static banner function is the stock osCommerce banner function, and that does not pay attention to language. Sorry if that doesn't meet your needs. Regards Jim Quote See my profile for a list of my addons and ways to get support.
stefan21 Posted June 29, 2016 Posted June 29, 2016 Hello Jim, no problem at all ;) We're only humans :lol: Anyway - I'd like to work with this addon. Is there a way to alter it that for every language a static banner is displayed? I mean, what sense does it make to display f.e. a bulgarian or finnish banner for the italien language? Nobody would understand this in Italy. Regards stefan Quote
♥kymation Posted June 29, 2016 Author Posted June 29, 2016 In the module file, line 63 calls tep_display_banner('static', $banner). You would need to change the tep_display_banner() function to recognize the language, or replace the call here with the SQL to retrieve a banner. The latter will be similar to the code in line 72 and following of the module. Regards Jim Quote See my profile for a list of my addons and ways to get support.
stefan21 Posted June 29, 2016 Posted June 29, 2016 Hello Jim, thank you for your answer. As I'm not a programmer your hints are beyond my knowledge. I understand that the following lines should be changed: $module_contents .= tep_display_banner('static', $banner); But I don't know what exactly has to be copied from line 72: $banner_query_raw = " select banners_id, banners_url, banners_image, banners_html_text, status from " . TABLE_BANNERS . " where banners_group = '" . MODULE_BOXES_BANNER_ROTATOR_GROUP_NAME . "' and language_id = '" . ( int )$languages_id . "' and status = 1 order by " . MODULE_BOXES_BANNER_ROTATOR_ORDER . " limit " . MODULE_BOXES_BANNER_ROTATOR_MAX_DISPLAY ; and how much? I'm sorry, I don't want to bother you but could you point me in the right direction? Thank you in advance. Regards, stefan Quote
♥kymation Posted June 29, 2016 Author Posted June 29, 2016 Sorry, but I don't have time to design this for you right now. Regards Jim Quote See my profile for a list of my addons and ways to get support.
stefan21 Posted June 29, 2016 Posted June 29, 2016 (edited) Tried this meanwhile: $module_contents .= tep_display_banner('static', ( int )$languages_id, $banner); Not working. Right now there are two groups and three banners. Two banners are in the same group which matches also the group in the banner box rotator module. Rotate banners is set to false. Interesting thing: the banner which is in another group (I defined it as "footer", which is not the group in the box rotator module) is now also showing up in the box. I have no idea. Edited June 29, 2016 by stefan21 Quote
stefan21 Posted June 29, 2016 Posted June 29, 2016 Crossposting - sorry. That's o.k. Jim, I understand. Thank you anyway for your time. Regards, stefan Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.