Author Topic: Testing templates  (Read 16273 times)

0 Members and 1 Guest are viewing this topic.

Offline Maniac

  • Newbie
  • *
  • Posts: 45
    • View Profile
Testing templates
« 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Testing templates
« Reply #1 on: May 28, 2005, 06:53:29 AM »
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:
Code: [Select]
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$user_template);insert:
Code: [Select]
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
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Maniac

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Testing templates
« Reply #2 on: May 28, 2005, 11:54:00 PM »
Thank you :)

Offline Maniac

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Testing templates
« Reply #3 on: September 09, 2005, 01:07:00 AM »
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
Code: [Select]
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$user_template);and below it add
Code: [Select]
if ($user_info['user_level'] >= ADMIN && isset($_GET['tpl']) && !empty($_GET['tpl']) && @is_dir(ROOT_PATH.TEMPLATE_DIR."/".$_GET['tpl']))
{
  $user_template = $_GET['tpl'];
}

Offline Maniac

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Testing templates
« Reply #4 on: September 09, 2005, 01:25:46 AM »
Please disregard - I got it to work - it was exactly what I needed...

Much appreciated  :D

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Testing templates
« Reply #5 on: September 13, 2005, 01:34:33 AM »
when i do this i get

Notice: Undefined index: user_template in C:\CuSStom.com\www\gallery\includes\sessions.php on line 409

Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Testing templates
« Reply #6 on: September 13, 2005, 03:03:16 AM »
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

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Testing templates
« Reply #7 on: September 13, 2005, 03:15:33 AM »
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 :?:

Offline Maniac

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Testing templates
« Reply #8 on: September 13, 2005, 05:01:16 AM »
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?

Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: Testing templates
« Reply #9 on: September 13, 2005, 08:32:48 AM »
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)

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: Testing templates
« Reply #10 on: January 22, 2009, 05:13:09 PM »
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:
Code: [Select]
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$user_template);insert:
Code: [Select]
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 ] ?

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Testing templates
« Reply #11 on: January 22, 2009, 05:25:04 PM »
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

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: Testing templates
« Reply #12 on: January 23, 2009, 03:42:00 AM »
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

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: Testing templates
« Reply #13 on: January 23, 2009, 06:17:48 AM »
Ops sorry .. i'm wrong this mood can work only if register global is on ..in php

 

Post your comments here