ok.. i went with a different approach in the end..
i have integrated jp cache into wsn links by writing a small peace to read the cookie and then if they are a guest they get a copy of the site x hours old and if they are a logged in user it appends there session id to there cache file (so we don't get the logged in users seeing each others pages)
Then i can set that from 0 to sec to hours.. seems to work a treat on larger sites at reducing load time. It also seems to slot in fine with all the mod_rewrite etc ok too, so it saves having to do html generation etc
so rather then updating on a page edit/delete.. (not sure how to do that one yet) it just updates when the next cycle comes around
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on User Guest/Logged in
Member
Usergroup: Customer
Joined: Jun 30, 2003
Location: England
Total Topics: 7
Total Comments: 48
is there a simple way to tell if a user if logged in or not in order to call a external script (perferibly runs before headers are output)..
i thought something like:
if ($thismember->usergroup == 1) { require "/my/script/here.php";} at the top of index.php may do the trick but doesnt seem to work right..?
would i be better putting it in the wrapper insted?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
What you have is fine except that you have globalize a variable (like $thismember) to use it in template php (as mentioned in manual).
Note that 1 is the guest usergroup so you'll be including the script for guests only.
Member
Usergroup: Customer
Joined: Jun 30, 2003
Location: England
Total Topics: 7
Total Comments: 48
ok.. i went with a different approach in the end..
i have integrated jp cache into wsn links by writing a small peace to read the cookie and then if they are a guest they get a copy of the site x hours old and if they are a logged in user it appends there session id to there cache file (so we don't get the logged in users seeing each others pages)
Then i can set that from 0 to sec to hours.. seems to work a treat on larger sites at reducing load time. It also seems to slot in fine with all the mod_rewrite etc ok too, so it saves having to do html generation etc
so rather then updating on a page edit/delete.. (not sure how to do that one yet) it just updates when the next cycle comes around