Welcome

Please register to have access to more features!

It is highly recommended that you have Javascript enabled; many features will not work unless you do. The recommended browsers are Firefox and Chrome; the board is also NOT mobile-friendly.

Please invite your friends!

If you were referred by someone (ex. me, Jessica) please put their username in the referral box on the registration page. Ask them if you don't know their username.

If you are visiting for TESTING PURPOSES ONLY, this is the test account information:


Username:
Test
Password: test123



Select a forum to post in:

Set max subject length in Admin Panel

Moderator: Jessica

Set max subject length in Admin Panel

Post Number: #1  Postby Jessica » June 9th, 2012, 7:07 pm

Open includes/acp/acp_board.php

Find:
Code: Select all
'warnings_expire_days'    => array('lang' => 'WARNINGS_EXPIRE',        'validate' => 'int',    'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend3'                    => 'ACP_SUBMIT_CHANGES',


Add after:
Code: Select all
// subject length in ACP - Ather   
    'legend3'            => 'SL_SETTINGS',
    'SL'      => array('lang' => 'SL',      'validate' => 'int',   'type' => 'text:4:4', 'explain' => false),
// subject length in ACP - Ather 



Open language/en/acp/board.php

Find:
Code: Select all
 'BOARD_PM_EXPLAIN'         => 'Enable or disable private messaging for all users.',


Add after:
Code: Select all
// subject length in ACP - Ather
'SL' => 'Subject Length',
// subject length in ACP - Ather



Open language/en/acp/common.php

Find:
Code: Select all
 'ACP_ADMINISTRATORS'      => 'Administrators',


Add after:
Code: Select all
// subject length in ACP - Ather
'SL_SETTINGS' => 'Subject Length Settings',
// subject length in ACP - Ather



Open includes/functions.php
Find:
Code: Select all
$template->assign_vars(array(
        'SITENAME'                        => $config['sitename'],


Add after:
Code: Select all
// subject length in ACP - Ather
'SL'      => $config['SL'],
// subject length in ACP - Ather



Open includes/functions_posting.php

Find:
Code: Select all
$subject = truncate_string($subject);


Replace with:
Code: Select all
// subject length in ACP - Ather
$subject = truncate_string($subject, $config['SL']);
// subject length in ACP - Ather



Open styles/YOURTEMPLATE/template/posting_editor.html

Find (for prosilver):
Code: Select all
<dl style="clear: left;">
        <dt><label for="subject">{L_SUBJECT}:</label></dt>
        <dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
    </dl>


Replace with:
Code: Select all
<dl style="clear: left;">
            <dt><label for="subject">{L_SUBJECT}:</label></dt>
            <dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->{SL}<!-- ELSE -->{SL}<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
        </dl> 
  • 0

User avatar
Jessica
Board Owner
Topic Author

Founder
Sapphire
Sapphire
 
15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership15 years of membership
 
Posts: 3,505
Topics: 1,244
Articles: 30
Joined: December 22nd, 2010, 8:04 pm
Local time: April 19th, 2026, 8:05 am
Last Visit: February 23rd, 2026, 9:06 pm
Location: Pennsylvania
Gender: Female
Cash on hand: 6,565.41
Bank: 160,501.08
Reputation: 148
Medals: 21
#1: July 2012 1st Place (1) R-Contest #1 First Place (1) Best staff member 2013 (1) Easter Egg Hunt 2013 (1) Graphic Drawing Participant (1) 1 Year (1) 2 Years (1) 3 Years (1) 4 Years (1) 5 Years (1)
6 Years (1) 7 Years (1) 8 Years (1) 9 Years (1) Founder (1) Highest Rep (1) Referrer (1) Top poster (1) Facebook group (1) Pin-Board (1)
Article Author (1)
Referrals: 27
Blog: View Blog (536)
Subject(s): Chinese, Math
Global Moderator
Admin
Moderator

Return to Trasℎ Can

Login  •  Register
Reputation System ©'