Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #42  
Old 02-14-2004, 07:37 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this with no problem on RC3, but installing on RC4 I get no awards showing anywhere and can't figure out why. I doublechecked all the code additions and I don't think I missed any.

Edit: for some reason the award template wasn't added - that fixed it
Reply With Quote
  #43  
Old 02-14-2004, 02:13 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks that was the fix. Installed and working on rc2. Thanks again.
Reply With Quote
  #44  
Old 02-14-2004, 06:45 PM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I try to read and announcement, I get this error at the top of the page:

Quote:
Warning: Invalid argument supplied for foreach() in /path/to/forums/includes/functions_showthread.php on line 792
which is "foreach($awards AS $useraward)"

Any ideas?
Reply With Quote
  #45  
Old 02-15-2004, 02:51 PM
agbates agbates is offline
 
Join Date: Jan 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think AnimeWebby is doing a great job..and thanks go to Lesane for his original idea. I am also going to wait until Gold before I install this, but one thing is for sure..I am going to install it! It's a great idea that really should have been included into VB.
Reply With Quote
  #46  
Old 02-15-2004, 06:55 PM
maurier maurier is offline
 
Join Date: Aug 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have run SQL-query using phpmyadmin getting error: my site vbRc4 help me please !

Quote:
CREATE TABLE " . TABLE_PREFIX . "award (
awardid smallint(5) unsigned NOT NULL auto_increment,
name varchar(50) NOT NULL default '',
description varchar(250) NOT NULL default '',
icon_url varchar(250) NOT NULL default '',
PRIMARY KEY (awardid)
) TYPE=MyISAM;
MySQL said:


You have an error in your SQL syntax near '" . TABLE_PREFIX . "award (
awardid smallint(5) unsigned NOT NULL auto_incre' at line 1



Quote:
CREATE TABLE " . TABLE_PREFIX . "useraward (
userid int(10) NOT NULL auto_increment,
PRIMARY KEY (userid)
) TYPE=MyISAM;
MySQL said:


You have an error in your SQL syntax near '" . TABLE_PREFIX . "useraward (
userid int(10) NOT NULL auto_increment,
' at line 1
Reply With Quote
  #47  
Old 02-16-2004, 12:26 AM
InfiniteWebby InfiniteWebby is offline
 
Join Date: Nov 2001
Location: Downunda.
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@sadie: it looks like you may have missed out a step. you have to add
PHP Code:
global $awards
after
PHP Code:
global $vboptions$stylevar$vbphrase$DB_site$datastore$_USEROPTIONS$style$show$usergroupcache
in your /includes/functions_showthread.php file

@maruier: you are meant to replace " . TABLE_PREFIX . "with your table prefix before you run those queries.
Reply With Quote
  #48  
Old 02-16-2004, 04:20 AM
kcradio kcradio is offline
 
Join Date: Apr 2003
Location: Merriam, KS
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am still getting this error:

SQL-query :

CREATE TABLE " . TABLE_PREFIX . "award(

awardid smallint( 5 ) unsigned NOT NULL AUTO_INCREMENT ,
name varchar( 50 ) NOT NULL default '',
description varchar( 250 ) NOT NULL default '',
icon_url varchar( 250 ) NOT NULL default '',
PRIMARY KEY ( awardid )
) TYPE = MYISAM

MySQL said:

#1064 - 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 '" . TABLE_PREFIX . "award( awardid smallint( 5 ) unsigned NOT

Can anyone tell me what I am doing wrong on this?
Reply With Quote
  #49  
Old 02-16-2004, 04:22 AM
kcradio kcradio is offline
 
Join Date: Apr 2003
Location: Merriam, KS
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nevermind, if I look up a thread I can see the answer, sorry...
Reply With Quote
  #50  
Old 02-16-2004, 05:16 AM
InfiniteWebby InfiniteWebby is offline
 
Join Date: Nov 2001
Location: Downunda.
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you are getting an error when you are trying to view announcements then.....

in /includes/functions_showthread.php
instead of finding
PHP Code:
    $show['messageicon'] = iif($post['iconpath'], truefalse); 
find:
PHP Code:
            $show['reputationlink'] = iif($vboptions['reputationenable'] AND $bbuserinfo['userid'] AND $post['userid'] AND !($usergroupcache["$post[usergroupid]"]['genericoptions'] & ISBANNEDGROUP), truefalse); 
then add above it:
PHP Code:
            // AWARDS IN POSTBIT
            
foreach($awards AS $useraward)
            {
                
$userawardid "award$useraward[awardid]";
                if (!empty(
$post[$userawardid]))
                {
                    
$userawardid_desc $userawardid."_desc";
                    if (
$post[$userawardid_desc] != '')
                    {
                        
$useraward[description] = $post[$userawardid_desc];
                    }
                    eval(
'$awardsbit .= "' fetch_template('award') . '";');
                }
            }
            
// END AWARDS IN POSTBIT 
I will update all the files soon with all the current bug fixes plus instructions for versions less than RC 4. Sorry for the inconvinience
Reply With Quote
  #51  
Old 02-16-2004, 07:42 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfectly now - thanks!
Reply With Quote
Reply

Thread Tools

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 10:40 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.05007 seconds
  • Memory Usage 2,328KB
  • 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
  • (7)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
  • (1)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