Template Selector change a template with a querystring?
Tuesday, 07 February 2012 08:33
I need to Change the Plugin and it's Cookie handeling.
Hello there,
I used to work with template chooser 4.01.
With a litle change made in template chooser php
I good make the template change with a link and querystring like this.
index.php?mod_change_template_54=resolutie-1280px"
(_54 is the module id. in joomla.)
and "resolutie-1280px" is the name of the template.
=======================================================================
I also used a script to redirect users to their monitor width.
I would like to use template selector in the same way can any one help me?
----------------------------------------------------------------------------
DATABASE ENTERY:
id------ Template---------Cleint_id--------Home-----Title
7--------1200px-------------0--------------- 1--------1200px - Default
8--------1500px-------------0--------------- 0--------1500px - Default
----------------------------------------------------------------------------
I believe I found the right querystring: to change the template...
index.php?mod_templateselector_80=1500px&&template=1500px
Yes I did!
(80 is my module iD of the templateselecter and 1500px is the name of my template)
But now I need to customize the template selector module so that the cookie also
changes when you use the querystring .
Also did I find out that one template (1500px) switches at ones.
But the other template (1200px) (the standard one) needs to be refreshed twice to switch.
I would really like the devolper of the plugin to look for a way to hack this plugin.
So that I (we) can use this funtion.
I have now solved it bij putting some javascript insite the webpage that reads the
Template style id from the querystring like this.
index.php?mod_templateselector_80=1500px&&template=1500px&&id=8
index.php?mod_templateselector_80=1200px&&template=1200px&&id=7
But that is not pretty.
And also there is a problem with reset and switch it only works
if the initial state of de template selector is active you can make it so by doing a reset.
Than you can switch between the templates and the cookie changes also with the javascript.
You only have to reset ones after that it works oke.
But there is a other problem that it takes twice to change the 1200px (the Standard one)template.
So is there someone who can make the right changes to the plugin?
And let me know?