[ABD] Custom Title Mod 3.0.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: [Beta] Custom Title Mod 3.0.0

Post by DragonMaster1 »

Here is a web page I saved that you have to read in a browser that might help with this question

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Increase Subject Length @ phpBB Smith</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="Author" content="Jeremy Rogers">
	<meta name="Keywords" content="mods modifications hacks addon modded forum fora message board chat support development download template styles">
	<meta name="Description" content="A brief tutorial explaining how to increase the allowed length of subjects in phpBB 3.">
	<link rel="shortcut icon" href="http://www.phpbbsmith.com/favicon.ico">
	<link rel="stylesheet" href="/css/smith.css" type="text/css">
		<link rel="stylesheet" href="/css/hacks.css" type="text/css" />
		<link rel="alternate" href="http://www.phpbbsmith.com/mb/rss.php?f=7&t=1" type="text/xml" title="RSS Feed">
	<script language="JavaScript" src="/common/site.js"></script>
</head>
<body id="top">

<div id="header">
	<div id="logo">phpBB Smith</div>
	<div id="tagline">Forging Refinements For Your Forum</div>
</div>
<script language="JavaScript" src="/common/select_expand1.js"></script>

<div id="advert">
	<script type="text/javascript"><!--
google_ad_client = "pub-8635322004979966";
google_alternate_ad_url = "http://www.phpbbsmith.com/inc/altad.php";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "8B4513";
google_color_bg = "FFEBCD";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>

<div id="breadcrumb">
	<a href="/" title="Back to phpBB Smith">phpBB Smith</a>
			&mdash;> <a href="/support.html" title="Back to Support">Support</a>
		&mdash;> <a href="/support.html#customize-bb3" title="Back to Customize Your phpBB 3 Forum">Customize Your phpBB 3 Forum</a>
			&mdash;> Increase Subject Length	</div>

<table border="0" cellpadding="0" cellspacing="0" id="pagecols">
	<tr valign="top">
		<td id="leftcol">
<div id="topmenu">
<ul>
		<li><a href="/index.html">Home</a></li>
		<li class="block">Refinements</li>
	<li class="indent"><a href="/refinements.html" title="Modifications, Hacks, Templates, and More">Downloads</a></li>
	<li class="indent"><a href="/support.html" title="Guides and help for using phpBB.">Support</a></li>
	<li class="indent"><a href="/book.html" title="Info on my books!">Books</a></li>
	<li><a href="/utilities.html" title="Scripts to help you">Utilities</a></li>
	<li class="indent"><a href="/generate-db.html" title="Run SQL without installing extra programs">DB Update</a></li>
	<li><a href="/mb/forums.html" title="Help for projects based on this site.">Support Board</a></li>
		<li class="indent"><a href="/mb/login.html" rel="nofollow">Log In</a></li>
	
		<li><a href="/awards.html" title="Recognition from the phpBB Community">Awards</a></li>
	<li><a href="/about.html" title="About the Author and Site">About Us</a></li>
	<li><a href="/mail.html" title="Send feedback.">Contact Us</a></li>
	<li><a href="/mailinglist.html" title="Subscribe for News.">Get Updated</a></li>
	<li><a href="/donate.html" title="Show your support.">Link to Us</a></li>
</ul>
</div>


	
		</td>
		<td id="maincol" rowspan="3">
<div id="content">
		<h1>Increase Subject Length</h1>
	
	
		<p class="start">
	By default, phpBB 3 limits the length of post and topic subjects to 60 characters. In some boards, it is desirable to allow longer subjects, so this is a guide to hacking your phpBB to increase the limit. We will use 120 as the new subject length here, but you can use a different number by simply changing 120 to that number in the instructions that follow.	</p>
		<p>
	Before beginning, let me point out some limitations of this guide and the methods we will be using. The maximum subject length allowed by the MySQL database software is 255 characters, and this cannot be exceeded by the methods we will be using (there is a way, which we'll look at later). Other database management software (DBMS) may have different character limits. We will also be using SQL queries to alter the database tables. These queries are written for use in MySQL. If you are using another DBMS, you may need to edit the queries before you can use them. Now, on to the hacking!	</p>
		<p>
	There are three steps to increasing the subject length. First, you may need to run a few SQL queries. If you plan to use subject lengths of 100 characters or less, you can skip the queries. They're only needed when going over 100 characters.	</p>
		<p>
	You can run the needed queries using a database utility like phpMyAdmin or a <a href="/generate-db.html">Database Update script</a>. If you use phpMyAdmin, you may need to change the <span class="bold">phpbb_</span> prefix of the database table names in these queries. Database Update scripts will handle that automatically.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>ALTER TABLE phpbb_posts CHANGE post_subject post_subject varchar(120) DEFAULT '' NOT NULL;
ALTER TABLE phpbb_topics CHANGE topic_title topic_title varchar(120) DEFAULT '' NOT NULL;
ALTER TABLE phpbb_drafts CHANGE draft_subject draft_subject varchar(120) DEFAULT '' NOT NULL;
ALTER TABLE phpbb_forums CHANGE forum_last_post_subject forum_last_post_subject varchar(120) DEFAULT '' NOT NULL;
ALTER TABLE phpbb_privmsgs CHANGE message_subject message_subject varchar(120) DEFAULT '' NOT NULL;
ALTER TABLE phpbb_topics CHANGE topic_last_post_subject topic_last_post_subject varchar(120) DEFAULT '' NOT NULL;
<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	The second step is to prevent phpBB 3 from cutting off the subjects after 60 characters. This requires a small change in includes/functions_posting.php. Locate the following lines in this file.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>	$subject = truncate_string($subject);
	$data['topic_title'] = truncate_string($data['topic_title']);<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	Replace those lines with these altered versions. Remember to change the 120 on each of these lines if you are using a different length.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>	$subject = truncate_string($subject, 120);
	$data['topic_title'] = truncate_string($data['topic_title'], 120);<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	The third and final step is to edit the templates installed on your forum so that longer subject can be entered. As you may know, different templates tend to use very different coding.  We'll look at both prosilver and subsilver2, but in other styles the lines may be different. If you cannot find these exact lines, try looking for a line containing <span class="code">name="subject"</span> or <span class="code">name='subject'</span>.	</p>
		<p>
	First up is prosilver; look for this line in posting_editor.html.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>		<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>
<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	This is the matching line in subsilver2's posting_body.html.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>	<td class="row2" width="78%"><input class="post" style="width:450px"
type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->"
tabindex="2" value="{SUBJECT}" /></td>
<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	In each file, check the line you've located to see if it contains the text <span class="code">maxlength</span>. If you find the line does not contain maxlength, you can skip this step. No edits are required here when there is no maxlength set. 	</p>
		<p>
	In the two default templates, you can see this:<br />
<span class="code">maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->"</span>	</p>
		<p>
	Note the two numbers in there: 60 and 64. These numbers need to be changed to the length you are using for subjects. The number following S_NEW_MESSAGE (60, here), is changed to your desired length; 120 for the example. The second number is changed to that plus 4, or 124 for the example. Below is a sample of the prosilver line edited in this way.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>		<dd><input type="text" name="subject" id="subject" size="45"
maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->"
tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	Now your posters can enter subject lines of greater length when making, editing, or replying to topics.	</p>
	
		
		<h2 class="subhead">Allowing More Than 255 Characters</h2>
	
		<p class="start">
	Above, I mentioned before that there is a 255 character limit when changing the allowed subject length with the method described. There is one way to exceed this length, but you must be careful when using it. This alternate method allows subjects that can potentially be much longer, even as long as a full post.	</p>
		<p>
	To use this method, you need to run a different set of SQL queries. A third query is included here for private message subjects, which was did not need to be changed with the other method. If you want to keep those at their default limit of 255 characters, skip that query. MySQL users can replace TEXT with TINYTEXT in these queries for shorter (but still very long) subject allowances.	</p>
		<p>
	<script type="text/javascript" src="/common/select_expand_bbcodes.js"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].writeCmd();
//-->
</script>
<pre class="code"><script type="text/javascript">
<!--
		SXBB[id].writeDiv();
//-->
</script>ALTER TABLE phpbb_posts CHANGE post_subject post_subject TEXT NOT NULL;
ALTER TABLE phpbb_topics CHANGE topic_title topic_title TEXT NOT NULL;
<script type="text/javascript">
<!--
		document.write('</div>');
//-->
</script></pre>	</p>
		<p>
	Once you have run these queries, the second and third steps of the first method must also be carried out as described above. The number you use in place of 120 in those steps will be the maximum limit of subjects allowed from the posting form. You can use whatever number you wish.	</p>
	
	</div>
		</td>
	</tr>
		<tr>
		<td class="bottomad">
			<script type="text/javascript"><!--
google_ad_client = "pub-8635322004979966";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "8B4513";
google_color_bg = "FFEBCD";
google_color_link = "0000CC";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>		</td>
	</tr>
			<tr>
		<td class="bottomad">
			<script type="text/javascript"><!--
google_ad_client = "pub-8635322004979966";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
//2006-11-02: Smith Tall ads
google_ad_channel = "8722445169";
google_color_border = "8B4513";
google_color_bg = "FFEBCD";
google_color_link = "0000CC";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>		</td>
	</tr>
		</table>

<div id="breadcrumb">
	<a href="/" title="Back to phpBB Smith">phpBB Smith</a>
			&mdash;> <a href="/support.html" title="Back to Support">Support</a>
		&mdash;> <a href="/support.html#customize-bb3" title="Back to Customize Your phpBB 3 Forum">Customize Your phpBB 3 Forum</a>
			&mdash;> Increase Subject Length	</div>


	<div id="footer">
		&copy; 2002-2008 by <a href="/about.html" title="About phpBB Smith">phpBB Smith</a>
		(<a href="/copydetails.html" title="Further copyright information.">Disclaimers and Details</a>).
		&nbsp; &nbsp;
		<a href="/privacy.html">Privacy Policy.</a>
	</div>
</body>
</html>

Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

Re: [Beta] Custom Title Mod 3.0.0

Post by Agent F »

Thanks for the clarification. I'll go try it out. :)
Image

Lord Phobos
Registered User
Posts: 613
Joined: Tue May 18, 2004 11:41 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by Lord Phobos »

There aren't any chances to a reply with an update on how to solve my issue?

User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: [Beta] Custom Title Mod 3.0.0

Post by DragonMaster1 »

Lord Phobos wrote:The mod worked until I created a group with special permission to administrate arcade games.
Then, it stopped showing the field in UCP.

Today, I deleted this group, but the problem is still there.

I’d suggest the COMPLETELY REMOVE the mod and then reinstall as you must have messed something up as it works to do THAT for all my mods who are in the special mods group

Lord Phobos
Registered User
Posts: 613
Joined: Tue May 18, 2004 11:41 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by Lord Phobos »

I'll try and let you know.

andy2295
Registered User
Posts: 519
Joined: Tue Mar 25, 2008 4:36 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by andy2295 »

Lord Phobos wrote:I'll try and let you know.
It should solve your problem

User avatar
PrattP
Registered User
Posts: 147
Joined: Sun Oct 21, 2007 6:26 am
Contact:

Re: [Beta] Custom Title Mod 3.0.0

Post by PrattP »

Did you find any problems after testing it again andy?

I'm still getting the weird problem where it doesn't appear as a permission option. :?

Lord Phobos
Registered User
Posts: 613
Joined: Tue May 18, 2004 11:41 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by Lord Phobos »

andy2295 wrote:
Lord Phobos wrote:I'll try and let you know.
It should solve your problem
But what should I do with the db fields?
Delete and recreate them, or leave them as they are?

andy2295
Registered User
Posts: 519
Joined: Tue Mar 25, 2008 4:36 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by andy2295 »

PrattP wrote:Did you find any problems after testing it again andy?

I'm still getting the weird problem where it doesn't appear as a permission option. :?
I have just installed it again and permissions are there

andy2295
Registered User
Posts: 519
Joined: Tue Mar 25, 2008 4:36 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by andy2295 »

Lord Phobos wrote:
andy2295 wrote:
Lord Phobos wrote:I'll try and let you know.
It should solve your problem
But what should I do with the db fields?
Delete and recreate them, or leave them as they are?
Providing they are the same as the xml instructions you can leave them

Aexoden
Registered User
Posts: 364
Joined: Mon Jan 14, 2002 1:18 am
Location: Medical Lake, WA
Name: Jason Lynch
Contact:

Re: [Beta] Custom Title Mod 3.0.0

Post by Aexoden »

Just to be clear: on the latest version I released myself (2.0 Beta 2 I think?) there were no known bugs. A few people reported issues, but I was unable to reproduce any of them myself, and every case I investigated personally turned out to be either a misinstallation or a conflict with another MOD.

Of course, the last phpBB version I know for sure I've tested was 3.0.2, so it's possible something important has changed since then, but I seem to recall checking it out on at least 3.0.3. Of course, I'm 99% uninterested in this project anymore, which is largely why I accepted when Andy offered to take it off my hands. I might still be occasionally useful though. ;)

neo4u
Registered User
Posts: 162
Joined: Sun May 25, 2008 2:25 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by neo4u »

I still have Aexoden's version installed as I only put it on my forum yesterday.

The problem I have and have only just noticed is that my permissions page on my forum is just an entirely blank white page now. yet every other tab in admin panel works fine.

Anyone have any ideas on how to resolve this?

neo4u
Registered User
Posts: 162
Joined: Sun May 25, 2008 2:25 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by neo4u »

ok enabled debug in the cofig.php and got this:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_pm_viewmessage.php on line 179: Undefined index: custom_title
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3865: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3867: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3868: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3869: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3208)
Any ideas anyone?

andy2295
Registered User
Posts: 519
Joined: Tue Mar 25, 2008 4:36 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by andy2295 »

Perhaps my good friend Aexoden will answer this for you as you have his version installed. Do not get this error message in this current version

neo4u
Registered User
Posts: 162
Joined: Sun May 25, 2008 2:25 pm

Re: [Beta] Custom Title Mod 3.0.0

Post by neo4u »

Are you saying that if I remove the old version and install this one I will not have this problem?

What database tables would I have to drop?
Last edited by neo4u on Wed Apr 15, 2009 11:57 am, edited 1 time in total.

Locked

Return to “[3.0.x] Abandoned MODs”