SnatchTease Posted September 21, 2011 Share Posted September 21, 2011 At first it didn't work, but then I say I needed a comma under the last entry 'select' before my new entry. Brilliant work, Jim. Your contributions and this thread have brought me great joy now and in the past. Your continued commitment to the forum and thread is very appreciated. That being said, I have four questions. What changes do I have to make to scroller.php to fit the images between the scroller images? What do I need to do to make it scroll via clicking only? What do I need to do to make it scroll x amount of pixels per click? Pretty much, I'd like it to scroll pages from clicks on the arrows. Finally, can I enlarge the images beyond what's set in the admin 'images' menu? Thanks again, Jim. For everything. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 21, 2011 Author Share Posted September 21, 2011 1. Fit the images where? I don't understand. 2. Automatic scroll is currently the only option. I'll look at the latest version of the scroller library to see if that option has been added, but that will have to wait until my current job is finished. Or you could hack the Javascript yourself. 3. The Manual Scroll Step setting in the module. 4. Find SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT in the module file and replace those constants with numbers. Or replace one with a number and the other with '' to keep the proportions the same. I probably should make those module settings. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
SnatchTease Posted September 21, 2011 Share Posted September 21, 2011 1. I wanted to get the images off the buttons. I found I can either set the padding past 35 in scroller.php under... $header .= '#scroller {' . "\n"; ...and then ditch the border, or I can lower the width in ... $header .= 'div.scrollWrapper {' . "\n"; ...and then center it. 2, 3, 4, spent 13 hrs in threads today, I'll get back to you on those. Thanks again. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 21, 2011 Author Share Posted September 21, 2011 1. It might be easier to replace the images with a transparent image. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
osc_david Posted September 25, 2011 Share Posted September 25, 2011 Hi. I think I have found a small bug in the categories_images.php module of version 1.2.6.. If I configure the number of columns to be 3 and have 3 categories in my store and specify a box style of grid, the module generates invalid HTML. I am getting an extra unmatched </tr> tag just before the </table> which ends the table of categories. It looks as though the code doesn't handle the number of categories being an exact multiple of the number of columns correctly. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 25, 2011 Author Share Posted September 25, 2011 Thanks for the bug report. I'll take a look at that as soon as I have time. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
aftabn10 Posted September 30, 2011 Share Posted September 30, 2011 kymation, as previously stated, this module has helped me out alot so thanks once again! just an issue im currently having with the banner rotator. for some reason in internet explorer the banners i have tend to overlap my header, but in mozilla this displays where it needs to be... im not too sure if any1 can tell me what fix i can put to resolve this issue in the stylesheet... Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 30, 2011 Author Share Posted September 30, 2011 You probably have an image in your header that's taller than the header height specified in your stylesheet. Use FireBug's Inspect Element to see what the settings are and where to find them. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Huroman Posted October 4, 2011 Share Posted October 4, 2011 (edited) I've been working i little with this addon, and suddenly my Front Modular Page - Install Modules gone. I can work only with 2 modules who have been installed. Any ideas why are they gone? Thank you in advance. Edited October 4, 2011 by Huroman Quote Link to comment Share on other sites More sharing options...
Huroman Posted October 4, 2011 Share Posted October 4, 2011 Never mind. This files just appears suddenly "banner_rotator_old.php". Just i deleted it and voilà, everything's fine. [04-Oct-2011 17:41:08] PHP Fatal error: Cannot redeclare class banner_rotator in /Applications/MAMP/htdocs/01-osCommerce/catalog/includes/modules/front_page/banner_rotator_old.php on line 13 Quote Link to comment Share on other sites More sharing options...
RCHobbyAddict Posted October 7, 2011 Share Posted October 7, 2011 Hello, I want to make a module for Modular Front Page, which will include the following product slideshow: http://addons.oscommerce.com/info/7958/v,23 Although the Modular Front Page addon has it's own scroller, but I want the PIM slideshow to be integrated into the modular front page. How should I do that? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 7, 2011 Author Share Posted October 7, 2011 You can use the scroller from this Addon as a template, or any of the other modules if you want. The code that is executed on the front page goes in the execute() method. Don't forget to rename your module so it doesn't conflict with one of the existing modules. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
RCHobbyAddict Posted October 8, 2011 Share Posted October 8, 2011 Yes, I am using the scroller as the template. But I think the script is being run. I just see all the slideshow images with bullets and no slideshow in them. Here is the code: <?php /* $Id: slideshow.php v1.0.1 20110107 Kymation $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class slideshow { var $code = 'slideshow'; var $group = 'front_page'; var $title; var $description; var $sort_order; var $enabled = false; function slideshow() { $this->title = MODULE_FRONT_PAGE_SLIDESHOW_TITLE; $this->description = MODULE_FRONT_PAGE_SLIDESHOW_DESCRIPTION; if( defined( 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS' ) ) { $this->sort_order = MODULE_FRONT_PAGE_SLIDESHOW_SORT_ORDER; $this->enabled = ( MODULE_FRONT_PAGE_SLIDESHOW_STATUS == 'True' ); } } function execute() { global $oscTemplate, $PHP_SELF, $cPath; if ($PHP_SELF == 'index.php' && $cPath == '') { // Set the Javascript and styles to go in the header $header ='<link href="stylesheet.css" rel="stylesheet" type="text/css" />'. "\n"; $header ='<script type="text/javascript" src="ext/slideshow/easySlider1.7.js"></script>'. "\n"; $header ='<script type="text/javascript">'. "\n"; $header ='$(document).ready(function(){'. "\n"; $header ='$("#slider").easySlider({'. "\n"; $header ='auto: true,'. "\n"; $header ='continuous: true'. "\n"; $header ='});'. "\n"; $header ='}); '. "\n"; $header ='</script>'. "\n"; $oscTemplate->addBlock($header, 'header_tags'); function tep_get_slideshow($output='ul', $width, $height) { $slides_query = tep_db_query("select slideshow_name, slideshow_url, slideshow_description, slideshow_image FROM " . TABLE_SLIDESHOW . " order by slideshow_id"); $slides_array = array(); $slides_ul = '<ul>'; while ($slide_values = tep_db_fetch_array($slides_query)) { $slides_array[] = array('slide_name' => $slide_values['slideshow_name'], 'slide_url' => $slide_values['slideshow_url'], 'slide_description' => $slide_values['slideshow_description'], 'slide_image' => $slide_values['slideshow_image']); if($slide_values['slideshow_url']) $slides_ul .= '<li><a href="' . $slide_values['slideshow_url']. '">' . tep_image(DIR_WS_IMAGES . $slide_values['slideshow_image'], $slide_values['slideshow_name'], $width, $height) . '</a></li>'."\n"; else $slides_ul .= '<li>' . tep_image(DIR_WS_IMAGES . $slide_values['slideshow_image'], $slide_values['slideshow_name'], $width, $height) . '</li>'."\n"; } $slides_ul .= '</ul>'; if($output=='array') return $slides_array; else return $slides_ul; } $slideshow = tep_get_slideshow('ul','565','255'); $oscTemplate->addBlock($slideshow, $this->group ); } } function isEnabled() { return $this->enabled; } function check() { return defined( 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS' ); } function install() { tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_FRONT_PAGE_SLIDESHOW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())" ); tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Heading Title', 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS', 'True', 'Do you want to show the heading title?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())" ); } function remove() { tep_db_query( "delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')" ); } function keys() { return array( 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS', 'MODULE_FRONT_PAGE_SLIDESHOW_SORT_ORDER' ); } } ?> Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 8, 2011 Author Share Posted October 8, 2011 You're trying to put a function (tep_get_slideshow) inside a method. That won't work. Try moving your function to a separate file, or make it a separate class method. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
RCHobbyAddict Posted October 8, 2011 Share Posted October 8, 2011 So how should I do that? Your help would be appreciated... :) Quote Link to comment Share on other sites More sharing options...
RCHobbyAddict Posted October 8, 2011 Share Posted October 8, 2011 So do I need to create a a constructor for the same also?? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 8, 2011 Author Share Posted October 8, 2011 You could just make it another method in the existing class, then call it with $this->tep_get_slideshow('ul','565','255') I would get rid of the function call and make the code it contains part of the execute method. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
RCHobbyAddict Posted October 9, 2011 Share Posted October 9, 2011 I am not so knowledgeable in these things. I tried my best. But I am facing problems on Line 47 and 77 <?php /* $Id: slideshow.php v1.0.1 20110107 Kymation $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class slideshow { var $code = 'slideshow'; var $group = 'front_page'; var $title; var $description; var $sort_order; var $enabled = false; function slideshow() { $this->title = MODULE_FRONT_PAGE_SLIDESHOW_TITLE; $this->description = MODULE_FRONT_PAGE_SLIDESHOW_DESCRIPTION; if( defined( 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS' ) ) { $this->sort_order = MODULE_FRONT_PAGE_SLIDESHOW_SORT_ORDER; $this->enabled = ( MODULE_FRONT_PAGE_SLIDESHOW_STATUS == 'True' ); } } function execute() { global $oscTemplate, $PHP_SELF, $cPath; if ($PHP_SELF == 'index.php' && $cPath == '') { // Set the Javascript and styles to go in the header $header ='<link href="stylesheet.css" rel="stylesheet" type="text/css" />'. "\n"; $header ='<script type="text/javascript" src="ext/slideshow/easySlider1.7.js"></script>'. "\n"; $header ='<script type="text/javascript">'. "\n"; $header ='$(document).ready(function(){'. "\n"; $header ='$("#slider").easySlider({'. "\n"; $header ='auto: true,'. "\n"; $header ='continuous: true'. "\n"; $header ='});'. "\n"; $header ='}); '. "\n"; $header ='</script>'. "\n"; $oscTemplate->addBlock($header, 'header_tags'); //line 46 tep_get_slideshow($output='ul', $width, $height) { $slides_query = tep_db_query("select slideshow_name, slideshow_url, slideshow_description, slideshow_image FROM " . TABLE_SLIDESHOW . " order by slideshow_id"); $slides_array = array(); $slides_ul = '<ul>'; while ($slide_values = tep_db_fetch_array($slides_query)) { $slides_array[] = array('slide_name' => $slide_values['slideshow_name'], 'slide_url' => $slide_values['slideshow_url'], 'slide_description' => $slide_values['slideshow_description'], 'slide_image' => $slide_values['slideshow_image']); if($slide_values['slideshow_url']) $slides_ul .= '<li><a href="' . $slide_values['slideshow_url']. '">' . tep_image(DIR_WS_IMAGES . $slide_values['slideshow_image'], $slide_values['slideshow_name'], $width, $height) . '</a></li>'."\n"; else $slides_ul .= '<li>' . tep_image(DIR_WS_IMAGES . $slide_values['slideshow_image'], $slide_values['slideshow_name'], $width, $height) . '</li>'."\n"; } $slides_ul .= '</ul>'; if($output=='array') return $slides_array; else return $slides_ul; } $this->tep_get_slideshow('ul','565','255') // LINE 76 $oscTemplate->addBlock($slideshow, $this->group ); } } function isEnabled() { return $this->enabled; } function check() { return defined( 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS' ); } function install() { tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_FRONT_PAGE_SLIDESHOW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())" ); tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Heading Title', 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS', 'True', 'Do you want to show the heading title?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())" ); } function remove() { tep_db_query( "delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')" ); } function keys() { return array( 'MODULE_FRONT_PAGE_SLIDESHOW_STATUS', 'MODULE_FRONT_PAGE_SLIDESHOW_SORT_ORDER' ); } } ?> Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 9, 2011 Author Share Posted October 9, 2011 I already told you what I would suggest doing with those lines. In any case, you have more problems than that. It appear that there is code missing -- your broken function is returning data that is then thrown away. I don't know how to fix that, and I don't have the time to do this for you. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
CotswoldEngraver Posted October 20, 2011 Share Posted October 20, 2011 hI this contribution looks like just what i need, however I am using v2.2, is is it available for this version anywhere? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 20, 2011 Author Share Posted October 20, 2011 No, and it would be a major undertaking to port it to 2.2. The module code that it depends on was introduced with 2.3. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
ecommforum Posted October 29, 2011 Share Posted October 29, 2011 Hi Jim.....excellent contribution!!!!...thanks a lot for that, very useful, and very easy to work with....its perfect to do lot of things, specially for beginners like me. Here is the Spanish folder, just in case someone has the Spanish language installed, to avoid errors when changing the language in the page. Thanks again catalog.zip Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 29, 2011 Author Share Posted October 29, 2011 Thank you! Translations are always welcome. I'll add that to the next release. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted October 30, 2011 Author Share Posted October 30, 2011 I've uploaded a new version to the usual location. The file is also available from my server until the official upload is approved. This version makes all of the modules multi-language, and fixes some bugs in others. It also includes the previous improvements and translations by others. Thanks to everyone who has helped with code and translations. Of course more translations are welcome, as are fixes and new modules. Regards Jim ecommforum 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted October 30, 2011 Author Share Posted October 30, 2011 All of the modules in this package can also be used in the page header or footer using the Header Footer Content Modules Addon. You will need to move the module and language files to the appropriate directory, then change one line in the module code file from var $group = 'front_page'; to var $group = 'header_footer_contents'; I have used the Categories Images module (with the images turned off) in the Footer as an alternate site navigations system. Works just fine. So if you want a banner rotator in your page header, now that's easy to do. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
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.