Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default String Replace at Intervals support

    String Replace at Intervals has been submitted to Free Addons and should be available soon.

    This is a coding utility which can be used to modify output strings. For example, you can add a <br /> or classname to every third occurrence of an element for formatting. This can be changed (dynamically, even) without touching the original generator.
    There is also a version of the function which can handle single-level arrays as if they were strings, except that the string to be replaced cannot span across array element boundaries.

    * You can replace every nth occurrence of a search string with another string.
    * You can start replacement at any occurrence of the search string.
    * You can start looking for occurrences of the search string at any position in the base string.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

  3. #3

    Default Re: String Replace at Intervals support

    hello

    what is the use of this add-on?

    thanks


  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: String Replace at Intervals support

    Probably most commonly, you could add a line break or clearing element at desired intervals to make a plain list of automatically generated items wrap cleanly at every third, fourth or whatever item. Or it could be used to give a different style to the elements that will be first or last in each row of a multi-row listing.

  5. #5
    Join Date
    Jan 2008
    Location
    Toronto
    Posts
    72
    Plugin Contributions
    0

    Default Re: String Replace at Intervals support

    Could this plugin be used to generate "Dynamic" attributes? In other words - based on one attibute selection the next attribute would change to a different name/value (And Price!)
    Or would there be a better way to do this?
    Last edited by polygone; 10 Jan 2012 at 04:28 PM. Reason: correction
    New Zenner

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: String Replace at Intervals support

    No, this would not have anything to do with making attribute dependencies. For that you need javascript that interacts with the code. All this does is manipulate an output string.

  7. #7
    Join Date
    Feb 2011
    Location
    Hong Kong
    Posts
    29
    Plugin Contributions
    1

    Default Re: String Replace at Intervals support

    I've studied this utility thoroughly, but being a newby at this, I can not find how to use it.
    My menu is generated by means of the UL-generator, and what I would like is to have a clear:both inserted at the 5th and every following level2 of the menu... but how do I apply this module to do so?

    See the pix (the frames are there for me to see what's happening when I change things)

    I'm setting up a fixed menu on the home page (it's basically the dropdown menu without the drop down)

    I now use 5 categories for testing, but in real life the site will have approx 20 categories.

    In this case the Category 5 should be under Category 1;
    How do I achieve this with your module?
    I have no clue how and where to call it, and where to enter the variables...
    Thanks in advance.

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  2. CSV Export on regular intervals to SellerExpress/FTP address
    By Slappybag in forum General Questions
    Replies: 0
    Last Post: 4 Sep 2013, 11:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR