![]() |
Usernote In Postbit v.2.0
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> HTML Code:
<if condition="$post[usernote]"><div> |
please mention that this hack will add a query for each post displayed on page... so if you have 20 posts per page, you will have an overhead of 20 new db queries...
|
I love this idea if it weren't for a whole load of extra queries. Maybe there's a way to fix?
What about being able to add this to the same location as the new PM messages? At least the user can see when they have usernotes, and it (hopefully) shouldn't add too many extra queries? |
Very nice!
|
Quote:
okie, I've changed the hook to showthread_postbit_create |
Quote:
I just tried and a page of 15 posts with 11 jumped to 26 after install. |
Very nice! Been looking for a way to draw attention to usernotes. People don't take much notice generally.
|
Installed
|
If the query issue can be addressed I'll be installing this. However I don't think I can handle that many new queries per page.
|
This could be done via template modification rather then plug in. ;) I believe. lol
|
is there anyway to make this that only admins/mods can see it!
|
Quote:
Would install, but from people talking about the extra queries... no thanx. Excellent idea though. Maybe cache the usernotes and update them hourly or something? |
Quote:
|
Thanks!
Install. Still this hack produced lots of extra querys.... :speechless: I think it would be much better use JOIN with post table instead of running extra query for each post.... |
Quote:
|
Any one going to take a shot at reducing the queries? I want to install this on my board ... I may do it if no one else does.
|
Quote:
|
how make this that only admins/mods can see if a member have a usernote and no one else can't see it!!
please :nervous: |
Quote:
|
NOT TESTED but try:
PHP Code:
|
Quote:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING |
Try:
HTML Code:
<if condition="$post[usernote] AND is_member_of($bbuserinfo, array(1,2,3))"><div> |
Quote:
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> |
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 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. |
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:
|
Anoter idea. Create user field (private) and update it using cron job.
|
Quote:
|
any chance of something like this for vb 3.6.4 ?
|
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 01:10 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|