Wicher's phpBB2 Mods Forum Index Wicher's phpBB2 Mods
On this board you will find all phpBB2 mods that i have created over the years. Most mods are on this board installed. Before asking for support, be sure to have your board updated to the latest phpBB2 version.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Simple db_update generatorSimple db_update generator   Advanced db_update generatorAdvanced db_update generator 
 This board is protected by Phpbbantispam 

Guest_See_Part_Message

 
Board Alert Board Message
There are in this topic 89 posts to view if you are logged in.

You can log in or register via the login / registerlink here or in the header.
Back to top  Login here and be redirected to this TopicLogin here and be redirected to this Topic RegisterRegister
Reply to topic    Wicher's phpBB2 Mods Forum Index -> Wicher's phpBB Mods Was this Topic Helpful?  
Points for this topic: 2
Topic gradiation: 
View previous topic :: View next topic  
Author Guest_See_Part_Message
Wicher
Site Admin


Joined: 16 Dec 2005
Posts: 1144
User's local time:
2024 Mar 28 - 1:39 PM
Country IP         : Netherlands
Country of choice: Netherlands


Was This Post Helpful?

 
Users postingpoints:
58
Posts points:
1
Post gradiation:
PostPosted: Tue Feb 07, 2006 10:19 pm    Post subject: Reply with quote

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:
  1. # this is a line that is installed with version 1.0.0, it has to be removed before installing version 1.0.5.
  2. #-----[ OPEN ]------------------------------------------
  3. #
  4. viewtopic.php
  5. #
  6. #-----[ FIND ]------------------------------------------
  7. #
  8.    if (($bbcode_uid != '') && ($userdata['username'] != 'Anonymous'))
  9. #
  10. #-----[ REPLACE WITH ]------------------------------------------
  11. #
  12.    if ($bbcode_uid != '')
  13. #
  14. #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
  15. #
  16. # EoM


Code:
  1. ########################################################
  2. ##
  3. ## MOD Title:   Guest_See_Part_Message
  4. ## MOD Version: 1.0.6
  5. ## Author:     Wicher (http://www.wichersmods.nl)
  6. ##
  7. ## Description: 
  8. ##      Displays only a part of a full posting if the user is a guest.
  9. ##      You can specify certain forums and or topics to be excluded from not readable by guests.
  10. ## 
  11. ##
  12. ## Installation Level:  easy
  13. ## Installation Time:  1 minutes
  14. ##
  15. ## Files To Edit:         2
  16. ##                   - viewtopic.php
  17. ##                   - language/lang_main.php
  18. ##
  19. ## Included Files:      None
  20. ##
  21. ########################################################
  22. ## Guest_See_Part_Message
  23. ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
  24. ## Before installing this version you should first uninstall previous versions of this mod.
  25. ##############################################################
  26. #
  27. #-----[ OPEN ]------------------------------------------
  28. #
  29. viewtopic.php
  30. #
  31. #-----[ FIND ]------------------------------------------
  32. #
  33.    $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
  34. #
  35. #-----[ AFTER, ADD ]------------------------------------------
  36. # here you can specify certain forums and topics to be excluded from not reading by guests
  37. if ((($forum_id == 2) or ($forum_id == 6)) && ($topic_id != 31) && ($topic_id != 23))
  38. {
  39.    $lettercount = (strlen($message));
  40.    if (($userdata['username'] == 'Anonymous') && ($lettercount > 40))
  41.    {
  42.       $path = __FILE__;
  43.       $file = basename ($path);
  44.       if ($file != 'portal.php')//needed for portal support, otherwise portal layout will breakout when clips are played.
  45.       {
  46.             //first check if message has quote in it or a ot, quote box breaks forums layout.
  47.             $message = strtolower($message);
  48.             $message = str_replace("[quote", "[ quote", $message);
  49.             $message = str_replace("[ot", "[ ot", $message);
  50.             $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>';
  51.       }
  52.    }
  53. }
  54. #
  55. #-----[ OPEN ]------------------------------------------
  56. #
  57. language/lang_main.php
  58. #
  59. #-----[ FIND ]------------------------------------------
  60. #
  61. ?>
  62. #
  63. #-----[ ADD, BEFORE ]------------------------------------------
  64. #
  65. //Guest read part
  66. $lang['GuestWantReadAll'] = 'if you want to read the full posting';
  67. $lang['or'] = 'or';
  68. #
  69. #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
  70. #
  71. # 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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Post new topic    Reply to topic    Wicher's phpBB2 Mods Forum Index -> Wicher's phpBB Mods
Author Guest_See_Part_Message Replies
Display posts from previous:   
Post new topic   Reply to topic    Wicher's phpBB2 Mods Forum Index -> Wicher's phpBB Mods All times are GMT

Was this Topic Helpful?  
Points for this topic: 2
Topic gradiation: 
Page 1 of 6

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

This board is protected by Phpbbantispam
Powered by phpBB © 2001, 2005 phpBB Group

Googlepage: GooglePullerPage
IP Country Flag 2.9.4 © 2005, 2007 - 3Di (aka 3D)