View Full Version : logincode / logoutcode in header
babak
Thu 31st May '01, 7:58am
hi,
i like to modify my header template so that anyone
who is online see the "welcome..."-message and
anyone who is not online see the login-input boxes.
i know that this is allready in the forumhomepage
template, but i like to have it on every page (header
template).
when i remove the $logincode from the
forumhomepage and add id to the header template
nothing apperars there :eek:
can anyone help?
Wayne Luke
Thu 31st May '01, 12:39pm
You will have to edit the global.php file so that it parses those templates.
Currently they are only parsed in the index.php file.
Thomas P
Sat 16th Jun '01, 9:33am
Originally posted by babak
when i remove the $logincode from the
forumhomepage and add id to the header template
nothing apperars there :eek:
can anyone help?
Have the same problem with the $timenow and $welcometext variable, which doesn't work in the header template...
Originally posted by wluke
You will have to edit the global.php file so that it parses those templates.
Umm, does anyone has a sample how to do that, went through the global.php and don't find my way.
Do I really have to go so deep to edit the original files?
Couldn't I modify something in the templates to use the bits in the header :confused:
Thanks,
-Tom
P.S.: Sorry to exhume such an old thread, but it's exactly what I need
ldydvr
Thu 5th Jul '01, 7:01am
Ditto
Dunny
Sun 9th Sep '01, 8:56am
Im guessing to use PHP in the header mate, the only way to do it is to edit the GLOBAL.PHP, should be easy I'll take a look now!
Dunny
Sun 9th Sep '01, 9:29am
ok mate heres how its done
open admin/index.php
and take the code out of there that you need, example below...it has descriptions by them, their near the top
// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
then simply copy and paste the selected into global.php (not the admin one) under // ####### Start load options ########
this may not be the exact way to do it but it gives the result ;)
Chen
Sun 9th Sep '01, 9:45am
You also need
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
before what Dunny pasted.
(and it's in /forum/index.php, not /admin ;))
Zoner82
Wed 12th Sep '01, 5:47pm
Sorry, I don't understand the solution.
I'm having the same problem with $timenow in the header template -- variable doesn't seem to be set at that point. However, $timenow is already in global.php, so I'm having a hard time with figuring out what's wrong.
thanks,
Mike
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights