phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

[BETA] Limit nested quotes


 
Search this topic... | Search MOD Development... | Search Box
Register or Login to Post    Index » MOD Development  Previous TopicPrint TopicNext Topic
Author Message
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Wed Sep 10, 2014 1:27 pm 
Post subject: Limit nested quotes

I don't know if a mod like this exists for phpbb2, if so someone please tell me.

What I'd like it to have:
- Admin can set a limit for maximum nested quotes, and a default number for users.
- Each user can select the maximum number of quotes in their messages, from 1 up to the limit set by the admin.
- Admin can set a different limit for admins and mods.
- I'll try to release it as a mod (it would be my first one), with expected format and all, hoping to get it validated icon_mrgreen.gif

Sounds good? anything else? suggestions? help?
Back to top
lumpy burgertushie
Board Member



Joined: 19 Nov 2008

Posts: 214


flag
PostPosted: Thu Sep 11, 2014 3:19 am 
Post subject: Re: Limit nested quotes

I know there were some MODs that dealt with the nested quotes thing. I don't know if any of them meet your requirements.



robert
Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Thu Sep 11, 2014 5:47 am 
Post subject: Re: Limit nested quotes

I found only two MODs that just removes all but the last quote. I'll try to find another one.

For now I'm using this code,
http://stackoverflow.com/questions/18754062/remove-nested-quotes

With just a few changes it seems to work fine (someone can check it, please?), although I suppose there are more elegant and correct ways to do this, if someone knows a better way please tell me.

Code:
$nest_level = 0;
$cut = false;
$removed = 0;
$max_level = 2;
preg_match_all('#(\[quote[^]]*\]|\[\/quote\])#', $bbcode, $matches, PREG_OFFSET_CAPTURE);
foreach($matches[0] as $quote)
{
  if (substr($quote[0], 1, 1) == 'q') $nest_level++;
  else if (substr($quote[0], 1, 1) == '/') $nest_level--;
  if (!$cut && $nest_level == $max_level + 1)
  {
    $cut = true;
    $cut_from = $quote[1];
  }
  if ($cut && $nest_level == $max_level)
  {
    $to_here = $quote[1] + 8; // strlen('[/quote]') = 8
    $cut = false;
    $from = $cut_from - $removed;
    $lenght = $to_here - $from - $removed;
    $bbcode = substr_replace($bbcode, '', $from, $lenght);
    $removed += $to_here - $cut_from;
  }
}


Code:
$bbcode = '[quote=foo]I really like the movie. [quote=bar]World

War Z[/quote] It\'s amazing![/quote]
This is my comment.
[quote]Hello, World[/quote]
This is another comment.
[quote]Bye Bye Baby[/quote]';
Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Thu Sep 11, 2014 8:32 pm 
Post subject: Re: Limit nested quotes

It's installed (and seems to be working fine, I have not really test it too much yet) in a heavy modded forum... but I've not even checked yet if all the instructions of this MOD are ok, tomorrow I'll try to test it on a vanilla phpbb 2.0.23 installation.

I've done the MOD as I wanted it to be, but if someone else wants it differently, I'm open to new ideas.

I've included a simpler version of the MOD (it's also in contrib), where only posting.php is needed to be edited.

Looks to be well formatted? I've made some changes, like removing the reference to phpbb.com/mods, it's ok?

Code:
##############################################################
## MOD Title:          Limit Nested Quotes
## MOD Author:         nostro@gmail.com
## MOD Description:    This MOD limit the number of nested quotes
##                     when the quote button is used
## MOD Version:        0.1.0
## MOD Compatibility:  2.0.23
##
## Installation Level: Intermediate
## Installation Time:  12 minutes
## Files To Edit:      posting.php,
##                     admin/admin_board.php,
##                     includes/usercp_register.php,
##                     languages/lang_english/lang_main.php,
##                     languages/lang_spanish/lang_main.php,
##                     languages/lang_english/lang_admin.php,
##                     languages/lang_spanish/lang_admin.php,
##                     templates/subSilver/admin/board_config_body.tpl,
##                     templates/subSilver/profile_add_body.tpl
##
## Included Files:     (N/A)
##
## License:            GNU General Public License v2
##                     http://opensource.org/licenses/gpl-license.php
##############################################################
## This MOD is for version 2 of phpBB (http://www.phpbb.com/).
## Unfortunately phpBB2 is no longer officially supported. Take care.
##############################################################
## Author Notes:
##
## This MOD is still in BETA status.
##
## Simpler version of this MOD included in contrib directory.
##
## Support for this MOD can be found here:
## http://www.phpbb2refugees.com/viewtopic.php?t=1186
##############################################################
## MOD History:
##
##   2014-09-11 - Version 0.1.0
##      - First version
##
##############################################################
## Before adding this MOD to your forum, you should back up all files related to this MOD
##############################################################

#
#-----[ SQL ]---------------------------------------------
#

INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_nested_quotes', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('mods_admins_max_nested_quotes', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('users_default_max_nested_quotes', '3');
ALTER TABLE phpbb_users ADD user_nested_quotes TINYINT(1) UNSIGNED DEFAULT 3;

#
#-----[ OPEN ]--------------------------------------------
#
posting.php

#
#-----[ FIND ]--------------------------------------------
#
         $quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];

#
#-----[ AFTER, ADD ]--------------------------------------
#

         if ( ( ( $userdata['user_level'] == USER && $board_config['max_nested_quotes'] > 0 ) || ( ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN ) && $board_config['mods_admins_max_nested_quotes'] > 0 ) ) && ( $userdata['nested_quotes'] > 0 ) && ( $userdata['nested_quotes'] <= 10 ) )
         {
            $nest_level = 0;
            $cut = false;
            $removed = 0;
            $max_level = $userdata['nested_quotes'];
            preg_match_all('#(\[quote[^]]*\]|\[\/quote\])#', $message, $matches, PREG_OFFSET_CAPTURE);
            foreach ( $matches[0] as $quote )
            {
               if ( substr($quote[0], 1, 1) == 'q' ) ++$nest_level;
               else if ( substr($quote[0], 1, 1) == '/' ) --$nest_level;
               if ( !$cut && $nest_level == $max_level )
               {
                  $cut = true;
                  $cut_from = $quote[1];
               }
               if ( $cut && $nest_level == $max_level - 1 )
               {
                  $to_here = $quote[1] + 8; // strlen('[/quote]') = 8
                  $cut = false;
                  $from = $cut_from - $removed;
                  $lenght = $to_here - $from - $removed;
                  $message = substr_replace($message, '', $from, $lenght);
                  $removed += $to_here - $cut_from;
               }
            }
         }

#
#-----[ OPEN ]--------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]--------------------------------------------
#
   "L_HOT_THRESHOLD" => $lang['Hot_threshold'],

#
#-----[ AFTER, ADD ]--------------------------------------
#
   "L_MAX_NESTED_QUOTES" => $lang['Max_nested_quotes'],
   "L_MAX_NESTED_QUOTES_EXPLAIN" => $lang['Max_nested_quotes_explain'],
   "L_MODS_ADMINS_MAX_NESTED_QUOTES" => $lang['Mods_admins_max_nested_quotes'],
   "L_USERS_DEFAULT_MAX_NESTED_QUOTES" => $lang['Users_default_max_nested_quotes'],
#
#-----[ FIND ]--------------------------------------------
#
      // Attempt to prevent a mistake with this value.
      if ($config_name == 'avatar_path')
      {
         $new['avatar_path'] = trim($new['avatar_path']);
         if (strstr($new['avatar_path'], "\0") || !is_dir($phpbb_root_path . $new['avatar_path']) || !is_writable($phpbb_root_path . $new['avatar_path']))
         {
            $new['avatar_path'] = $default_config['avatar_path'];
         }
      }
#
#-----[ AFTER, ADD ]--------------------------------------
#
   if ( $config_name == 'max_nested_quotes' )
   {
      $new['max_nested_quotes'] = (int) $new['max_nested_quotes'];
      if ( ( $new['max_nested_quotes'] > 10 ) || ( $new['max_nested_quotes'] < 0 ) ) $new['max_nested_quotes'] = 3;
      if ( $new['max_nested_quotes'] != 0)
      {
         $sql = "UPDATE " . USERS_TABLE . "
            SET user_nested_quotes = " . $new['max_nested_quotes'] . "
            WHERE user_nested_quotes > " . $new['max_nested_quotes'] . "
            AND user_level = " . USER;
         if ( !$db->sql_query($sql) )
         {
            message_die(GENERAL_ERROR, 'Failed to update users table', '', __LINE__, __FILE__, $sql);
         }
      }
   }
   
   if ( $config_name == 'mods_admins_max_nested_quotes' )
   {
      $new['mods_admins_max_nested_quotes'] = (int) $new['mods_admins_max_nested_quotes'];
      if ( ( $new['mods_admins_max_nested_quotes'] > 10 ) || ( $new['mods_admins_max_nested_quotes'] < 0 ) ) $new['mods_admins_max_nested_quotes'] = 3;
      if ( $new['mods_admins_max_nested_quotes'] != 0)
      {
         $sql = "UPDATE " . USERS_TABLE . "
            SET user_nested_quotes = " . $new['mods_admins_max_nested_quotes'] . "
            WHERE user_nested_quotes > " . $new['mods_admins_max_nested_quotes'] . "
            AND user_level = " . ADMIN . " OR user_level = " . MOD;
         if ( !$db->sql_query($sql) )
         {
            message_die(GENERAL_ERROR, 'Failed to update users table', '', __LINE__, __FILE__, $sql);
         }
      }
   }
     
   if ( $config_name == 'users_default_max_nested_quotes' )
   {
      $new['users_default_max_nested_quotes'] = (int) $new['users_default_max_nested_quotes'];
      if ( ( $new['users_default_max_nested_quotes'] > 10 ) || ( $new['users_default_max_nested_quotes'] < 0 ) ) $new['users_default_max_nested_quotes'] = 3;
   }

