vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [HTL] & [TXT] Awards/Medals/Cards Hack [vB3] (https://vborg.vbsupport.ru/showthread.php?t=61108)

InfiniteWebby 02-02-2004 10:00 PM

[HTL] & [TXT] Awards/Medals/Cards Hack [vB3]
 
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.

Cyricx 02-03-2004 06:36 AM

*looks around*

I don't see the attachment??

Cyricx

Oblivion Knight 02-03-2004 06:37 AM

Hmm.. It might help attaching the zip.? ;)


[high][EDIT][/high]
Sorry, didn't notice the time the thread was posted etc.

InfiniteWebby 02-03-2004 06:38 AM

god you got no patience do you, I like to add the thread links to my installtion should you ever lose it but need support.

SnowBot 02-03-2004 06:38 AM

:)

gmarik 02-03-2004 06:48 AM

It is crazy

Lesane 02-03-2004 07:59 AM

Good to see that it's ported over to vb3, good work. :)

Metro Man 02-03-2004 03:27 PM

nice Hack good work.

MGM 02-03-2004 10:52 PM

ill wait for that page that shows all of the awards and who has what before i add this, but ill install it anyways just to make sure i get the email for the update (if u send one out)

/me clicks Install

MGM out

Boofo 02-03-2004 11:02 PM

Are there any graphics available with this or would we have to make our own?

trackpads 02-04-2004 12:14 AM

Thank you!!

kcradio 02-04-2004 02:57 AM

trying to run the sql files and I am getting this error:

SQL-query :

CREATE 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. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'award (
awardid smallint(5) unsigned NOT NULL auto_increment,

What am I doing wrong?

Cyricx 02-05-2004 11:46 AM

add a ; at the end

Only thing I can think of that would rock even more for this, would be to make some of the awards user requestable, and then the admin could approve.

Great job, I may use this. :)

speedway 02-05-2004 11:09 PM

Quote:

Originally Posted by Cyricx
add a ; at the end

Only thing I can think of that would rock even more for this, would be to make some of the awards user requestable, and then the admin could approve.

Great job, I may use this. :)

Ummm....then it wouldn't be an award would it :) "I request the member of the month award please..." LOL!

trackpads 02-05-2004 11:38 PM

This might be a dumb question but once we give the user an award, it is permamnet right? For example I want to give people awards for things they do/volunteer to do on the site. And then give that award to others also, like military awards etc.

Thanks again,

-Jason

lasto 02-06-2004 06:44 AM

anyone got this in action so we can see it ??

trackpads 02-06-2004 09:49 AM

Quote:

Originally Posted by lasto
anyone got this in action so we can see it ??

I REALLY want this but I am hoping for Gold soon so I dont have to re-hack it. It looks great!

-Jason

lasto 02-06-2004 09:55 AM

LOL nps trackpads - im just waiting for someone to test it and be the guinea pig.
I cant add hacks unless im 100 % sure as cant back up databse cause i have probs telenetting in :(

Cyricx 02-06-2004 01:35 PM

Your right, it would then be a Medal ;)

Hehe reason I ask that is I run a forums for an Online Game. And there are certain achievments you can attain that I could have awards displayed for the members that have done them.

But I'd hate to have to go through and check every member, would rather have them request it, then I'd verify, and set it, if they had done it.

Hmmm, that make sense? :P

blubber12 02-06-2004 06:22 PM

Well I've been trying to install and am receiving a variety of errors on RC2...the biggest one, and it took me a while to figure out...The query for insert in phrases...14009 is listed twice...so I had to change it to 14005 in order for the query to run correctly. Have also been having problems with various functions..I will not list them now..Going to try a clean install and see if it sorts itself out first. If the same errors appear, I"ll post them

lasto 02-06-2004 06:31 PM

so no one has installed this successfully as yet then ??

blubber12 02-07-2004 02:19 PM

Well went though a fresh install and still the same problems. biggest problem is the entire forum pushes completely over the the right of the screen...login types from right to left...and there is no access to acmincp. on login to htere..the message comes up .thank you for logging in...notice the period in front of thank Then the screen goes back to login. On posting 3 errors come up showing problems in functions_showthread line 68... When I remove the modded functions.php and adminfunctions.php, everything goes back to normal..but of course there's no hack now. Also on the admincp..there shows a new blank box with no arrow, and unclickable.

Oblivion Knight 02-07-2004 04:28 PM

I had the exact same problems as listed above by blubber12 testing it on my test board.

Cheffe 02-07-2004 09:29 PM

Quote:

Originally Posted by Oblivion Knight
I had the exact same problems as listed above by blubber12 testing it on my test board.

Me too, same errors using RC2.

