<?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>PCR&#039;s notepad &#187; MyBB</title>
	<atom:link href="http://notepad.patheticcockroach.com/category/software/mybb/feed/" rel="self" type="application/rss+xml" />
	<link>http://notepad.patheticcockroach.com</link>
	<description>The area in patheticcockroach.com where the EEG isn&#039;t isoelectric</description>
	<lastBuildDate>Fri, 30 Jul 2010 11:13:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Rel=nofollow in MyBB&#8217;s links</title>
		<link>http://notepad.patheticcockroach.com/519/relnofollow-in-mybbs-links/</link>
		<comments>http://notepad.patheticcockroach.com/519/relnofollow-in-mybbs-links/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 06:30:33 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[MyBB]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=519</guid>
		<description><![CDATA[Yesterday I had to do some cleaning on the low-traffic Wiki4Games BBS, running MyBB. Basically the spammers registered accounts which never posted (so I barely noticed those account creations) and had a few (usually 1 or 2) spam links in their signature. In case you start thinking a spam signature is harmless as long as [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I had to do some cleaning on the low-traffic Wiki4Games BBS, running MyBB. Basically the spammers registered accounts which never posted (so I barely noticed those account creations) and had a few (usually 1 or 2) spam links in their signature. In case you start thinking a spam signature is harmless as long as you don&#8217;t post with it, let me remind you that the signature appears on the user&#8217;s profile. So it gets seen by you-know-who-who-browses-everywhere. I found a <a href="http://mods.mybboard.net/view/nofollow-website-links">MyBB mod to nofollow user websites</a>, but no equivalent for signatures. I don&#8217;t think it&#8217;s easily feasible to nofollow specifically the links in the signature, so I went for the parser, i.e. I tried to nofollow all links posted within a [url] tag (NB: this also works on URLs posted without the url tag, as long as they&#8217;re identified as url by the parser). No further ado, here it is:</p>
<ul>
<li>Open <em>inc/class_parser.php</em></li>
<li>In <code>function mycode_parse_url</code>, find:<br />
<code>$link = "&lt;a href=\"$fullurl\" target=\"_blank\"&gt;$name&lt;/a&gt;";</code></li>
<li>Replace it with:<br />
<code>$link = "&lt;a href=\"$fullurl\" target=\"_blank\" rel=\"nofollow\"&gt;$name&lt;/a&gt;";</code></li>
</ul>
<p>Save, upload, and you&#8217;re done.</p>
<p>As for the website URL from the website field, well, do as indicated on <a href="http://mods.mybboard.net/view-resource/change-users-website-url-to-nofollow">this tutorial</a>, which summarizes as: add rel=nofollow in the postbit_www template. Or, better (this will also deal with the website on the user profile page and not just on the &#8220;www&#8221; button), install the previously mentionned <a href="http://mods.mybboard.net/view/nofollow-website-links">NoFollow Website Links</a> extension.</p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/519/relnofollow-in-mybbs-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controling signature size in MyBB</title>
		<link>http://notepad.patheticcockroach.com/370/controling-signature-size-in-mybb/</link>
		<comments>http://notepad.patheticcockroach.com/370/controling-signature-size-in-mybb/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 08:09:32 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[MyBB]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=370</guid>
		<description><![CDATA[Today on the Wiki4Games BBS I had to deal with a way too large user signature. Eventually, I came up with several ways to solve the problem: At first I installed a plugin called Image signature Limit. I don&#8217;t know for sure if it works fine, as I didn&#8217;t test it specifically. The problem with [...]]]></description>
			<content:encoded><![CDATA[<p>Today on the Wiki4Games BBS I had to deal with a way too large user signature. Eventually, I came up with several ways to solve the problem:</p>
<p>At first I installed a plugin called <a href="http://mods.mybboard.net/view/image-signature-limit-1-0">Image signature Limit</a>. I don&#8217;t know for sure if it works fine, as I didn&#8217;t test it specifically. The problem with this plugin is that it doesn&#8217;t fix signatures which have been created in the past, and also it only takes care about the pictures, not the text size. So I left it enabled to prevent further submissions of too huge sig pictures, and I looked after another solution: manual style edits.</p>
<p>In MyBB you can edit templates and styles from the admin panel. Of course this is very tedious if you use several templates, but luckily for me I use only one, so this solution is good for me.</p>
<ol>
<li>open the <em>postbit_signature</em> template. Its content should be:<br />
<code>&lt;hr size="1" width="25%"  align="left" /&gt;<br />
{$post['signature']}</code><br />
Replace it with<br />
<code>&lt;div class="signature"&gt;<br />
{$post['signature']}<br />
&lt;/div&gt;</code></li>
<li>open <em>global.css</em> and add:<br />
<code>.signature img {max-width:600px; max-height:150px; overflow:hidden;}<br />
.signature {border-top: 1px solid #aaaaaa; width:100%; margin-top:1em; padding-top:0.2em; max-height:200px; overflow:hidden;}</code></li>
</ol>
<p>That&#8217;s it. You can change the maximum height and width you want, of course. We also replaced the very ugly &lt;hr&gt; with a lighter 100% width border, of course this part is optional, it&#8217;s not needed to limit the signature size but very needed to give a decent look to the board IMO. The max-height and max-width attributes are, as far as I know, part of the CSS 2 specification, and work on Firefox, Opera, Safari, MSIE 7+.</p>
<p>This &#8220;tutorial&#8221; was tested using the Default theme on MyBB 1.4.7. At the time I&#8217;m writing you can view the result on <a href="http://bbs.wiki4games.com">http://bbs.wiki4games.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/370/controling-signature-size-in-mybb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
