phpBB 3.0.RC1 Hacks


I'd be surprised if these still work in RC2 :-)

1. Quick Reply MOD

Adds Quick Reply with the smilies [ Preview ] box. Only subsilver2 was modified in this version and this has NOT been submitted as an official MOD to the phpBB Group. Do a source compare instead, which you should always be doing. Needs some further editing of the template if you want it to look the same in most browsers.

Update:
You might want to comment/remove line #49 of:

\styles\subsilver2\template\editor.js
so it wont set the focus to the <textarea> on page load using IE (checked on 6.0). Thanks to Haynes for noticing :-)



2. anonym.to hack

Anonymize your outgoing links using anonym.to service.

Update:
Internal links (i.e. links having your forum URL as part of the target address) are excluded.

File to edit: \includes\functions.php
Function to edit: make_clickable_callback()

Search for:
Code:
switch ($type)

Add this line directly above it:
Code:
$url = preg_replace("|((http:\/\/(\w+\.)?anonym.to\/\?)*)(.*)|i", '${4}', $url);

Search for:
Code:
$url = htmlspecialchars($url);

And replace with:
Code:
$url = ( (strpos($url, generate_board_url()) === false) ? 'http://www.anonym.to/?' : '' ) . htmlspecialchars($url);

3. Spoiler BBCode (so not really a hack)

Adds a spoiler bbcode ala-AnimeSuki [ Preview ]

BBCode usage:
Code:
[spoiler]{TEXT1}[/spoiler]

HTML replacement:
Code:
<div style="margin:20px;margin-top:5px">
  <div class="quotetitle"><strong>Spoiler:</strong> <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;">{TEXT1}</div>
  </div>
</div>

Help line:
Code:
Spoiler Tag

Display on posting page:
Code:
[ checked ]

No comments: