Kalan bölümünü okumak için üye olun yada giriş yapınız die bir uyarı verebilirsiniz ..
Demo http://www.detecties.com/phpbb2018/viewtopic.php?t=23
Kod: Tümünü seç
########################################################
##
## MOD Title: Guest_See_Part_Message
## MOD Version: 1.0.5
## Author: Wicher (http://www.detecties.com/phpbb2018)
##
## Description:
## Displays only a part of a full posting if the user is a guest.
##
##
## Installation Level: easy
## Installation Time: 1 minutes
##
## Files To Edit: 2
## - viewtopic.php
## - language/lang_main.php
##
## Included Files: None
##
########################################################
## Guest_See_Part_Message
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
## Before installing this version you should first uninstall previous versions of this mod.
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lettercount = (strlen($message));
if (($userdata['username'] == 'Anonymous') && ($lettercount > 40))
{
$path = __FILE__;
$file = basename ($path);
if ($file != 'portal.php')//needed for portal support, otherwise portal layout will breakout when clips are played.
{
//first check if message has quote in it or a ot, quote box breaks forums layout.
$message = strtolower($message);
$message = str_replace("[quote", "[ quote", $message);
$message = substr(($message), 0, 40).'... <b><a href="http://'.$board_config['server_name'].$board_config['script_path'].'profile.php?mode=register">'.$lang['Register'].'</a> '.$lang['or'].' <a href="http://'.$board_config['server_name'].$board_config['script_path'].'login.php?redirect=viewtopic.php?t='.$postrow[$i]['topic_id'].'">'.$lang['Login'].'</a> '.$lang['GuestWantReadAll'].'</b>';
}
}
#
#-----[ OPEN ]------------------------------------------
#
language/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ ADD, BEFORE ]------------------------------------------
#
//Guest read part
$lang['GuestWantReadAll'] = 'if you want to read the full posting';
$lang['or'] = 'or';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM