<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bright Cherry &#187; SMF- Simple Machines Forum</title>
	<atom:link href="http://www.brightcherry.co.uk/scribbles/category/smf-simple-machines-forum/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightcherry.co.uk/scribbles</link>
	<description></description>
	<lastBuildDate>Tue, 20 Dec 2011 19:54:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>SMF- Show Page Number In Thread Title</title>
		<link>http://www.brightcherry.co.uk/scribbles/smf-show-page-number-in-thread-title/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/smf-show-page-number-in-thread-title/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 22:11:14 +0000</pubDate>
		<dc:creator>adm1n</dc:creator>
				<category><![CDATA[SMF- Simple Machines Forum]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=178</guid>
		<description><![CDATA[My God, I&#8217;ve only just recently started playing around with SM Forums, and I can honestly say the documentation is God awful. At least, it&#8217;s terrible compared to WordPress. Also, it&#8217;s not coded that great- even applying the simpliest of features require plugins (&#8220;mods&#8221;, as the SMF community call them) and/or hacks. Anyways, in this [...]]]></description>
			<content:encoded><![CDATA[<p>My God, I&#8217;ve only just recently started playing around with SM Forums, and I can honestly say the documentation is God awful. At least, it&#8217;s terrible compared to WordPress. Also, it&#8217;s not coded that great- even applying the simpliest of features require plugins (&#8220;mods&#8221;, as the SMF community call them) and/or hacks.</p>
<p>Anyways, in this case, I wanted to show the page number of the thread in the page title to avoid duplicate title tags. I searched high and low for a few hours, and there is extremely tedious and ridiculous solutions floating around. Someone has even created a plugin (mod package) to apply this feature. To me, that seems a bit O.T.T. You shouldn&#8217;t need to install a mod to apply such a simple feature, right? Right. So, this is my solution&#8230;</p>
<h4>How to show page number in the thread title</h4>
<p>Open the file <b class="pink">index.template.php</b>, it should be located in the theme folder of whichever theme you&#8217;re using.</p>
<p>Search for the following 2 line:</p>

<div class="wp_codebox"><table><tr id="p1783"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p178code3"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">// ]]&gt;&lt;/script&gt;</span>
	<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span><span style="color: #0000ff;">', $context['</span>page_title<span style="color: #0000ff;">'], '</span><span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span><span style="color: #0000ff;">';</span></pre></td></tr></table></div>

<p>Replace it with:</p>

<div class="wp_codebox"><table><tr id="p1784"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p178code4"><pre class="php" style="font-family:monospace;">  <span style="color: #666666; font-style: italic;">// ]]&gt;&lt;/script&gt;';</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$context</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_info'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'current_page'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span> 
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;title&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$context</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; [Page &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$context</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_info'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'current_page'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;]&lt;/title&gt;&quot;</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span> 
  <span style="color: #b1b100;">else</span> 
  <span style="color: #009900;">&#123;</span> 
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;title&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$context</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page_title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/title&gt;&quot;</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Save changes, upload the file.<br />
It&#8217;s as simple as that.</p>
<p>Lord only know why there&#8217;s so much static noise over this issue.</p>
<p>If anyone tries this, please let me know how you get on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/smf-show-page-number-in-thread-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

