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
[HTL] & [TXT] Awards/Medals/Cards Hack [vB3] Details »»
[HTL] & [TXT] Awards/Medals/Cards Hack [vB3]
Version: 1.00, by InfiniteWebby InfiniteWebby is offline
Developer Last Online: Aug 2007 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-02-2004 Last Update: 06-02-2004 Installs: 160
 
No support by the author.

Awards/ Medals/ Cards Hack [vB3]
By: AnimeWebby
Idea by: Lesane
Updated: 28nd May 2004 - Installer not table prefix friendly.

What this hack does:
This hack allows you to add awards, medals or cards to your vbulletin and assign these to members who you think deserve them.
These graphics will then show up in their member profile and/or their postbits depending on where you choose to add this hack.

New in v2
- Extra page showing all awards available as well as all the users who have earned an award.
- Support for full urls and relative ones for award icons.
- Support for awards on showpost and announcement

Other Stuff:
Although I give credit to Lesane for the idea this hack is totally recoded to be less server intensive and also uses a whole lot less queries. Therefor I do not consider this a 'port'.

Installation:
Download the appropriate .Zip file and follow the instructions in the readme file.

Upgrading:
So far there are no ways to upgrade this hack, if you have an old copy installed then you need to uninstall and reinstall from scratch.

Coming Soon:
- Awards added to the search and memberlists.
- Added functions to the addition of awards as well as cron functions to assign awards automatically to those members with 'X' posts, registered 'X' days etc...
- Option to show award name rather than graphic.
- Option to turn awards OFF & ON in postbit and memberinfo
- Request award on awards page (at Cyricx' request)
(not necessarily in that order)

Make sure you backup your files and database first! This hack has been tested on vB RC1 and RC4 only!

Please click the install button

If you experience any errors, problems or the hack doesn't seem to be functioning correctly then send me a pm with the following info:
- HTL or Standalone installer.
- Version of vB you are running.
- File where error is encountered.
- Exact error or description of error.

Views so far:
[NORMAL]AwardsMedalsCardsv2.1.zip (12.7 KB, 69 views)
[HTL]AwardsMedalsCardsv2.1.zip (12.8 KB, 57 views)
[TXT]AwardsMedalsCardsv2.zip (8.5 KB, 278 views)
[HTL]AwardsMedalsCardsv2.zip (10.2 KB, 203 views)

If you installed this hack before 23rd May and are getting foreach errors in your showthread then follow the step below:

In /includes/functions_showthread.php find:
PHP Code:
    // sorts through all the stuff to return the postbit template 
below that add:
PHP Code:
    // user awards
    
global $userawards
If in your showthread.php member post counts show N/A, they have no profile link or their user title is guest you MUST run 'Fix broken user profiles' in the update counters part of the admincp. This is found under the nav bar 'Import & Maintenance' > 'Update Counters' > 'Fix broken user profiles'. This will add the awards for all the users currently in your database and prevent showing incorrent member info.

Show Your Support

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

Comments
  #372  
Old 01-27-2005, 07:25 PM
CLowNxPE CLowNxPE is offline
 
Join Date: Dec 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to make it work with 3.0.6 in functions.php

find
PHP Code:
    // no cache available - query the user
    
$user $DB_site->query_first("
        SELECT " 
.
        
iif(($option 16), ' administrator.*, ') . "
        userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid" 
.
        
iif(($option 1) AND $vboptions['reputationenable'] == 1', level') .
        
iif(($option 2) AND $vboptions['avatarenabled'], ', avatar.avatarpath, NOT ISNULL(customavatar.avatardata) AS hascustomavatar, customavatar.dateline AS avatardateline').
        
iif(($option 8), ', customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline') .
        
iif(!isset($vbphrase), fetch_language_fields_sql(), '') . "
        FROM " 
TABLE_PREFIX "user AS user
        INNER JOIN " 
TABLE_PREFIX "userfield AS userfield ON (user.userid = userfield.userid)
        INNER JOIN " 
TABLE_PREFIX "usertextfield AS usertextfield ON (usertextfield.userid = user.userid) " .
        
iif(($option 1) AND $vboptions['reputationenable'] == 1"LEFT JOIN  " TABLE_PREFIX "reputationlevel AS reputationlevel ON (user.reputationlevelid = reputationlevel.reputationlevelid) ").
        
iif(($option 2) AND $vboptions['avatarenabled'], "LEFT JOIN " TABLE_PREFIX "avatar AS avatar ON (avatar.avatarid = user.avatarid) LEFT JOIN " TABLE_PREFIX "customavatar AS customavatar ON (customavatar.userid = user.userid) ") .
        
iif(($option 8), "LEFT JOIN " TABLE_PREFIX "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid) ") .
        
iif(($option 16), "LEFT JOIN " TABLE_PREFIX "administrator AS administrator ON (administrator.userid = user.userid) ") .
        
iif(!isset($vbphrase), "INNER JOIN " TABLE_PREFIX "language AS language ON (language.languageid = IF(user.languageid = 0, " intval($vboptions['languageid']) . ", user.languageid)) ")."
        WHERE user.userid = 
$userid
    "
); 
replace with

PHP Code:
$user $DB_site->query_first("
        SELECT " 
.
        
iif(($option 16), ' administrator.*, ') . "
        userfield.*, useraward.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid" 
.
        
iif(($option 1) AND $vboptions['reputationenable'] == 1', level') .
        
iif(($option 2) AND $vboptions['avatarenabled'], ', avatar.avatarpath, NOT ISNULL(customavatar.avatardata) AS hascustomavatar, customavatar.dateline AS avatardateline').
        
iif(($option 8), ', customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline') .
        
iif(!isset($vbphrase), fetch_language_fields_sql(), '') . "
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "userfield AS userfield ON (user.userid = userfield.userid)
        LEFT JOIN " 
TABLE_PREFIX "usertextfield AS usertextfield ON (usertextfield.userid = user.userid)
        LEFT JOIN " 
TABLE_PREFIX "useraward AS useraward ON (useraward.userid = user.userid) " .

        
iif(($option 1) AND $vboptions['reputationenable'] == 1"LEFT JOIN  " TABLE_PREFIX "reputationlevel AS reputationlevel ON (user.reputationlevelid = reputationlevel.reputationlevelid) ").
        
iif(($option 2) AND $vboptions['avatarenabled'], "LEFT JOIN " TABLE_PREFIX "avatar AS avatar ON (avatar.avatarid = user.avatarid) LEFT JOIN " TABLE_PREFIX "customavatar AS customavatar ON (customavatar.userid = user.userid) ") .
        
iif(($option 8), "LEFT JOIN " TABLE_PREFIX "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid) ") .
        
iif(($option 16), "LEFT JOIN " TABLE_PREFIX "administrator AS administrator ON (administrator.userid = user.userid) ") .
        
iif(!isset($vbphrase), "INNER JOIN " TABLE_PREFIX "language AS language ON (language.languageid = IF(user.languageid = 0, " intval($vboptions['languageid']) . ", user.languageid)) ")."
        WHERE user.userid = 
$userid
    "
); 
Reply With Quote
  #373  
Old 01-27-2005, 07:42 PM
dssart dssart is offline
 
Join Date: May 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work! Thanks alot!
Reply With Quote
  #374  
Old 01-28-2005, 05:06 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. The REQUEST AWARD link is not working for me.
How can I make this working?

2. I edit a user and give him an award.
When I edit the user again all buttons in the admincp are set to NO.
Now saving the user will result in the loss of the award for the user :-(
Reply With Quote
  #375  
Old 01-30-2005, 08:22 AM
MikaK's Avatar
MikaK MikaK is offline
 
Join Date: Nov 2004
Location: Helsinki, Finland
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
1. The REQUEST AWARD link is not working for me.
How can I make this working?
Same here Nor does the awards show at user profile... Otherwise seems to work ok and is a cool hack

=M= *installed*
Reply With Quote
  #376  
Old 02-01-2005, 11:59 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
2. I edit a user and give him an award.
When I edit the user again all buttons in the admincp are set to NO.
Now saving the user will result in the loss of the award for the user :-(
Can someone help me with this?
Reply With Quote
  #377  
Old 02-03-2005, 12:12 AM
CLowNxPE CLowNxPE is offline
 
Join Date: Dec 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
1. The REQUEST AWARD link is not working for me.
How can I make this working?
maybe because it's not even implemented yet. If you scroll all the way up that is in the "Comming soon" section of the post.
Reply With Quote
  #378  
Old 02-03-2005, 10:54 PM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The "FIX EMPTY USER AWARD TABLE" from installation and the one inside the "update counters" dont work at all!
All users are show as guest, and... hack mess up all the forums

It only give a blank screen.
I cant make it works.

Help please

Here's the part of the misc.php with the info for the fix un the vb3_useraward table:

PHP Code:
// ###################### Start find lost users #######################
if ($_POST['do'] == 'lostusers')
{

    
$users $DB_site->query("
        SELECT user.userid
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "userfield AS userfield USING(userid)
        WHERE userfield.userid IS NULL
    "
);

    
$userids = array();
    while (
$user $DB_site->fetch_array($users))
    {
        
$userids[] = $user['userid'];
    }

    if (!empty(
$userids))
    {
        
$DB_site->query("INSERT INTO " TABLE_PREFIX "userfield (userid) VALUES (" implode('),('$userids) . ")");
    }

    
$users $DB_site->query("
        SELECT user.userid
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "usertextfield AS usertextfield USING(userid)
        WHERE usertextfield.userid IS NULL
    "
);

    
$userids = array();
    while (
$user $DB_site->fetch_array($users))
    {
        
$userids[] = $user['userid'];
    }

    if (!empty(
$userids))
    {
        
$DB_site->query("INSERT INTO " TABLE_PREFIX "usertextfield (userid) VALUES (" implode('),('$userids) . ")");
    }

// [START HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 2 ]
    // FIX EMPTY USER AWARD TABLE
    
$users $DB_site->query("
        SELECT user.userid
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "useraward AS useraward USING(userid)
        WHERE useraward.userid IS NULL
    "
);

    
$userids = array();
    while (
$user $DB_site->fetch_array($users))
    {
        
$userids[] = $user['userid'];
    }

    if (!empty(
$userids))
    {
        
$DB_site->query("INSERT INTO " TABLE_PREFIX "useraward (userid) VALUES (" implode('),('$userids) . ")");
    }
// [END HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 2 ]


    
define('CP_REDIRECT''misc.php');
    
print_stop_message('user_records_repaired');

I'm using vb3.0.5 (security flaw patched)
Any idea?
Somebody can help me?
Reply With Quote
  #379  
Old 02-11-2005, 08:33 PM
eva01_'s Avatar
eva01_ eva01_ is offline
 
Join Date: Aug 2004
Location: Plymouth
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well someone just unistalled it on a site and it blew up the entire database, now nothing on the site works.

any ideas?
Reply With Quote
  #380  
Old 02-13-2005, 05:36 AM
FFZoneXtreme FFZoneXtreme is offline
 
Join Date: Jan 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed the MOD, and all works fine =D

But I need to know what I need to modify to make this mod compatible with ARCADE MOD, I know that I have to change the "awards" to "awards2", but I dont know where :S:S:S (I prefer to change this Mod because Arcade is bigger and I would never end :S


If you want to take medal icons I have made a lot for my forums
http://foros.ffzonextreme.com/awards.php
Reply With Quote
  #381  
Old 02-16-2005, 11:39 AM
deb0 deb0 is offline
 
Join Date: Sep 2004
Location: somewhere
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been looking for something like this. Is there a plant to upgrade to 3.6 version of VB?
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 01:00 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.09437 seconds
  • Memory Usage 2,377KB
  • 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
  • (5)bbcode_php
  • (3)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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