Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 10:35 am EST
Geeklog Forums
hiding or displaying blocks based on referring URL
bruce
Anonymous
I hope someone will be able to help me here, or at least point me in the right direction.
What I would like to do is have geeklog site that does NOT display the "User Functions" block IF the viewer arrives at the site from a non-authorized referring URL. ie the outside viewer cannot sign up or log in and have access to content that authorized users can. Conversely, the "User Functions" block will appear for the viewer coming from an authorize referring URL.
We are using apache server and can deal with referring URL's no problem. Can someone tell me if this is possible, easy, difficult and point me in the right direction to make this happen?
What I would like to do is have geeklog site that does NOT display the "User Functions" block IF the viewer arrives at the site from a non-authorized referring URL. ie the outside viewer cannot sign up or log in and have access to content that authorized users can. Conversely, the "User Functions" block will appear for the viewer coming from an authorize referring URL.
We are using apache server and can deal with referring URL's no problem. Can someone tell me if this is possible, easy, difficult and point me in the right direction to make this happen?
13
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I doubt that this will be very reliable (since referrers are unreliable, as they may have been blocked, filtered, or manipulated).
Anyway, the function that you will need to modify is COM_userMenu() in lib-common.php. Simply make it return an empty string if it should not display the block.
bye, Dirk
Anyway, the function that you will need to modify is COM_userMenu() in lib-common.php. Simply make it return an empty string if it should not display the block.
bye, Dirk
12
11
Quote
bruce
Anonymous
Thank you Dirk. Very helpful. :-)
bruce
bruce
10
12
Quote
All times are EST. The time is now 10:35 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content