BBCodeBox3

prosilver | subsilver2

Willkommen und Gute Nacht, Guest  Beim nächsten Piep ist es zwischen 4:00 und 5:00 Uhr

It is currently Sun 23. Feb 2025, 05:54

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Sun 15. Nov 2009, 03:46 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

No Code Content 4 Guests

ok, here is a very smart and lite version to hide code-content from guests :idea:
with link to login or register..

Screen

Image

Instruction

open

language/xx/viewtopic.php

find

Code:
 $lang = array_merge($lang, array(    


after add

Code:
 // No Code Content 4 Guests / 4seven / 2009
    'NO_CODE_FOR_GUESTS_1'    => 'Please ',
    'NO_CODE_FOR_GUESTS_2'    => 'Login',
    'NO_CODE_FOR_GUESTS_3'    => ' or ',
    'NO_CODE_FOR_GUESTS_4'    => 'Register',
    'NO_CODE_FOR_GUESTS_5'    => ', to see this Content',
// No Code Content 4 Guests / 4seven / 2009          


open

viewtopic.php

find

Code:
 $message = censor_text($row['post_text']);    


after add

Code:
 // No Code Content 4 Guests / 4seven / 2009
if ($user->data['user_id'] == ANONYMOUS){
$message = preg_replace("/\[code:(.*?)\](.*?)\[\/code:(.*?)\]/s", '[code:$1]' . $user->lang['NO_CODE_FOR_GUESTS_1'] . '<a href="ucp.php?mode=login">' . $user->lang['NO_CODE_FOR_GUESTS_2'] . '</a>' . $user->lang['NO_CODE_FOR_GUESTS_3'] . '<a href="ucp.php?mode=register">' . $user->lang['NO_CODE_FOR_GUESTS_4'] . '</a>' . $user->lang['NO_CODE_FOR_GUESTS_5'] . '[/code:$3]', $message);}
// No Code Content 4 Guests / 4seven / 2009            


clear all board-caches

enjoy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
POWERED_BY
[ Time : 0.047s | 17 Queries | GZIP : Off | Board-Version: 3.0.7 PL1 ]