/*************************************************************
 Commenter Plugger Hack For b2
 by Dodo
 http://pure-essence.net
*************************************************************/

This hack is for those posters who like to plug their commenters. you can now plug with much ease. this script lists all the distinct commenters of certain entry or numerous entries as you request.

see a screenshot
http://pure-essence.net/images/b2commenter_screenshot.gif

it's very easy to install. just upload my hack and add a link to your b2menutop.php, that's it.



**********
STEP 1
**********

Open:
	b2commenter.plugger.php

Edit:
	/* names of commenters you wish to exclude, i.e. yourself */
	$exclude_author[] = "dodo"; // change it to something else
	$exclude_author[] = ""; // change it to something else
	$exclude_author[] = ""; // add more if necessary

Put in there:
	Any authors you wish to exclude from plugging. Add as many as you wish.

Then:
	Upload b2commenter.plugger.php into the directory where your b2config.php is.




*********
STEP 2
*********
Open:
	b2header.php
Find:
	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");
	}

Add below:
	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&&copytoclip==1){
			therange=tempval.createTextRange()
			therange.execCommand("Copy")
			window.status="Contents highlighted and copied to clipboard!"
			setTimeout("window.status=''",1800)
		}
	}

Save and upload


*********
STEP 3
*********

Open:
	b2-include/b2menutop.php

Find:
	<a href="b2edit.php" class="menutop" style="font-weight: bold;">Post / Edit</a><?php echo $sep ?>

Add after that:
	<a href="javascript:commenter()" class="menutop">Commenter Plugger</a><?php echo $sep ?>

Save and upload



*********
DONE
*********
Log in as usual and click on the commenter plugger link at the top menu to view the popup.



To discuss:
http://tidakada.com/board/viewtopic.php?p=14801

/**********
 LOG
**********/
Released: May 20, 2003
Updated: Making it a popup, allowing alphabetizing, select all and copy javascript added.