#
#-----[ OPEN ]--------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]--------------------------------------------
#
   $user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $user_nested_quotes = ( isset($HTTP_POST_VARS['nested_quotes']) ) ? (int) $HTTP_POST_VARS['nested_quotes'] : (int) $board_config['users_default_max_nested_quotes'];
   if ( $user_nested_quotes > 10 || ( $userdata['user_level'] == USER && $user_nested_quotes > (int) $board_config['max_nested_quotes'] ) || ( ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN ) && $user_nested_quotes > (int) $board_config['mods_admins_max_nested_quotes'] ) || $user_nested_quotes < 1 ) $user_nested_quotes = (int) $board_config['users_default_max_nested_quotes'];

#
#-----[ FIND ]--------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "

#
#-----[ IN-LINE FIND ]------------------------------------
#
, user_timezone = $user_timezone

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
, user_nested_quotes = $user_nested_quotes

#
#-----[ FIND ]--------------------------------------------
#
         $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)

#
#-----[ BEFORE, ADD ]--------------------------------------------
#
         $users_default_max_nested_quotes = (int) $board_config['users_default_max_nested_quotes'];
#
#-----[ IN-LINE FIND ]------------------------------------
#
, user_timezone

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
, user_nested_quotes

#
#-----[ FIND ]--------------------------------------------
#
         VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";

#
#-----[ IN-LINE FIND ]------------------------------------
#
, $user_timezone

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
, $users_default_max_nested_quotes

#
#-----[ FIND ]--------------------------------------------
#
   $user_timezone = $userdata['user_timezone'];

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $user_nested_quotes = $userdata['user_nested_quotes'];

#
#-----[ FIND ]--------------------------------------------
#
      'TIMEZONE_SELECT' => tz_select($user_timezone, 'timezone'),

#
#-----[ AFTER, ADD ]--------------------------------------
#
      'USER_NESTED_QUOTES' => $user_nested_quotes,

#
#-----[ FIND ]--------------------------------------------
#
   $template->assign_vars(array(
      'USERNAME' => isset($username) ? $username : '',

#
#-----[ BEFORE, ADD ]--------------------------------------
#
   if ( ( $userdata['user_level'] == USER && $board_config['max_nested_quotes'] > 0 ) || ( ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN ) && $board_config['mods_admins_max_nested_quotes'] > 0 ) ) $template->assign_block_vars('switch_nested_quotes', array());


#
#-----[ FIND ]--------------------------------------------
#
      'L_TIMEZONE' => $lang['Timezone'],

#
#-----[ AFTER, ADD ]--------------------------------------
#
      'L_NESTED_QUOTES' => $lang['Max_nested_quotes'],
      'L_NESTED_QUOTES_EXPLAIN' => ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN ) ? sprintf($lang['Max_nested_quotes_explain'], (int) $board_config['mods_admins_max_nested_quotes']) : sprintf($lang['Max_nested_quotes_explain'], (int) $board_config['max_nested_quotes']),

#
#-----[ OPEN ]--------------------------------------------
#
languages/lang_english/lang_main.php

#
#-----[ FIND ]--------------------------------------------
#
$lang['Timezone'] = 'Timezone';

#
#-----[ AFTER, ADD ]--------------------------------------
#
$lang['Max_nested_quotes'] = 'Maximum nested quotes per post';
$lang['Max_nested_quotes_explain'] = 'Max. %d / Min. 1';

#
#-----[ OPEN ]--------------------------------------------
#
# Note: This is only for Spanish version
#
languages/lang_spanish/lang_main.php

#
#-----[ FIND ]--------------------------------------------
#
$lang['Timezone'] = 'Zona horaria';

#
#-----[ AFTER, ADD ]--------------------------------------
#
$lang['Max_nested_quotes'] = 'Máximo de citas anidadas por mensaje';
$lang['Max_nested_quotes_explain'] = 'Max. %d / Min. 1';

#
#-----[ OPEN ]--------------------------------------------
#
languages/lang_english/lang_admin.php

#
#-----[ FIND ]--------------------------------------------
#
$lang['Hot_threshold'] = 'Posts for Popular Threshold';

#
#-----[ AFTER, ADD ]--------------------------------------
#
$lang['Max_nested_quotes'] = 'Maximum nested quotes per post';
$lang['Max_nested_quotes_explain'] = 'Set to 0 for unlimited depth';
$lang['Mods_admins_max_nested_quotes'] = 'Maximum nested quotes per post for Mods and Admins';
$lang['Users_default_max_nested_quotes'] = 'Default maximum nested quotes per message';

#
#-----[ OPEN ]--------------------------------------------
#
# Note: This is only for Spanish version
#
languages/lang_spanish/lang_admin.php

#
#-----[ FIND ]--------------------------------------------
#
$lang['Hot_threshold'] = 'Posts for Popular Threshold';

#
#-----[ AFTER, ADD ]--------------------------------------
#
$lang['Max_nested_quotes'] = 'Máximo de citas anidadas por mensaje';
$lang['Max_nested_quotes_explain'] = 'Ajuste este valor a 0 para citas infinitas';
$lang['Mods_admins_max_nested_quotes'] = 'Máximo de citas anidadas por mensaje para Mods y Admins';
$lang['Users_default_max_nested_quotes'] = 'Máximo de citas anidadas por mensaje por defecto';

#
#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
   <tr>
      <td class="row1">{L_HOT_THRESHOLD}</td>
      <td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" value="{HOT_TOPIC}" /></td>
   </tr>

#
#-----[ AFTER, ADD ]--------------------------------------
#
   <tr>
      <td class="row1">{L_MAX_NESTED_QUOTES}<br /><span class="gensmall">{L_MAX_NESTED_QUOTES_EXPLAIN}</span></td>
      <td class="row2"><input class="post" type="text" name="max_nested_quotes" size="1" maxlength="2" value="{MAX_NESTED_QUOTES}" /></td>
   </tr>
   <tr>
      <td class="row1">{L_MODS_ADMINS_MAX_NESTED_QUOTES}</td>
      <td class="row2"><input class="post" type="text" name="mods_admins_max_nested_quotes" size="1" maxlength="2" value="{MODS_ADMINS_MAX_NESTED_QUOTES}" /></td>
   </tr>
   <tr>
      <td class="row1">{L_USERS_DEFAULT_MAX_NESTED_QUOTES}</td>
      <td class="row2"><input class="post" type="text" name="users_default_max_nested_quotes" size="1" maxlength="2" value="{USERS_DEFAULT_MAX_NESTED_QUOTES}" /></td>
   </tr>
#
#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
   <tr>
      <th class="thSides" colspan="2" height="25" valign="middle">{L_PREFERENCES}</th>
   </tr>

#
#-----[ AFTER, ADD ]--------------------------------------
#
   <!-- BEGIN switch_nested_quotes -->
   <tr>
      <td class="row1"><span class="gen">{L_NESTED_QUOTES}:</span><br />
      <span class="gensmall">{L_NESTED_QUOTES_EXPLAIN}</span></td>
      <td class="row2">
      <input type="text" name="nested_quotes" value="{NESTED_QUOTES}" size="1" maxlength="2" class="post" />
      </td>
   </tr>
   <!-- END switch_nested_quotes -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Code:
##############################################################
## MOD Title:          Limit Nested Quotes
## MOD Author:         nostro@gmail.com
## MOD Description:    This MOD limit the number of nested quotes
##                     when the quote button is used
## MOD Version:        0.1.0
## MOD Compatibility:  2.0.23
##
## Installation Level: Easy
## Installation Time:  2 minutes
## Files To Edit:      posting.php,
##
## Included Files:     (N/A)
##
## License:            GNU General Public License v2
##                     http://opensource.org/licenses/gpl-license.php
##############################################################
## This MOD is for version 2 of phpBB (http://www.phpbb.com/).
## Unfortunately phpBB2 is no longer officially supported. Take care.
##############################################################
## Author Notes:
##
## This MOD is still in BETA status.
##
## Support for this MOD can be found here:
## http://www.phpbb2refugees.com/viewtopic.php?t=1186
##############################################################
## MOD History:
##
##   2014-09-11 - Version 0.1.0
##      - First version
##
##############################################################
## Before adding this MOD to your forum, you should back up all files related to this MOD
##############################################################

#
#-----[ OPEN ]--------------------------------------------
#
posting.php

#
#-----[ FIND ]--------------------------------------------
#
         $quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];

#
#-----[ AFTER, ADD ]--------------------------------------
#
# Note: Change $max_level to the value you want
#

         $nest_level = 0;
         $cut = false;
         $removed = 0;
         $max_level = 3;
         preg_match_all('#(\[quote[^]]*\]|\[\/quote\])#', $message, $matches, PREG_OFFSET_CAPTURE);
         foreach ( $matches[0] as $quote )
         {
            if ( substr($quote[0], 1, 1) == 'q' ) ++$nest_level;
            else if ( substr($quote[0], 1, 1) == '/' ) --$nest_level;
            if ( !$cut && $nest_level == $max_level )
            {
               $cut = true;
               $cut_from = $quote[1];
            }
            if ( $cut && $nest_level == $max_level - 1 )
            {
               $to_here = $quote[1] + 8; // strlen('[/quote]') = 8
               $cut = false;
               $from = $cut_from - $removed;
               $lenght = $to_here - $from - $removed;
               $message = substr_replace($message, '', $from, $lenght);
               $removed += $to_here - $cut_from;
            }
         }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM



limit_nested_quotes.tar.gz
 Description:

Download
 Filename:  limit_nested_quotes.tar.gz
 Filesize:  3.72 KB
 Downloaded:  290 Time(s)

Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Mon Sep 15, 2014 10:44 am 
Post subject: Re: Limit nested quotes

There were some errors in those instructions, they are fixed in version 0.1.0a.


limit_nested_quotes_0.1.0a.tar.gz
 Description:

Download
 Filename:  limit_nested_quotes_0.1.0a.tar.gz
 Filesize:  3.8 KB
 Downloaded:  296 Time(s)

Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Mon Sep 15, 2014 4:00 pm 
Post subject: Re: Limit nested quotes

Changed to add this functionality to private messages.

MOD header:
Code:
##############################################################
## MOD Title:          Limit Nested Quotes
## MOD Author:         nostro@gmail.com
## MOD Description:    This MOD limit the number of nested quotes
##                     when the quote button is used
## MOD Version:        0.2.0
## MOD Compatibility:  2.0.23
##
## Installation Level: Intermediate
## Installation Time:  13 minutes
## Files To Edit:      includes/functions_post.php,
##                     posting.php,
##                     privmsg.php,
##                     admin/admin_board.php,
##                     includes/usercp_register.php,
##                     languages/lang_english/lang_main.php,
##                     languages/lang_spanish/lang_main.php,
##                     languages/lang_english/lang_admin.php,
##                     languages/lang_spanish/lang_admin.php,
##                     templates/subSilver/admin/board_config_body.tpl,
##                     templates/subSilver/profile_add_body.tpl
##
## Included Files:     (N/A)
##
## License:            GNU General Public License v2
##                     http://opensource.org/licenses/gpl-license.php
##############################################################
## This MOD is for version 2 of phpBB (http://www.phpbb.com/).
## Unfortunately phpBB2 is no longer officially supported. Take care.
##############################################################
## Author Notes:
##
## This MOD is still in BETA status.
##
## Simpler version of this MOD included in contrib directory.
##
## Support for this MOD can be found here:
## http://www.phpbb2refugees.com/viewtopic.php?t=1186
##############################################################
## MOD History:
##
##   2014-09-15 - Version 0.2.0
##      - Apply limit also in privmsg.php
##
##   2014-09-15 - Version 0.1.0a
##      - Fix some errors in instructions
##
##   2014-09-11 - Version 0.1.0
##      - First version
##
##############################################################
## Before adding this MOD to your forum, you should back up all files related to this MOD
##############################################################



limit_nested_quotes_0.2.0.tar.gz
 Description:

Download
 Filename:  limit_nested_quotes_0.2.0.tar.gz
 Filesize:  3.96 KB
 Downloaded:  275 Time(s)

Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Development  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0267 seconds using 17 queries. (SQL 0.0017 Parse 0.0025 Other 0.0224)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo