vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Usernote In Postbit v.2.0 (https://vborg.vbsupport.ru/showthread.php?t=101088)

J82980BA3E43 12-21-2005 12:39 PM

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

tnguy3n 12-22-2005 12:49 PM

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>


J82980BA3E43 12-22-2005 01:36 PM

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 https://vborg.vbsupport.ru/external/2005/12/3.gif
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>

http://img386.imageshack.us/img386/4716/pics1hc.jpg

jdh 06-07-2006 05:26 PM

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.

eXaulz 06-07-2006 05:45 PM

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

Ig@r 06-14-2006 06:36 PM

Anoter idea. Create user field (private) and update it using cron job.

Razasharp 07-18-2006 02:52 PM

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?

Caerydd 01-26-2007 10:45 PM

any chance of something like this for vb 3.6.4 ?

anestetic 11-01-2007 11:12 AM

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


All times are GMT. The time now is 05:31 AM.

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.01251 seconds
  • Memory Usage 1,749KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_html_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete