Log in

View Full Version : Moderators Functions - Inline Usernote Adder


Alan @ CIT
05-16-2006, 10:00 PM
Inline Usernote
Version 1.0

What does it do?
This little mod allows you to add Usernotes directly from the postbit when browsing a thread. It uses Ajax to post the usernote, so your page isn't refreshed at all.

You can post the note then carry on reading the thread without being disturbed.

Great! How do I install?
To install, follow these steps:

Step 1) Upload the contents of the upload folder to your forum (2 files)
Step 2) Import the Product XML as normal
Step 3) Edit the postbit template as follows:


Find
</table>
</div>
<!-- / post $post[postid] popup menu -->



(hint, it's a few lines up from the very bottom)


ABOVE the </table>, add the following:


<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
<td class="vbmenu_option"><a href="#" onClick="post_note($post[userid]); return false;">$vbphrase[inline_usernote_add_usernote]</a>
</if>


Now save the template.


Step 4) All done!



All done! How do I use it?

When you view a thread, click on the users name to being up the dropdown menu. You should now see a "Add Usernote" option there. Clicking this will bring up a prompt allowing you to enter the note you wish to add. Click OK on this, and it will confirm that the usernote was entered (or give you an error).

That's it!

Important: Unfortunately, my leased vBulletin licence has now expired, and I won't be renewing it until September which means I will be unable to reply to this thread, or update this mod until then. I'm hopeful that the great vBulletin.org community will step in to answer any questions in my absence though :) See you all in early September! :D

Alan @ CIT
05-17-2006, 07:55 PM
Known Bugs: None!

eNforce
05-17-2006, 08:55 PM
Slick! Works fine here...

Cybertims
05-17-2006, 09:35 PM
Then were do you see this note??

tei727
05-17-2006, 09:36 PM
I've got nada when I install it.

Guest190829
05-17-2006, 11:39 PM
Wow Alan, this modification saved my marriage! *clicks install*

Stop
05-17-2006, 11:52 PM
Nice one.
Installed.

Boofo
05-18-2006, 12:18 AM
So this doesn't use the editor for the note, right? Interesting idea. ;)

Guest190829
05-18-2006, 01:05 AM
So this doesn't use the editor for the note, right? Interesting idea. ;)

Yes, very interesting idea. How do you come up with this stuff? :D

Boofo
05-18-2006, 01:37 AM
Yes, very interesting idea. How do you come up with this stuff? :D

I'm very astute (and it's killing me!) :cross-eyed:

Alan @ CIT
05-18-2006, 04:33 AM
Then were do you see this note??

You can view Usernotes as normal under the users profile.

Thanks to everyone who's installed, and thanks to Danny for letting me steal his hack ideas :D

Thanks,
Alan.

Boofo
05-18-2006, 04:36 AM
Is there any way top make the script box more than one line for longer notes?

rmxs
05-18-2006, 04:56 AM
iNSTLLED

Very good we save time with this :)
Im going to drink coffee now LOL

Alan @ CIT
05-18-2006, 05:49 AM
Boofo: Not that I can find. It's a standard Javascript prompt() box, and despite my searching, it seems it can only be 1 line.

Thanks,
Alan.

Boofo
05-18-2006, 06:37 AM
Boofo: Not that I can find. It's a standard Javascript prompt() box, and despite my searching, it seems it can only be 1 line.

Thanks,
Alan.

Ok, no problem, sir. ;)

This will be good for quick notes on the fly, though. I can still use the full editor later if I need to. ;)

projectego
05-18-2006, 07:45 AM
Great idea Alan, I will certainly use this. Cheers! ;)

tei727
05-18-2006, 10:49 AM
I performed the install but there's nothing added...

Alan @ CIT
05-18-2006, 11:01 AM
tei727: What do you mean "there's nothing added" - do you mean the Add Usernote option doesn't appear? or that the usernote isn't added? if so, do you get any javascript or PHP errors? any popup boxes, etc?

Thanks,
Alan.

ngontran
05-18-2006, 02:33 PM
Sorry for being a dummy! ;p
If any one can tell me what is the usernote use for ?! Is it for members commencing each other personally?
thanks in advance

Alan @ CIT
05-18-2006, 06:26 PM
Usernotes are little text notes that Admins/mods can add to user accounts. For example, if a user is constantly picking fights with other users, a mod could add a note to his account saying "Known trouble maker - look at thread history - 1 more warning then ban?" - only other mods/admins could read this note.

Another example - an admin might see the good work a user is doing in helping his fellow members, so will put a usernote on his account saying "Helpful user, possible new moderator".

It's just easier than writing things on post-it-notes, plus all other mods/admins can see the notes (if you give them permission to) :)

Thanks,
Alan.

Snake
05-18-2006, 08:50 PM
I'll check this out later. Thanks.

Antivirus
06-01-2006, 04:55 AM
this is brilliant Allan, thanks!

Boofo
06-01-2006, 07:11 AM
Not to nitpic here, but I think you forget the TR tags and the cloing TD tag in your postbit edit. ;)

This:

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
<td class="vbmenu_option"><a href="#" onClick="post_note($post[userid]); return false;">$vbphrase[inline_usernote_add_usernote]</a>
</if>

Should be this:

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">
<tr><td class="vbmenu_option"><a href="#" onClick="post_note($post[userid]); return false;">$vbphrase[inline_usernote_add_usernote]</a></td></tr>
</if>