0
Welcome Guest! Login
0 items Join Now

change template for registred users

    • yomax's Avatar
    • yomax
    • Jr. Rocketeer
    • Posts: 43
    • Thanks: 0

    change template for registred users

    Posted 17 years 10 months ago
    • Hi!
      I have a question: is it possible to have two different templates for the same site?
      1: for the public (ex: elemental)
      2:if a user log in,a completely different template (ex: versatility III)
      I tried with a "ghost" template with this in index.php:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
      <html xmlns=" www.w3.org/1999/xhtml ">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Les Ecuries de Saint Georges</title>
      <?php
      if ( $my->id ) {
      include($mosConfig_absolute_path.'/templates/rt_versatility_iii/index.php');
      } else {
      include($mosConfig_absolute_path.'/templates/rt_elemental/index.php');
      }
      ?>
      </head>

      <body>
      <pre> </pre>
      <pre> </pre>
      </body>
      </html>

      but it's not working... :-[
  • Re: change template for registred users

    Posted 17 years 10 months ago
    • Did you try debugging -- i.e., print $my->id and see what the value is, print a message after each include to see which code is being called.

      echo $my->id . "<br />";
      if ( $my->id ) {
      &nbsp; &nbsp; include($mosConfig_absolute_path.'/templates/rt_versatility_iii/index.php');
      &nbsp; &nbsp; echo "Including versatility<br />";
      } 
      else { 
      &nbsp; &nbsp; include($mosConfig_absolute_path.'/templates/rt_elemental/index.php');
      &nbsp; &nbsp; echo "Including elemental<br />";
      }
    • yomax's Avatar
    • yomax
    • Jr. Rocketeer
    • Posts: 43
    • Thanks: 0

    Re: change template for registred users

    Posted 17 years 10 months ago
    • if i try this code,here is what I get:
      Warning: require(/home.10.3/vdsites/saintgeorges/templates/ghost/rt_styleswitcher.php) [function.require]: failed to open stream: No such file or directory in /home.10.17/vdsites/saintgeorges/templates/rt_elemental/index.php on line 3

      Forgot to say: I'm from France and my English is sometimes...difficult!! ::)
    • yomax's Avatar
    • yomax
    • Jr. Rocketeer
    • Posts: 43
    • Thanks: 0

    Re: change template for registred users

    Posted 17 years 10 months ago
    • Maybe it has something to do with Styleswitcher ???

Time to create page: 0.077 seconds