Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Usernote In Postbit v.2.0 Details »»
Usernote In Postbit v.2.0
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 11-17-2005 Last Update: Never Installs: 23
Uses Plugins
 
No support by the author.

Modded by tnguy3n

Port of my Usernote In Postbit v.1.2 for vb3.0

This mod shows number of usernote in postbit. It only shows when the user has a note.

Installation time: 1-2 mins
Plugin: 1
Tempate mod: 1

#--------------
INSTALLATION:

1. Upload plugin-usernote.xml in Plugin Manager

2. Open postbit (or postbit_legacy) template,

FIND:
HTML Code:
				<div>
					$vbphrase[posts]: $post[posts]
				</div>
BELOW, ADD:
HTML Code:
				<if condition="$post[usernote]"><div>
					Usernote: <a href="usernote.php?$session[sessionurl]u=$post[userid] title="see $post[username]'s usernotes">$post[usernote]</a>
				</div></if>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 12-21-2005, 12:39 PM
J82980BA3E43 J82980BA3E43 is offline
 
Join Date: May 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xplorer4x4
NOT TESTED but try:
PHP Code:
<if condition="$post[usernote]AND "is_member_of($bbuserinfo, array(1,2,3))"><div>
                    
Usernote: <a href="usernote.php?$session[sessionurl]u=$post[userid] title="see $post[username]'s usernotes">$post[usernote]</a>
                </div></if> 
And replace 1,2,3 with the porper usergroup ids.
Thanks for your answer, but he does not do it he gives a error

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING
Reply With Quote
  #23  
Old 12-22-2005, 12:49 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:
HTML Code:
<if condition="$post[usernote] AND is_member_of($bbuserinfo, array(1,2,3))"><div>
                    Usernote: <a href="usernote.php?$session[sessionurl]u=$post[userid] title="see $post[username]'s usernotes">$post[usernote]</a>
                </div></if>
Reply With Quote
  #24  
Old 12-22-2005, 01:36 PM
J82980BA3E43 J82980BA3E43 is offline
 
Join Date: May 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
Try:
HTML Code:
<if condition="$post[usernote] AND is_member_of($bbuserinfo, array(1,2,3))"><div>
                    Usernote: <a href="usernote.php?$session[sessionurl]u=$post[userid] title="see $post[username]'s usernotes">$post[usernote]</a>
                </div></if>

Yes thanks man these won works
but have him what-adapted


HTML Code:
<if condition="$post[usernote] AND is_member_of($bbuserinfo, array(6,7))"><div>
					<a title="$post[usernote]" href="usernote.php?$session[sessionurl]u=$post[userid]"> 
					<img src="images/buttons/notes.gif" href="usernote.php?$session[sessionurl]u=$post[userid] title=" border="0" /></a>
				</div></if>
Reply With Quote
  #25  
Old 06-07-2006, 05:26 PM
jdh jdh is offline
 
Join Date: Mar 2005
Location: Toronto
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, one suggestion I would have for reducing the queries on boards where only admins/mods are using the notes feature would be to put the conditional in the actual plug-in....

Basically, an IF wrapper like the following around the existing XML code seems to work quite well (blatantly 'borrowed' from the MEMBER.PHP file):

Code:
if
   (
        $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canpostothersusernotes']
   )
This actually has two benefits... The first is that the database query will only run for those users who can actually see the user notes. Further, it's better than hard-coding a group conditional into the template. This just uses the standard vBulletin permissions to determine if a user can view their own notes and/or others notes, and if they can, then the query will run and the $post['usernote'] value will be populated.

I've tested this on my own board, and it seems to work quite well.

To be fair, this doesn't reduce the queries for boards where everybody can see usernotes about each other, but it will help for those boards where usernotes are used for admin-only purposes.
Reply With Quote
  #26  
Old 06-07-2006, 05:45 PM
eXaulz eXaulz is offline
 
Join Date: Oct 2004
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hint: You could simply construct an Array of all users that posted in the Thread, then add to the Array how many usernotes they have, if they have any, the username and userid, etc. It's just one query that you'll be adding, if you do this method. Then, in the postbit, just call something like:

PHP Code:
<?php

<if condition="$user_details[ THE_USER_ID_OF_THE_POST_CREATOR ]['usernotes_count'] != 0">
Total Usernotes: <a href="usernote.php?uid=$user_details[ THE_USER_ID_OF_THE_POST_CREATOR ]['userid']">$user_detailsTHE_USER_ID_OF_THE_POST_CREATOR ]['usernotes_count']</a>
</if>

?>
Atleast I think that would work.
Reply With Quote
  #27  
Old 06-14-2006, 06:36 PM
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Location: MN
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anoter idea. Create user field (private) and update it using cron job.
Reply With Quote
  #28  
Old 07-18-2006, 02:52 PM
Razasharp's Avatar
Razasharp Razasharp is offline
 
Join Date: Feb 2005
Location: UK
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ig@r
Anoter idea. Create user field (private) and update it using cron job.
This sounds like the most efficient solution... anyone know how to create such a cron/script?
Reply With Quote
  #29  
Old 01-26-2007, 10:45 PM
Caerydd's Avatar
Caerydd Caerydd is offline
 
Join Date: Mar 2006
Location: UK
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance of something like this for vb 3.6.4 ?
Reply With Quote
  #30  
Old 11-01-2007, 11:12 AM
anestetic anestetic is offline
 
Join Date: Mar 2007
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for 3.6.8 ?
yokmu 3.6.8 için uye notlarını profilde göstermeye yarayan eklenti?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:51 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.04458 seconds
  • Memory Usage 2,308KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (5)bbcode_html
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete