Jump to content

rigadin2

Members
  • Content count

    350
  • Joined

  • Last visited

Everything posted by rigadin2

  1. rigadin2

    [Contribution] STS v4

    Hi everybody, Version 4 is a major release of the excellent STS contribution that you can find here: http://www.oscommerce.com/community/contributions,1524, I started a new thread to not mix with STS v2/v3 questions and because the v2/v3 thread has reached 147 pages! If you have problem with STS v2 or v3, please look here: http://forums.oscommerce.com/index.php?sho...c=58541&st=2920 The main advantages of this release are: - Less code and several improvements, so should be faster.. - All templates are in their own folder, selection of folder is made in admin. Folder choice can be overwritten from URL for testing purposes. - Use of modules for code specific to some pages (product_info.php for example), parameters accessible from admin (like shipping, payment or order total modules). - Write own module for checkout, create account or else: easy to share like payment modules. - Switch STS on/off from admin. When off, you will see your store like it was before STS installation. - Debug mode still available from URL, but with a code defined by admin => works like a password. - If STS is off, using debug mode from URL will turn it on only for you. Useful for testing without disturbing visitors. - Ready for product page caching. Not implemented yet, but doors are open. - Possibility to avoid sorting a big array (speed optimization), by adding a special char at the end of the placeholders, for example "$languages" becomes "$languages#". (Can be different on each template). - Installation is still very easy, modifications only at beginning and end of some files. - Possibility to have a template for header/columns/footer like always + a template for the content area. Useful with product_info: main template comes from the category where the product is, while the content itself is defined according to the product_info template. - All boxes are now also available separately, no need to show specials if you want to show tell a friend box, no need to show best sellers if you want to show product notifications. - Boxes that should not appear on certain pages will have an empty tag => customer won't see the placeholder name (try, in v2.x, $banner without having banner or $languages in checkout process page, you'll see what I mean. - Possibility to write php script in the templates, like in STS v3. - Compatible with templates made for STS v2 or v3 - Compatible with templates made for STS PLUS (STS v4.1 is based on STS PLUS 4.0.7, only few small modifications). STS v4.1 is based on STS PLUS v4.0.7. STS PLUS itself is based on STS v3 but with so many changes in the code that I released it as a separate contribution. Now, after positive feedback from the community and the blessing from the original author, Brian (great contribution, thanks Brian!), the code is back to where it belongs: STS. Changelog from STS PLUS v4.0.7: - UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store. - DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php - UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here. - UPDATED examples in sts_user_code.php. - UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead. - UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates. - UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column. You can also have a look at the STS PLUS thread here: http://forums.oscommerce.com/index.php?showtopic=187122, as many problems you will face have been discussed there. - Rigadin
  2. Hello all, oscThumb is a contribution that uses the open source project phpThumb v1.7.7 to create thumbnails of your images. Instead of sending the full size image to the browser and let the browser resize it, which can seriously slow down the loading time of your pages and look ugly, oscThumb will generate thumbnails and save them in a cache folder on your server, for future use. It uses Imagemagic (if available) or GD library to generate gif, jpg or png thumbnails. In my knowledge, this is the only thumbnailing contribution that can really protect your images agains thieves! Following features are included: Server caching: thumbnails created are saved on the server, no need to re-generate them for each visitor. Automatic cache cleaning function included (size, age, nbr of files). Watermarking: place a text or image watermark on your images to protect them from thieves. Security against URL manipulations: filenames encryption make it impossible to find the original image and URL hash check make it impossible to manipulate URL to display images in original size. Display options: add a frame around your images or buttonize them. New size for product image on product_info.php page, selectable from admin. Easy installation: few files to copy, 3 files to modify. Done. I give you soon the link to the contribution, when it's out of the sandbox. I'm using this contribution with success on few sites already. Have fun, Chris
  3. This is the official support thread for the TinyMCE Anywhere contribution. The contribution can be found here: http://www.oscommerce.com/community/contributions,4852 It includes: - TinyMCE, an excellent wysiwyg editor that works in most browsers. - iBrowser, an excellent image browser/uploader. - Instructions to use tinyMCE anywhere on your site. (Newsletter, email, product description, product image, and more). The tinyMCE configuration code is placed in a central file, so you can change the config in one place and the changes will be reflected directly everywhere you use tinyMCE. An ACA module is available for ACA users.
  4. rigadin2

    [contribution] Simple Template System (sts)

    Hi, First answer Nothing ready for that. You need to calculate the average number of stars to display, then choose the right graphic, then create a new STS tag to dispay this graphic on your template. Good exercise. Second answer (or first answer to the second question) You can use both placeholders, as long as the dutch is empty when english is selected, and vice versa. The best solution would be to follow the osCommerce structure and place all the language-dependent texts inside the language files, using "define". You can then create STS tags or directly echo the defined variable from within your template. - Chris
  5. rigadin2

    [contribution] Simple Template System (sts)

    So far there is no module written to take care of the product listing templates, STS does not do it. The only way is to modify the php code. - Chris
  6. rigadin2

    [Contribution] TinyMCE Anywhere

    In the case of the product image, we use iBrowser only to retrieve the path of the image, because only this path is saved in the database. Alt tag and other formatting parameters have nothing to do here, so they are grayed. These tags are created in the catalog side, on the pages where the product image is displayed, for example by placing the product name in the alt tag. - Chris
  7. rigadin2

    [Contribution] STS v4

    STS is not able to change the informations on the checkout pages, you'll need to modify the pages manually, for example by adding the "order total" listing at the top of the payment page. - Chris
  8. rigadin2

    [Contribution] STS v4

    Looks like you are calling application_top.php twice in login.php, compare your file with an original one. - Chris
  9. rigadin2

    [Contribution] oscThumb

    oscThumb has a cache feature. By default, cached files are stored is in catalog/phpThumb/cache, this directory must be writeable. You can watch there if you have thumbnails or not. There are some options about the cache in catalog/phpThumb/phpThumb.config.php (delete cached files based on age, size, nbr of files). To increase speed, you can reduce the quality of the generated thumbnails (see config parameters). You have to check also other images, like on your home page, can you make them smaller. - Chris
  10. rigadin2

    [Contribution] TinyMCE Anywhere

    You say you store in is directory /shop but there is nothing like this in your configure.php, so can't work. Also, your DIR_FS_DOCUMENT_ROOT is strange. The best way to move a store and have both configure.php files up-to-date is to re-install the store: make a backup of your database, with the file created, replace install/oscommerce.sql and run the install again. After that you'll have a good database and good configure.php. - Chris
  11. rigadin2

    [Contribution] oscThumb

    Are you using some kind of multi-product-image contribution? If not, check in admin/categories.php where the word TABLE_ADDITIONAL_IMAGES is used and remove it.
  12. rigadin2

    [Contribution] oscThumb

    By "No output" do you mean no images or a blank page? Certainly something went wrong when modifying html_output.php . There is one function to rename, and a new one to copy in from the contribution. Best use a file compare program like Beyond Compare or WinMerge. - Chris
  13. rigadin2

    [contribution] Simple Template System (sts)

    There is a difference between ob_clean and ob_end_clean, otherwise there would not be 2 functions (eh eh). Well, ob_clean only empty the buffer, while ob_end_clean destroys the buffer. The difference is important when cascading buffer, because when destroying a buffer the output continues to buffer of higher level, while if only cleaning a buffer, the output continues into the same buffer. STS4 is using cascading of buffers in at least 3 levels, example when infobox template is used: 1st buffer for the GZIP function (standard osc function), 2nd buffer for the infobox, 3rd buffer to read the infobox template. It is difficult to understand, I had to make an example to understand myself, the only difference in parts 1 and 2 are our famous functions. Try it, you'll see that results are different! <?php echo 'Start 1<br>'; ob_start(); echo 'After start1<br>'; ob_start(); echo 'After start2<br>'; $var2 = ob_get_contents(); ob_clean(); // Only clean, without distroying buffer. $var1 = ob_get_contents(); // We get nothing in $var1, because buffer just cleaned ob_clean(); echo 'No more buffering<br>'; echo '1:'.$var1.'<br>'; echo '2:'.$var2.'<br>'; echo '======================================<br>'; echo 'Start 1<br>'; ob_start(); echo 'After start1<br>'; ob_start(); echo 'After start2<br>'; $var2 = ob_get_contents(); ob_end_clean(); // Clean and destroy buffer, so we continue with next buffer $var1 = ob_get_contents(); // Magic, there is something in $var1 ob_end_clean(); echo 'No more buffering<br>'; echo '1:'.$var1.'<br>'; echo '2:'.$var2.'<br>'; ?> The guy who made v4.5.6 did not test in all situations. But he is right that only cleaning is faster than destroying, but it's just not working in all situations. Have to study how to get the speed effect without breaking the layout...
  14. rigadin2

    [Contribution] oscThumb

    About the code for the size (line 126 in oscthumb class v1.0.0): The code mentionned is for images smaller than asked: do we show them bigger or in their original size. The function asked by Frank is in case the image is bigger than asked, that's another story not covered by the class so far, but it would make sense to implement it.
  15. rigadin2

    [Contribution] oscThumb

    @Frank: Image watermark: The watermark directory you see in the image URL is relative to the phpThumb directory, because phpThumb is executed there. Have you experienced problem with this? Maybe that's why Jeebus does not see his image watermarks, but then it means it depends on server configuration. The directory can be moved to a parameter, why not. Image size: Well done, you are right there is something wrong here. Next version coming soon... with newer version of phpThumb, just need time to pack everything together again.
  16. rigadin2

    [Contribution] oscThumb

    What version of osCommerce are you using? Have you just copied the contribution files over your installation? The files delivered with this contributions are for 2.2MS2 version, if you just copy over a 2.2RC1 you'll get this error. It is mentionned in the install instructions to do the changes manually and not overwrite if you have a 2.2RC1, which is at this date the latest version. The best would be to use a file-compare program to merge the changes (believe me, it'll save you millions of hours).
  17. rigadin2

    [Contribution] oscThumb

    Your link is broken due to this forum but I copy-paste and get your image. The link is for a text watermark and it works. I changed to image watermark and it does not work. I then took your image to my test shop and the image watermark is showing up. Have you tried to choose another watermark image from the admin? Which version of the GD library you have?
  18. rigadin2

    [Contribution] STS v4

    Same answer as the post before, when using content template for the product_info.php page, the code to display is not coming from catalog/product_info.php anymore, but from catalog/includes/modules/sts_inc/product_info.php, so the code for PAOT must be placed there, and the result must be placed in a placeholder (an easy way is to remove the old code, paste the new one between $sts->start_capture() and $template_pinfo['optionchoices'] = $sts->stop_capture(), then use $optionchoices on your template but not $optionnames.
  19. rigadin2

    [Contribution] STS v4

    To place elements where you want on the product_info.php page, you have to enable the product info module in admin and create a content template for it. After that you have 3 placeholders to display your attributes: one for title like "options:", one for the name of the options "size, color, ..." and one for the values "L, XL, blue, red", but they won't do what you want. Sorry. You can change the code in catalog/includes/modules/sts_inc/product_info.php to display the options differently. This is how QTPro is doing (stock management for attributes), you can see it in the STS Power Pack.
  20. rigadin2

    [Contribution] oscThumb

    Switch off the filename encryption (in admin, parameter "Encrypt Image Filenames" to False), and switch off the check of the hash in catalog/phpThumb/phpThumb.config.php (parameter "$PHPTHUMB_CONFIG['high_security_enabled']", so hash should not be a problem anymore. But I guess another problem will show up. Please post here the URL of your images, like it happears in the html code, it helps debugging. - Chris
  21. rigadin2

    [contribution] Simple Template System (sts)

    You do not have to make a template for each page, STS needs at minimum the default template (name is defined in admin default STS module, "sts_template.html" by default). If you place a link on your template to contact_us.php page, the link must be relative to the catalog (= to the folder where are all your pages, like index.php), so link should just be "contact_us.php". One remark: it is better to create a new placeholders for your link, or use the tep_href_link function in your template, then place a hardcoded link. Like this you keep the osCommerce functionalities (session ID, url rewrite, ...) - Chris
  22. rigadin2

    [contribution] Simple Template System (sts)

    If you have renamed product_info.php to product.php for example, you also have to rename includes/modules/sts/sts_product_info.php. After renaming this module, open it, change the name of the class, the name of the first method (=the constructor method) and the $this->code variable according to your new name. Your templates should still be named product_info.php.html, but you can also change it in the module if you like. Small explanation: When starting, STS check if it finds a module with the same name as the page. If there is such module, it checks if it is enable or not. If not, it uses the default module. If module is enabled, STS asks the module what template to use by calling the "find_template ()" method of the module. One more thing, you have to rename the language file too, otherwise you'll have warnings in admin. - Chris
  23. rigadin2

    [Contribution] oscThumb

    For the sql error, you have to define your TABLE_ADDITIONAL_IMAGES constant into admin/includes/databases.php, like: define ('TABLE_ADDITIONAL_IMAGES', 'additional_images'), value depending of the real name of the table. The constants you mentionned in the oscthumb class are the configuration parameters you see in admin. You won't see any define(.....) because all these parameters are automatically created in application_top.php . I found a mistake in the installation sql file of this contribution, maybe it's the reason of your problems. Go to Admin > Configuration > Thumbnails, then change "Image Watermark Position" and "Text Watermark Position" to what you want. The default ("Top") value is not recognized, must be "T" once saved. I have discovered few little bugs in my code as well as a new phpThumb version, so I'll release shortly a new version of this contribution. Few bugs: cache cleaning not working correctly when using sub-directories (default) + black background on watermarked gif's + not working when using the includes/local/configure.php file. I have fast tested this new phpThumb and seems to solve the watermarked gif's problem. I tried graphic + text watermark on same gif image: no problem. This new version has some new watermarking features (like graphic watermark scaling), but I'll not implement them right now in this contribution. Also, I think that some features are useless (like watermarking heading images and small images), please comment. If nobody needs, I'll remove them.
  24. rigadin2

    [Contribution] oscThumb

    This is a quite young contribution, I guess you are the first one to try it after me. I'm going to check again the watermark options. For the sql error, it's not related to this contribution, 100% sure.
  25. If you are looking for similar contribution, try oscThumb. Functionalities are same as ImageMagik but it is based on the open-source project phpThumb. One remark for ImageMagik users: the protection of images against thieves is not strong enough, I can get your original images even they are watermarked and path is crypted! If this is critical for you, have a look at oscThumb. - Chris
×