Essential custom BBCodes for phpBB

phpBB comes with a multitude of BBCodes that perform various functions. While most of these are sufficient for day-to-day forum activity, power users who crave for mre functionality on their boards, need custom-made BBCodes to satisfy their needs. Here is a list of most commonly used bbcodes on phpBB boards.

Video sharing

YouTube

BBCode usage :

[youtube]http://{SIMPLETEXT1}.youtube.com/watch?v={SIMPLETEXT2}[/youtube]]

HTML replacement :

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT2}&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT2}&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

Help line :

Usage:[youtube]Video URL[/youtube]

Google Video

BBCode usage :

<code>[googlevideo]{NUMBER}[/googlevideo]</code>

HTML replacement :

<code><object type="application/x-shockwave-flash" data="http://video.google.com/googleplayer.swf?docId=-{NUMBER}" width="400" height="326">
<param name="movie" value="http://video.google.com/googleplayer.swf?docId=-{NUMBER}" />
<param name="allowScriptAcess" value="sameDomain" />
<param name="quality" value="best" />
<param name="bgcolor" value="#FFFFFF" />
<param name="scale" value="noScale" />
<param name="salign" value="TL" />
<param name="FlashVars" value="playerMode=embedded" />
</object></code>

Help line :

<code>Enter the video ID number -- the video ID is a 18 digit number is after docid=- in the URL</code>

Text Alignment

Left
BBCode usage :

[left]{TEXT}[/left]

HTML replacement :

<div align="left">{TEXT}</div>

Right
BBCode usage :

[right]{TEXT}[/right]

HTML replacement :

<div align="right">{TEXT}</div>

Center
BBCode usage :

[center]{TEXT}[/center]

HTML replacement :

<div align="center">{TEXT}</div>

Spoiler

The spoiler BBCode can be used to hide spoilers from unsuspecting users. There are many ways to go about it, using Javascript or otherwise.

Without Javascript :
This BBCode adds a black background color to the text between the tags, making it unreadable unless highlighted.
Example :
This is a spoiler.
BBCode usage :

[spoiler]{TEXT}[/spoiler]

HTML replacement :

<span style="background:#000000">{TEXT}</span>

Using Javascript :
This creates a “Show” button which expands to reveal the spoiler when clicked.
Example :

Spoiler:

This is a spoiler.

BBCode usage :

[spoiler2]{TEXT}[/spoiler2]

HTML replacement :

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';        this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>

Another version :

This creates a spoiler which reveals itself on mousever.
Example :

This is a spoiler.

BBCode usage :

[spoiler3]{TEXT}[/spoiler3]

HTML replacement :

<span title="spoiler" style="color: #000000; background-color: #000000;" class="spoiler" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color=this.style.backgroundColor='#000000'">{TEXT}</span>

Strikethrough

Creates strike-through text.
Example :

Strike-through text.

BBCode usage :

[strike]{TEXT}[/strike]

HTML replacement :

<span style="text-decoration: line-through;">{TEXT}</span>

Specify font
Specifies the font to be used in the text.
Example :

This is written in Arial.

BBCode usage :

[font={SIMPLETEXT}]{TEXT}[/font]

HTML replacement :

<span style="font-family: {SIMPLETEXT};">{TEXT}</span>

Pre tag

Text enclosed by these tags will retain their formatting.

[pre]{TEXT}[/pre]

HTML replacement :

<pre>{TEXT}</pre>

Background colour

Changes the background to the specified colour.
BBCode usage :

[bgcolor={COLOR}]{TEXT}[/bgcolor]

HTML replacement :

<code><span style="background-color: {COLOR};">{TEXT}</span></code>

Horizontal line

Adds a horizontal line after text.

[hr][/hr]

HTML replacement :

<hr />

Subscript

For writing subscripted text.
Example :

Oleum – H2S2O7

BBCode usage :

[sub]{TEXT}[/sub]

HTML replacement :

<span style="vertical-align: sub;">{TEXT}</span>

Superscript

For writing superscripted text.
Example :

(a+b)2 = a2+b2+2ab

BBCode usage :

[super]{TEXT}[/super]

HTML replacement :

<span style="vertical-align: super;">{TEXT}</span>

Google Public DNS – An alternative to OpenDNS?

Google has recently launched Google Public DNS, a public DNS resolver service  with an aim to make web browsing faster and secure. OpenDNS, providing the same services and more, has been in the market since 2006. So, which one is better, and is it beneficial to switch from using OpenDNS to Google Public DNS? We will find out.

Features :

  • Performance – Both GPDNS and OpenDNS employ quite a number of tweaks to increase performance of the end users. Both load balance user traffic and implement “smart” caching techniques to speed up domain resolution.
    While this does not directly affect performance, OpenDNS has a nifty tool called CacheCheck, which can be used to check the status of a domain in OpenDNS’s cache and optionally update the domain’s DNS records in the cache. This does score some brownie points for OpenDNS.
  • Security – Even though Google Public DNS has protection against cache-poisoning, DOS and amplification attacks, it blandly admits that it doesn’t provide any content-filtering/anti-phishing/anti-malware protection.  Google says :

    Google Public DNS is not a malware-blocking service. Google Public DNS does not perform blocking or filtering of any kind

    However, OpenDNS delivers a lot in this sector. In addition to protection against cache-poisoning and other vulnerabilities, it offers web-content filtering, “PhishTank” anti-phishing, malware-protection and whitelisting/blacklisting of domains, all though a web-based dashboard. In addition to this, OpenDNS also features a community based domain tagging system, where users can tag domains into appropriate categories and check the status of an already-tagged domain.

Real-world Performance

I used Namebench to perform DNS benchmarks. The results are as follows:

Mean Response Duration

Mean Duration Graph

Fastest Individual Response Duration

Fastest Response Graph

The tests proved that Google Public DNS resolver is 5% faster than the OpenDNS resolver.

Conclusion

Even thoughthe real world test found Google Public DNS to be 5% faster than OpenDNS, it actually makes a very little difference in speed. Considering the advanced features like anti-phishing, anti-malware, content-filtering and custom-error pages, OpenDNS is recommended for both network administrators and end users.

Special Note :

Google says that it shows correct results for NXDOMAIN results, ie, due to mistyping or otherwise, if a non-existent domain is tried to be resolved, it will return an error message. OpenDNS, however, redirects such requests to it’s search page where it shows similar domains along with some sponsored links. I couldn’t decide whether this is a good or a bad move, so I didn’t include this in the evaluation process.

Enabling more then 6 simultaneous downloads in IE8

IE8 Logo

Internet Explorer 8, as it may be known, doesn’t support more than 6 parallel downloads. While downloading a large number of big files from slow servers, bypassing this limit becomes a necessity. Like the previous versions, this limit is defined in the registry, but in a different location.

To change this limit, close all instances if Internet Explorer, open the registry editor by going to Start-> Run-> regedit. Navigate to ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPER1_0SERVER’. In the right pane, find the DWORD value ‘iexplore.exe’ and change it to 15(or any other number you may want). If the DWORD entry doesn’t exist, create it by “Edit-> New->  DWORD value”, and put the name as ‘iexplore.exe’. Change the value to 15 and leave the base as Hexadecimal. Navigate to the adjacent key ‘FEATURE_MAXCONNECTIONSPERSERVER’ and perform the same actions.

Internet Explorer should now allow more than 6 simultaneous downloads.

Add canonical links to phpBB

phpbb-logo-greenIt’s old news that Google and other major search engines have added support for the <link rel="canonical"> tag to help cut down on duplicate indexing of web pages. While plugins for Wordpress, Drupal and Magneto E-Commerce have been released, there has been none such modification for phpBB, where it is, arguably, most needed.

phpBB administrators have used various methods to cut down on this duplicate indexing issue, but adding a canonical URL seems to be the most subtly effective way. Google honours this tag very strongly, and upon finding it in a web page, it should only index the canonical page.

In the view of all this, I have put together a mod for phpBB3 to add the canonical links to phpBB board pages. The Canonical URL mod adds these lines to the phpBB pages :

In the index page :

<link rel="canonical" href="http://www.example.com/" />

In the forum pages :

<link rel="canonical" href="http://www.example.com/viewforum.php?f=1" />

In the topic pages :

<link rel="canonical" href="http://www.example.com/viewforum.php?f=1&t=1" />

For global threads* :

<link rel="canonical" href="http://www.example.com/viewforum.php?t=1" />

phpBB.com support thread :

http://www.phpbb.com/community/viewtopic.php?f=69&t=1880545

Download modification :

download

Note :

Normally, global threads will have canonical URLs like this :

<link rel="canonical" href="http://www.example.com/viewforum.php?t=1" />

If you want the global threads to have canonical URLs with an “f=Y” query string, you just need to make a little change to the code. After installing the mod, open viewtopic.php.
Find :

   'U_CANONICAL'    => generate_board_url() . "/viewtopic.$phpEx?" . (($topic_data['topic_type'] == POST_GLOBAL) ? '' : "f=$forum_id&amp;") . "t=$topic_id" . (($start) ? "&amp;start=$start" : ''),

In-line Find :

? ''

Replace with :

? "f=Y&amp;"

Replace ‘Y’ with the forum id of the forum you want your global threads to belong to.

Firefox 3.5.5 available for download

Mozilla FirefixJust more than a week after the last stable release (3.5.4), Mozilla has released a small stability update for the popular browser, bringing it to version 3.5.5. This release addresses two critical bugs which crashes the browser and three other normal priority bugs. The full changelog can be viewed here.

You should be automatically prompted to upgrade to the latest version; but if you don’t feel like waiting, grab the latest release from here.