Wicher Site Admin
Joined: 16 Dec 2005 Posts: 1144 User's local time: 2024 Sep 10 - 11:52 PM Country IP : Country of choice:
Was This Post Helpful?
Users postingpoints:
Posts points:
Post gradiation:
|
Posted: Tue Feb 07, 2006 10:19 pm Post subject: |
Wicher
*Delete this user
Items with prefix * are permanent. | Close |
|
|
Full mod is attached at the bottom of this post.
If you had version 1.0.0 installed and want to update to 1.0.5 then
you also have to do this:
(you dont have to do this if updating from version 1.0.5)
Code: |
-
- # this is a line that is installed with version 1.0.0, it has to be removed before installing version 1.0.5.
- #-----[ OPEN ]------------------------------------------
- #
- viewtopic.php
- #
- #-----[ FIND ]------------------------------------------
- #
- if (($bbcode_uid != '') && ($userdata['username'] != 'Anonymous'))
- #
- #-----[ REPLACE WITH ]------------------------------------------
- #
- if ($bbcode_uid != '')
- #
- #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
- #
- # EoM
|
Code: |
-
- ########################################################
- ##
- ## MOD Title: Guest_See_Part_Message
- ## MOD Version: 1.0.6
- ## Author: Wicher (http://www.wichersmods.nl)
- ##
- ## Description:
- ## Displays only a part of a full posting if the user is a guest.
- ## You can specify certain forums and or topics to be excluded from not readable by guests.
- ##
- ##
- ## 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 ]------------------------------------------
- # here you can specify certain forums and topics to be excluded from not reading by guests
-
- if ((($forum_id == 2) or ($forum_id == 6)) && ($topic_id != 31) && ($topic_id != 23))
- {
- $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 = str_replace("[ot", "[ ot", $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
|
_________________
Wicher's phpBB2 Mods | Wicher's phpBB3 Mods | Statistics Mod 4.x.x
Last edited by Wicher on Wed Apr 05, 2006 5:42 pm; edited 16 times in total |
|