Version: 1.00, by SFishy
Developer Last Online: Dec 2012
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'], true, false);
$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]"> <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.
around the query as you get nice DB errors if you have any posts without userids, as happened to me in a botched upgrade from one forum software to another several years ago.
I got this whenever someone tried to open a post made by a guest user:
Quote:
Database error in vBulletin 3.0.3:
Invalid SQL:
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