I used the instructions in another post on how to modify the hide hack as seen in the code below. How can I add so that if a visitor comes in from a certain referrer such as google, then the hide function allows them to see the hidden message. So in all, in my code, all of those who can see the hidden message are mods, admins, those with 50+ posts, and those that come from a referrer (google).
Thanks
Code:
- if($item['iteration'] > 1)
- {
- return $error;
- }
- global $db, $topic_id, $userdata, $mode;
- $show = false;
- if($userdata['session_logged_in'])
- {
- $sql = "SELECT p.poster_id, p.topic_id
- FROM " . POSTS_TABLE . " p
- WHERE p.topic_id = $topic_id
- AND p.poster_id = " . $userdata['user_id'];
- $resultat = $db->sql_query($sql);
- $show = $db->sql_numrows($resultat) ? true : false;
- if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) || ($userdata['user_posts'] > 50))
- {
- $show = true;
- }

















Borgo San Michele

