About

This hack was not made/written by me. It was written by the very talented and popular Dodo. All credits to her. I am just making a tutorial for people who are new to B2 and are lazy like me to plug their commenters manually.

B2 Commenter Plugger

Download this file. Unzip it and open b2commenter.plugger.php in notepad.
Edit the following, put there the names of authors/commenters you don't want to plug, like yourself.

/* names of commenters you wish to exclude*/
$exclude_author[] = "dodo"; //
$exclude_author[] = "kanu"; //
$exclude_author[] = "anyone"; //


Right click > select all> CTRL+C to copy the code.

Upload b2commenter.plugger.php to the b2 directory. Download b2header.php and open in notepad. Find the code below:

function profile(userID) {
window.open ("b2profile.php?action=viewprofile&user="+userID,
"Profile", "width=500, height=450, location=0, menubar=0, resizable=0,
scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60,
screenY=60, top=60");
}
Just below it add the following code:

function commenter() {
window.open ("b2commenter.plugger.php", "Commenter", "width=550,
height=500, location=0, menubar=0, resizable=1, scrollbars=1, status=1,
titlebar=0, toolbar=0, screenX=60, left=60,
screenY=60, top=60");
}
var copytoclip=0
function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&©toclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="Contents highlighted and copied to clipboard!"
setTimeout("window.status=''",1800)
}
}
Save and upload the file overwriting the original one. Download b2-include/b2menutop.php and open in notepad, find the code below:

<a href="b2edit.php" class="menutop" style="font-weight: bold;">Post / Edit<?
php echo $sep ?>
Right after that add the code below:

<a href="javascript:commenter()" class="menutop">Commenter Plugger</a><?
php echo $sep ?
Upload it and overwrite the original file. Thats it, you will see the 'commenter plugger' link on top when you click post/edit entries, which will open in pop up.


Note: Whenever you install hacks on any script, always keep backup files so in case if soemthing goes wrong, you can put the original files back up. Any questions regarding this tutorial should be asked here.


« Back