Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Notes Icon/Link in Postbit, if user has notes Details »»
User Notes Icon/Link in Postbit, if user has notes
Version: 1.00, by SFishy SFishy is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-30-2004 Last Update: Never Installs: 21
 
No support by the author.

Description:
This modification adds an icon and link to a member's usernotes in the postbit template. The icon will only appear to the people with proper permissions for viewing notes. The icon will only appear IF the member actually has usernotes posted about them. Icon links directly to that member's notes. Rolling over the icon reveals the number of notes a member has posted about them.

Time to install: 5 minutes or less.

Files to Modify: 1 php file, 1 template.

Graphic included.

- - - - -

------ FILE CHANGE -------

OPEN showthread.php

FIND:

PHP Code:
        // get first and last post ids for this page (for big reply buttons) 
ADD right ABOVE it:

PHP Code:
   // ###### MOD display user notes in postbit if user has notes MOD ######
    
$usernote $DB_site->query_first("
        SELECT MAX(dateline) AS lastpost, COUNT(*) AS total
        FROM " 
TABLE_PREFIX "usernote AS usernote
        WHERE userid = 
$post[userid]
    "
);
    
$show['hasusernote'] = iif($usernote['total'], truefalse);
    
$show['usernotetotal'] = $usernote['total']; 
Save showthread.php
Close and upload.


----- TEMPLATE CHANGE -----

OPEN postbit

FIND:

PHP Code:
            $post[iplogged
ADD right BELOW it:

PHP Code:
            <if condition="(($post['userid'] == $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANVIEWOWNUSERNOTES) OR ($post[userid] != $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANVIEWOTHERSUSERNOTES)) AND $show[hasusernote]">&nbsp;<a href="usernote.php?$session[sessionurl]u=$post[userid]"><img src="images/buttons/notes.gif" border=0 alt="$show[usernotetotal]"></a></if> 
Save changes.


----- ADDITIONAL IMAGE UPLOAD -----

Use provided notes.gif image, or make your own.

UPLOAD into directory images/buttons (or other appropriate image directory of your choosing).

If you upload into a different directory, be sure to change the IMG SRC code in postbit to refer to the correct place.


That's it, you're done.

Show Your Support

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

Comments
  #12  
Old 01-28-2005, 02:25 PM
synn synn is offline
 
Join Date: Nov 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm receiving the same db error as Trackpads...any fix for this?
Reply With Quote
  #13  
Old 01-28-2005, 05:49 PM
DR?@M W?@V?R DR?@M W?@V?R is offline
 
Join Date: Aug 2002
Location: uk
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alkatraz
Great idea! Makes the user notes feature a lot more useful and convenient
yeah I think It makes it more of a option for users to use it, its a great resource, just like a personal guestbook/journal/custom page.

Nice hack very simple but effective.
Reply With Quote
  #14  
Old 01-28-2005, 08:28 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trackpads
I got this whenever someone tried to open a post made by a guest user:




I have USENET import on my site and the posts from the usenet posters are guests.

Thanks,

-Jason
I get the same error. Any news?
Reply With Quote
  #15  
Old 01-31-2005, 02:05 AM
h75's Avatar
h75 h75 is offline
 
Join Date: Sep 2004
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i git an db error after i install that hack. :devious:
Quote:
Datenbankfehler in vBulletin 3.0.6:

Ungueltige SQL-Abfrage:
SELECT MAX(dateline) AS lastpost, COUNT(*) AS total
FROM usernote AS usernote
WHERE userid =

mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

mysql error number: 1064

Datum: 31.01.2005 05:02:19
Skript: http://halloo.de/t.php?t=339
Referer: http://halloo.de/f.php?f=45
Benutzername: Hollii
IP-Adresse:
Reply With Quote
  #16  
Old 02-03-2005, 05:44 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by h75
i git an db error after i install that hack. :devious:
Replace:
Code:
// ###### MOD display user notes in postbit if user has notes MOD ###### 
$usernote = $DB_site->query_first(" 
SELECT MAX(dateline) AS lastpost, COUNT(*) AS total 
FROM " . TABLE_PREFIX . "usernote AS usernote 
WHERE userid = $post[userid] 
"); 
$show['hasusernote'] = iif($usernote['total'], true, false); 
$show['usernotetotal'] = $usernote['total'];
with:
Code:
// ###### MOD display user notes in postbit if user has notes MOD ######
if ($post['userid'])
{
	$usernote = $DB_site->query_first("
		SELECT MAX(dateline) AS lastpost, COUNT(*) AS total
		FROM " . TABLE_PREFIX . "usernote AS usernote
		WHERE userid = $post[userid] 
	");
	$show['hasusernote'] = iif($usernote['total'], true, false);
	$show['usernotetotal'] = $usernote['total'];
}
else
{
	$show['hasusernote'] = false;
	$show['usernotetotal'] = 0;
}
Reply With Quote
  #17  
Old 02-03-2005, 05:53 PM
h75's Avatar
h75 h75 is offline
 
Join Date: Sep 2004
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah! thats it! Thank you, Mystics.
Quote:
Originally Posted by Mystics
Code:
// ###### MOD display user notes in postbit if user has notes MOD ######
if ($post['userid'])
{
	$usernote = $DB_site->query_first("
		SELECT MAX(dateline) AS lastpost, COUNT(*) AS total
		FROM " . TABLE_PREFIX . "usernote AS usernote
		WHERE userid = $post[userid] 
	");
	$show['hasusernote'] = iif($usernote['total'], true, false);
	$show['usernotetotal'] = $usernote['total'];
}
else
{
	$show['hasusernote'] = false;
	$show['usernotetotal'] = 0;
}
Reply With Quote
  #18  
Old 03-30-2005, 06:45 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but one needs a hack which allows creates a note before being able to use your hack !

a hack is needed as that (https://vborg.vbsupport.ru/showthread.php?t=75429) which creates initially a personal note ....
Reply With Quote
  #19  
Old 03-30-2005, 11:05 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Allan
but one needs a hack which allows creates a note before being able to use your hack !

a hack is needed as that (https://vborg.vbsupport.ru/showthread.php?t=75429) which creates initially a personal note ....
No it doesn't. It pulls the usernotes if there are any.
Reply With Quote
  #20  
Old 03-31-2005, 05:42 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
No it doesn't. It pulls the usernotes if there are any.
ok, but how creates usernotes ?
Reply With Quote
  #21  
Old 04-10-2005, 01:43 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A suggestion for this hack is if usernote contains a link to the post the new user note was made from
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 12:00 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.05467 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (4)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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