vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Moderators Functions - Inline Usernote Adder (https://vborg.vbsupport.ru/showthread.php?t=115910)

Alan @ CIT 05-16-2006 10:00 PM

Inline Usernote Adder
 
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
Code:

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


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


ABOVE the </table>, add the following:


Code:

<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

Quote:

Originally Posted by Boofo
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

Quote:

Originally Posted by Danny.VBT
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

Quote:

Originally Posted by Cybertims
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

Quote:

Originally Posted by Alan @ CIT
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:

HTML Code:

<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:

HTML Code:

<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>



All times are GMT. The time now is 06:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01190 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete