frontend and backend template

crnogorac081

hmmm, wierd..

When i inserted that into code editor i got this:


echo THEME_PATH;              I:\WebsiteBaker Portable1_2\htdocs\wb2/templates/classic_theme
echo TEMPLATE_DIR;            http://127.0.0.1:4001/wb2/templates/im


but at the test site's footer i got this:


<br /> <?php echo THEME_URL?>              http://127.0.0.1:4001/wb2/templates/classic_theme
<br /> <?php echo TEMPLATE_DIR?>         http://127.0.0.1:4001/wb2/templates/im
<br /> <?php echo WB_URL.MEDIA_DIRECTORY?>/heder/3.jpg          http://127.0.0.1:4001/wb2/media/heder/3.jpg


I am not a coder so I dont understant why there is a difference between these two ??

And when I call css file:

<link href="<?php echo TEMPLATE_DIR?>/im.css" rel="stylesheet" type="text/css" media="screen" />

I get this:

<link href="http://127.0.0.1:4001/wb2/templates/im/im.css" rel="stylesheet" type="text/css" media="screen" />

So I dont understand why I can't call 'TEMPLATE_DIR' => TEMPLATE_DIR."/login",  ?? if I want to point to the file or folder ?

pls help :)
Web developer

doc

@crnogorac081:
QuoteI am just wondering how the THEME_PATH works and TEMPLATE_DIR does not ??
Just add the following two PHP lines to your code (or a code section) and you will see why one works the other not:
echo THEME_PATH;
echo TEMPLATE_DIR;


Doc

crnogorac081

Hi Matthias,

What I am trying to create is personalized login page to looks like the frontend theme. That will be just the login page, warning page and forgotten email page. And when you log in, you will use one of the backend themes..

In the /admin/login - index.php file I tried to change this:


$thisApp = new Login(
                           array(
                                   'MAX_ATTEMPS' => "3",
                                   'WARNING_URL' => THEME_URL."/templates/warning.html",  ------ to be => TEMPLATE_DIR."login/warning.php",
                                   'USERNAME_FIELDNAME' => $username_fieldname,
                                   'PASSWORD_FIELDNAME' => $password_fieldname,
                                   'REMEMBER_ME_OPTION' => SMART_LOGIN,
                                   'MIN_USERNAME_LEN' => "2",
                                   'MIN_PASSWORD_LEN' => "2",
                                   'MAX_USERNAME_LEN' => "30",
                                   'MAX_PASSWORD_LEN' => "30",
                                   'LOGIN_URL' => ADMIN_URL."/login/index.php",
                                   'DEFAULT_URL' => ADMIN_URL."/start/index.php",
                                   'TEMPLATE_DIR' => THEME_PATH."/templates",            -------- to be => TEMPLATE_DIR."/login/",
                                   'TEMPLATE_FILE' => "login.htt",                    ----------- to be  => "login.php",
                                   'FRONTEND' => false,
                                   'FORGOTTEN_DETAILS_APP' => ADMIN_URL."/login/forgot/index.php",
                                   'USERS_TABLE' => TABLE_PREFIX."users",
                                   'GROUPS_TABLE' => TABLE_PREFIX."groups",
                           )
                   );




but I get this  error below...

/admin/login/TEMPLATE_DIR/warning.php

I am just wondering how the THEME_PATH works and TEMPLATE_DIR does not ??

cheers
Web developer

ruebenwurzel

Hello,

as soon as WB 2.8 final is out we will open a new thread especially for the backend themes and how to adapt them to your own wishes.

Basically to make your own theme you can make a copy of an existing theme, rename name and path in info.php and install it as a template.

The easiest way to adapt the design then to your wishes is to edit in the templates dir within the theme the file header.htt and footer.htt. To adapt the colors use the css, to change images add your images to images dir and name your images the same as the existing ones.

Matthias

crnogorac081

#1
Hi,

can someone please tell me which parametars or variables determines is some template for frontend or backend ?

I want to create a template which will have /admin/login style and grafic like the frontend template, and when you log in to be regular wb admin theme. in order to test this for WB 2.8 I need to change some parametars in core files, and if it works, it will be grat for all.

see the picture for simple example :)  

[gelöscht durch Administrator]
Web developer