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)

CLowNxPE 01-27-2005 07:25 PM

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
    "
); 


dssart 01-27-2005 07:42 PM

Great work! Thanks alot!

jluerken 01-28-2005 05:06 PM

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 :-(

MikaK 01-30-2005 08:22 AM

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*

jluerken 02-01-2005 11:59 AM

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?

CLowNxPE 02-03-2005 12:12 AM

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.

TCattitude 02-03-2005 10:54 PM

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? :o

eva01_ 02-11-2005 08:33 PM

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

any ideas?

FFZoneXtreme 02-13-2005 05:36 AM

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

deb0 02-16-2005 11:39 AM

I've been looking for something like this. Is there a plant to upgrade to 3.6 version of VB?


All times are GMT. The time now is 11:15 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.01526 seconds
  • Memory Usage 1,805KB
  • 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
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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