xug 02-08-2004 02:25 AM

Quote:

Originally Posted by Lesane
Good to see that it's ported over to vb3, good work. :)

Hey Lesane.

Maybe you need to convert yours, then for sure we get a working hack ;)

InfiniteWebby 02-08-2004 09:04 PM

This is a working hack however it is only working on my Gamma 1 test board. It may be the way i setup the instructions or there might be changes in the code since Gamma 1. I have not had access to download the latest vbulletin but I will do so soon and try to get this fixed.

InfiniteWebby 02-08-2004 10:16 PM

I have fixed the problem. For a temporary fix to installing this hack 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. BEFORE your perform step 10!!!!

I will try to get a HTL version released to fix any other problems arising from the phrases.

blubber12 02-09-2004 02:15 AM

Well I would gladly run the update..but once all the files are changed..the board distorts and logging in is impossible..The login problem disappears once the adminfunctions.php is replaced with the original...but that is way before step 10..

InfiniteWebby 02-09-2004 03:44 AM

The problem had nothing to do with the adminfunctions.php. It was happening because in the functions.php the getuserinfo function was looking for a table that didnt exist at the time. Thus running the fix broken user profiles would populate this table and the problem was solved.

I have however fixed this by using a left join instead of an inner join where the table is not required to be populated. So give the new installers a try.

P.S I have added some screenies too! and the htl version of this hack.

deathemperor 02-09-2004 04:18 AM

great, I'm waiting for the Gold version of Vb3, I will install this at the time I got the Gold Vb3.
question: can I make Awards for users who won Arcade games ?

InfiniteWebby 02-09-2004 06:25 AM

sure, you can make awards for just about anything you desire. For instance I have awards for referals, GFX and Supporters. So when I notice a person has bought us alot of new members I give them a referal award when they do a good job in our gfx section i give them that award and if they contribute some spare cash to the forums i give them that one.

In future versions I will hopefully set it up so that some of the awards check members automatically.

Oblivion Knight 02-09-2004 08:05 AM

Awesome, I'll have a second go on my test board soon.. :)
I've attached a medal icon set I quickly whipped up in case anyone is struggling. They will probably not work well on darker backgrounds though.

tides 02-09-2004 11:41 AM

Just a stuby question...
Is this hack workw with RC4?

blubber12 02-09-2004 10:31 PM

Well it looks like everything is fine until you get to here

Code:

admincp/user.php

=>Find:

        if ($vboptions['cp_usereditcolumns'] == 2)
        {
                ?>
                </table>
                </td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
                <table cellpadding="4" cellspacing="0" border="0" align="center" width="100%" class="tborder">
                <?php
        }
        else
        {
                print_table_break('', $INNERTABLEWIDTH);
        }

This does not appear in admincp/user.php

Osterling 02-10-2004 11:46 AM

Quote:

Originally Posted by tides
Just a stuby question...
Is this hack workw with RC4?

I am wondering that too.. does it work with RC4?

TheComputerGuy 02-10-2004 12:07 PM

Defintly cool hack.

I can't wait to install it when I get home tonight.

SB2002 02-10-2004 04:17 PM

i justr tried it on my rc4 and the final hacks on showthread dont seem to work. I checked through and i cannot find any reason why they are not working, but it screwed up the cookie sending when i tried and it came up with the "unable to send header" errors. I'm not saying that the hack doesnt work with rc4 tho, cos i have a few htl hacks installed, but none seem to be around that area that this hack modifies

blubber12 02-11-2004 07:22 PM

any solution to my post above? https://vborg.vbsupport.ru/showpost....5&postcount=34

InfiniteWebby 02-13-2004 03:34 AM

@blubber: you must be using a version less than RC4. Try finding this:
PHP Code:

    ?>
    </table>
    </td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
    <table cellpadding="4" cellspacing="0" border="0" align="center" width="100%" class="tborder">
    <?php

@SB2002: this hack does not send any new headers out. Can you please give me more details about your errors. Eg. What file you where viewing the line number of the error etc...

SB2002 02-13-2004 07:08 AM

Quote:

Originally Posted by AnimeWebby
@blubber: you must be using a version less than RC4. Try finding this:
PHP Code:

    ?>
    </table>
    </td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
    <table cellpadding="4" cellspacing="0" border="0" align="center" width="100%" class="tborder">
    <?php

@SB2002: this hack does not send any new headers out. Can you please give me more details about your errors. Eg. What file you where viewing the line number of the error etc...

ok. i have the day off of work today so I'll give it another try and see how it goes again and then get back to you with the results.


All times are GMT. The time now is 04:48 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.02084 seconds
  • Memory Usage 1,832KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete