Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,105
    Plugin Contributions
    11

    Default Revive Multi-Template For Users?

    Working a project trying to revive this mod but the original support thread is closed. Of the three possible solutions, all have closed support threads and confusing cross links. The link above and the one below are to the Plugins listing for each mod. I am not including the mod that limits its use to regisetered users as I want all to see.

    The idea was to use it to take a non-modded, 1.5.7c (with demo products) and add all the compatible free templates to the admin.

    Old timers will remember the demo.zen-cartDOTat that allowed you to see the different layouts by selecting the template in a sidebox.

    The Multi-Function For Users is the only one of two I found available that worked any at all. The template switch mod has obvious code problems and opens the site with the Classic template.

    The problems I have with the Multi-Template For Users mod is that it does not grab all the overrides and does not allow me to restrict which templates can be selected. There's no reason for anyone to see what 1.5.7c looks like in Classic or template_default in a template demo site.

    Scenario--

    1. Set default template of a 1.5.7c/demo basic install to responsive_classic and do not change it.
    2. Create specific includes/languages/english/html_includes/responsive_classic/define_main_page.php describing the responsive_classic template.
    3. Add latest ZCA Bootstrap template
    4. Create specific includes/languages/english/html_includes/bootstrap/define_main_page.php describing the bootstrap template.
    5. Add files from the Multi-Template For Users mod (NOTE: includes/classes/template_func.php now needs to be merged as the file exists in 1.5.7c See Below)
    6. Go to YOUR_ADMIN >> Tools >> Layout Boxes Controller and edit the user_template sidebox
    7. Set it to ON -- Right -- and a Sort Order of -5 to make sure it's at the top



    Merging includes/classes/template_func.php:
    1. It appears that the differencess in line 36 of the supplied file and existing is an update when we started using PHP5 just as the changes of ereg_replace to preg_replace later in the file.
    2. The actual code needed for operation of the mod is on lines 58-63 of the provided file. That's all that needs to be added as far a I can see.


    Problems:
    1. The list of Templates includes Classic and Template_Default. The template switch mod was supposed to allow you to specify what templates were available. Multi-Template does not.
    2. When switching from responsive_classic to bootstrap, the define_main_page.php of responsive_classic is still used for the main page. The same happens if includes/languages/english/respsonsive_classic/index.php and includes/languages/english/bootstrap/index.php are used.


    What I am looking to get:
    1. The ability to restrict what templates can be selected.
    2. When the template changes, it should adopt all the overrides associated with that template's folders.


    Doing this can allow template creators to showcase free templates. It can also be used commercially but, I would expect those using it that way to throw some coffee at the whoever takes on the project.

    Hoping someone is willing to take this on for the ZC family.
    THANX

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Revive Multi-Template For Users?

    Are you familiar with this:
    https://docs.zen-cart.com/user/templ...ivate_testing/

    You could just remove some of the restrictions that only allow admins to access this feature.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,105
    Plugin Contributions
    11

    Default Re: Revive Multi-Template For Users?

    Could be a winner. It does follow all the overrides.
    Concerned about not revealing the folder names for the template.
    Would probably need to change to Template Name for safety.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Revive Multi-Template For Users?

    Quote Originally Posted by dbltoe View Post
    Could be a winner. It does follow all the overrides.
    Concerned about not revealing the folder names for the template.
    Would probably need to change to Template Name for safety.
    Why? Or rather what would be done differently than what is done for an existing store seeing how the folder name is visible when viewing the source code?

    If it is about the content of the URI, then i would expect that the detection system could use a $_POST instead of $_GET to collect the same data.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,105
    Plugin Contributions
    11

    Default Re: Revive Multi-Template For Users?

    Too much mountain cedar. Down here that's what our posts are made of.

    Off to figure out how to let this happen for all on one site.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Revive Multi-Template For Users?

    Quote Originally Posted by dbltoe View Post
    Too much mountain cedar. Down here that's what our posts are made of.

    Off to figure out how to let this happen for all on one site.
    Funny thing? I thought I might have written something here about which I am otherwise doing an internet search. We had some high winds recently and I now need to fix a wooden fence. Sadly because of that, it took longer than necessary to get the joke...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,105
    Plugin Contributions
    11

    Default Re: Revive Multi-Template For Users?

    So... for this "knows little of PHP guy", would you accomplish this with defining the $original_ip the same as one in Down for Maintenance or try to come up with a wildcard setting in the database configuration table's IP whitelist?

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,105
    Plugin Contributions
    11

    Default Re: Revive Multi-Template For Users?

    I am running out of options here. Figured I could just tell ZC that the incoming IP would be something like 222.222.222.222 and put that in the Down for Maintenance IP.

    Tried setting $customers_ip_address and $_SERVER['REMOTE_ADDR'] and neither of those worked.

    Tried $_SESSION['customers_host_address'] as well with no go.

    Perhaps I am thinking wrong or just in the wrong place.

    Suggestions?

 

 

Similar Threads

  1. Multi-Template Registered Users
    By JTheed in forum Addon Sideboxes
    Replies: 0
    Last Post: 5 Apr 2010, 04:42 AM
  2. Template Selection For Users
    By cse031sust02 in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 29 Mar 2010, 04:27 PM
  3. Replies: 0
    Last Post: 3 Jan 2010, 12:44 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