bestbuildpc: Forums
 

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to add SelectExpand to your forum
 
 
Post new topic   Reply to topic    bestbuildpc Forum Index -> RavenNuke -> Mods and Hacks
View previous topic :: View next topic  
Author Message
bestbuildpc
Site Admin
Site Admin


Joined: Jun 30, 2012
Posts: 213
Location: NL

PostPosted: Tue Aug 14, 2012 19:57    Post subject: How to add SelectExpand to your forum Reply with quote

Code:
Upload select_expand_bbcodes.rar to modules/Forums/includes/ folder


#-----[ OPEN ]------------------------------------------
#
# NOTE --- You need to do this for all your installed languages
#
modules/Forums/language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------

?>

#-----[ BEFORE, ADD ]------------------------------------------
//+MOD: Select Expand BBcodes MOD
$lang['Select'] = 'Select';
$lang['Expand'] = 'Expand';
$lang['Contract'] = 'Contract';
//-MOD: Select Expand BBcodes MOD
--------------------------------------------------
#-----[ OPEN ]------------------------------------------
#
modules/Forums/includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
define("BBCODE_TPL_READY", true);
#-----[ BEFORE, ADD ]------------------------------------------
//+MOD: Select Expand BBcodes MOD
   global $phpbb_root_path;
   $u_sxbb_jslib = 'modules/Forums/includes/select_expand_bbcodes.js';

   // Replacing BBCode variables, but also adding CR to preserve HTML comment delimiters for JS code.
   $expand_ary1 = array('<!--', '//-->', '{L_SELECT}', '{L_EXPAND}', '{L_CONTRACT}', '{U_SXBB_JSLIB}');
   $expand_ary2 = array("\r<r>\r", $lang['Select'], $lang['Expand'], $lang['Contract'], $u_sxbb_jslib);
   $expand_ary3 = array('<!--', '//-->');
   $expand_ary4 = array("\r<r>\r");

   $bbcode_tpl['quote_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['quote_open']);
   $bbcode_tpl['quote_username_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['quote_username_open']);
   $bbcode_tpl['code_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['code_open']);

   $bbcode_tpl['quote_close'] = str_replace($expand_ary3, $expand_ary4, $bbcode_tpl['quote_close']);
   $bbcode_tpl['code_close'] = str_replace($expand_ary3, $expand_ary4, $bbcode_tpl['code_close']);
//-MOD: Select Expand BBcodes MOD

----------------
#-----[ OPEN ]------------------------------------------
#
# NOTE --- You need to do this for all of your installed template styles
#
modules/Forums/templates/subSilver/bbcode.tpl or use themes/YOURTHEMES/forums/bbcode.tpl
#
#=================================
# MOD Section: quote_username_open
#=================================
#-----[ FIND ]------------------------------------------
<BEGIN></span>
<table

#
#-----[ IN-LINE FIND ]------------------------------------------

   <td><span>{USERNAME} {L_WROTE}:</span></td>
   </tr>
   <tr>
     <td><END>

#-----[ REPLACE WITH ]------------------------------------------
      <td><span>{USERNAME} {L_WROTE}:
<script></script>
<script>
<var>
</script>
      </span></td>
   </tr>
   <tr>
     <td>
<script>
<SXBB>
</script><END>

#
#=================================
# MOD Section: quote_open
#=================================
#
#-----[ FIND ]------------------------------------------

<BEGIN></span>
<table
#-----[ IN-LINE FIND ]------------------------------------------
#

<table

#-----[ IN-LINE AFTER, ADD ]------------------------------------------
class="bodyline"

#-----[ FIND ]------------------------------------------

   <td><span>{L_QUOTE}:</span></td>
   </tr>
   <tr>
     <td><END>
#-----[ REPLACE WITH ]------------------------------------------

      <td><span>{L_QUOTE}:
<script></script>
<script>
<var>
</script>
      </span></td>
   </tr>
   <tr>
     <td>
<script>
<SXBB>
</script><END>
--------------------------------------

#=================================
# MOD Section: quote_close
#=================================
#
#-----[ FIND ]------------------------------------------
<BEGIN></td>

#-----[ REPLACE WITH ]------------------------------------------

<BEGIN>
<script>
</div>
</script>
      </td>

#=================================
# MOD Section: code_open
#=================================
#
#-----[ FIND ]------------------------------------------

<BEGIN></span>
<table
#-----[ IN-LINE FIND ]------------------------------------------

<table
#-----[ IN-LINE AFTER, ADD ]------------------------------------------

 class="bodyline"
#
#-----[ FIND ]------------------------------------------
#

     <td><span>{L_CODE}:</span></td>
   </tr>
   <tr>
     <td><END>
#
#-----[ REPLACE WITH ]------------------------------------------
#
      <td><span>{L_CODE}:
<script></script>
<script>
<var>
</script>
      </span></td>
   </tr>
   <tr>
     <td>
<script>
<SXBB>
</script><END>


#=================================
# MOD Section: code_close
#=================================
#
#-----[ FIND ]------------------------------------------
#

<BEGIN></td>

#-----[ REPLACE WITH ]------------------------------------------
<BEGIN>
<script>
</div>
</script>
      </td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
__________


Note: I included the mod in the attachmen so you don't copy and insert spaces from the forum.
  
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    bestbuildpc Forum Index -> RavenNuke -> Mods and Hacks All times are GMT + 2 Hours
 
 Page 1 of 1

 

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

Powered by phpBB © 2001-2008 phpBB Group
 
Forums ©