4images Forum & Community
4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: Maniac on May 28, 2005, 05:26:15 AM
-
Please forgive me if this has been posted elsewhere, but I cannot find it...
I have created a new template group but I want to test it before I make it live. Is there a way for me to preview the template without having to select it in the settings menu of the admin area?
I tried "index.php?template_dir=NewTemp - but that did not work.
Thanks in advance for any informaton
-
u can try do first two steps from this mod:
http://www.4homepages.de/forum/index.php?topic=6220.0
then in step 2 above:define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$user_template);
insert:if ($user_info['user_level'] >= ADMIN && isset($_GET['tpl']) && !empty($_GET['tpl']) && @is_dir(ROOT_PATH.TEMPLATE_DIR."/".$_GET['tpl']))
{
$user_template = $_GET['tpl'];
}
Then u should be able test it by adding to the url query: tpl=templatename
like this: index.php?tpl=blah
Ah, almost forgot to say that u must be logged in as admin, or change ADMIN to GUEST or USER
-
Thank you :)
-
I've tried the mod and what you suggested a couple of times but keep getting an error.
You basically want me to add the second set of code below the first one, right?
so, find
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$user_template);
and below it add
if ($user_info['user_level'] >= ADMIN && isset($_GET['tpl']) && !empty($_GET['tpl']) && @is_dir(ROOT_PATH.TEMPLATE_DIR."/".$_GET['tpl']))
{
$user_template = $_GET['tpl'];
}
-
Please disregard - I got it to work - it was exactly what I needed...
Much appreciated :D
-
when i do this i get
Notice: Undefined index: user_template in C:\CuSStom.com\www\gallery\includes\sessions.php on line 409
-
when i do this i get
Notice: Undefined index: user_template in C:\CuSStom.com\www\gallery\includes\sessions.php on line 409
pay attention to the instructions ;)
u can try do first two steps from this mod:
http://www.4homepages.de/forum/index.php?topic=6220.0
-
For your information, I did used the instructions as written.
thankyou for ASSuming other wise :evil: :roll:
could it be that i have 1.7.1 :?:
-
I have 1.71 and it worked for me.
Are you logged in as admin when trying. I know I kept trying it out and it wouldn;t work at first - turned out to be that.
One thing that I do before I paste the code from the forums on my files is make sure there are no "strange" characters sneaking by - that has often given me big headaches before.
I use BBEdit and basically select "view invisible elements" and often find thise strange characters... A simple search and replace fixes it.
Hope this helps. Also, could it be that you have another MOD installed in your pages that is affecting this one?
-
For your information, I did used the instructions as written.
thankyou for ASSuming other wise :evil: :roll:
could it be that i have 1.7.1 :?:
if you would followed EXACTLY the instructions, you would not get such error, period. (make sure you didnt mistaken "before" with "after" in step 2)
-
u can try do first two steps from this mod:
http://www.4homepages.de/forum/index.php?topic=6220.0
then in step 2 above:define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$user_template);
insert:if ($user_info['user_level'] >= ADMIN && isset($_GET['tpl']) && !empty($_GET['tpl']) && @is_dir(ROOT_PATH.TEMPLATE_DIR."/".$_GET['tpl']))
{
$user_template = $_GET['tpl'];
}
Then u should be able test it by adding to the url query: tpl=templatename
like this: index.php?tpl=blah
Ah, almost forgot to say that u must be logged in as admin, or change ADMIN to GUEST or USER
Hi V@no .. i try this mood in 4images v 1.6.7 [ with change ADMIN to GUEST.... and my question is ..
how to keep the session with the current template they chose ..
cos after they move to another page ... the 4images get the default template again [ from the setting database ] ?
-
Hi,
i use this small mod to change between different templates in my testgallery
between the sessiontime you can surf on the page in the different style...
http://www.4homepages.de/forum/index.php?topic=1281.msg5463#msg5463
=> only code for global.php is needed... links like index.php?t=new for templatefolder: new
Kurt
-
Hi,
i use this small mod to change between different templates in my testgallery
between the sessiontime you can surf on the page in the different style...
http://www.4homepages.de/forum/index.php?topic=1281.msg5463#msg5463
=> only code for global.php is needed... links like index.php?t=new for templatefolder: new
Kurt
Doesn't work Kurt with 4images 1.7.6
-
Ops sorry .. i'm wrong this mood can work only if register global is on ..in php