Back to vBulletin 3.0 Add-Ons

User Notes Icon/Link in Postbit, if user has notes
Mod Version: 1.00, by SFishy

This modification is in the archives.
vB Version: 3.0.3 Rating: (1 vote - 5.00 average) Installs: 21
Released: 31 Dec 2004 Last Update: Never Downloads: 25
Not Supported  

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.

Download

This modification is archived and cannot be downloaded.

Screenshots

 


vblts.ru supports vBulletin®, 2022-2024