vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - Yet Another Awards System (https://vborg.vbsupport.ru/showthread.php?t=232684)

CAG CheechDogg 02-16-2014 01:12 AM

Quote:

Originally Posted by Elite_360_ (Post 2481376)
Just wrote the code. squidsk let me know if you want to add it and i will give you the code


Can you post the code here so people can just add it themselves?

Elite_360_ 02-16-2014 04:20 AM

Edit the awards.php file

find this

PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 

replace with this
PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id, IF(u.displaygroupid = 0, u.usergroupid, u.displaygroupid) AS displaygroupid
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 

---------------------------------------------------------

find this
PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            WHERE au.award_id = " 
$vbulletin->GPC['award_id'] . "
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 

replace with this
PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id, IF(u.displaygroupid = 0, u.usergroupid, u.displaygroupid) AS displaygroupid
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            WHERE au.award_id = " 
$vbulletin->GPC['award_id'] . "
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 



find both of these


PHP Code:


$templater 
vB_Template::create('awards_awardusers_bit');

$newTemplate vB_Template::create('awards_awardusers_bit'); 


add this right above both of those

PHP Code:


                                fetch_musername
($awardusers); 



go edit the awards_awardusers_bit template and change {vb:raw awardusers.username} to this


HTML Code:


{vb:raw awardusers.musername}


Square Nexus 02-16-2014 05:51 AM

I tried searching through all the posts but i cant figure out how to do this:

An example thread is here

What i want to do is have the gray box around the awards template 1 like all the other user info like join date and such instead of the clear background that it has now, but i cant figure out how or where to go to add the grey box background.

CAG CheechDogg 02-16-2014 06:15 AM

Quote:

Originally Posted by Elite_360_ (Post 2481471)
Edit the awards.php file

Thanks a lot Elite, this actually works to help figure out and point out who is no longer a member of our clan to remove their awards, pretty awesome man thanks!

CoZmicShReddeR 02-16-2014 07:03 PM

Quote:

Originally Posted by Elite_360_ (Post 2481471)
Edit the awards.php file

Thanks Elite_360

Made the edits works wonderfully and still thanks to squidsk for continuing this modification!

CAG CheechDogg 02-16-2014 11:31 PM

Quote:

Originally Posted by CoZmicShReddeR (Post 2481577)
Thanks Elite_360

Made the edits works wonderfully and still thanks to squidsk for continuing this modification!

Yes CoZ...this really adds some flavor to this already great mod ! Thank you both Squid and Elite for everything!

squidsk 02-17-2014 05:52 AM

Quote:

Originally Posted by Elite_360_ (Post 2481471)
Edit the awards.php file

find this

PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 

replace with this
PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id, IF(u.displaygroupid = 0, u.usergroupid, u.displaygroupid) AS displaygroupid
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 

---------------------------------------------------------

find this
PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            WHERE au.award_id = " 
$vbulletin->GPC['award_id'] . "
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 

replace with this
PHP Code:


            $allawardusers 
=  $db->query_read("
            SELECT u.userid, u.username, au.award_id, IF(u.displaygroupid = 0, u.usergroupid, u.displaygroupid) AS displaygroupid
            FROM " 
TABLE_PREFIX "award_user AS au
            LEFT JOIN " 
TABLE_PREFIX "user AS u ON (u.userid = au.userid)
            WHERE au.award_id = " 
$vbulletin->GPC['award_id'] . "
            GROUP BY u.userid, u.username, au.award_id
            ORDER BY u.userid
            "
); 



find both of these


PHP Code:


$templater 
vB_Template::create('awards_awardusers_bit');

$newTemplate vB_Template::create('awards_awardusers_bit'); 


add this right above both of those

PHP Code:


                                fetch_musername
($awardusers); 



go edit the awards_awardusers_bit template and change {vb:raw awardusers.username} to this


HTML Code:


{vb:raw awardusers.musername}


Added it into the new release.

Pocket Aces 02-17-2014 06:12 AM

Quote:

Originally Posted by squidsk (Post 2461831)
Quote:

Originally Posted by Pocket Aces (Post 2461670)
Quote:

Originally Posted by squidsk (Post 2459156)
Quote:

Originally Posted by Pocket Aces (Post 2459045)
username/userid override for congratulatory pm doesn't seem to work

Its a known issue that has been been fixed for the next release.

Is yesterday's release the 'next release' mentioned here? Is this fixed already in the current version posted here?

No, there are two products listed on this page (YaAS and YaAS automation) this update is for the second, and doesn't fix any outstanding issues with the first, base, YaAS product, which is still at version 4.0.6.

I will in due course separate the two products but part of that process for me means making sure that the YaAS automation product could be properly uninstalled as the larger changes I'm working on for YaAS automation are not compatible with this version so being able to properly uninstall it will be required for the major upgrade.

There are already two major 'next release's. I assume username/userid override for congratulatory pm already fixed? :)

CAG CheechDogg 02-17-2014 07:16 AM

Quote:

Originally Posted by squidsk (Post 2481749)
Added it into the new release.


Good stuff squidsk...thanks for such a great mod my Man!

One quick question ! lol...would it be possible to add a feature, a one click feature to completely remove all the awards from a user with one click? Or list all the awards for one user and check a box for each award we want to remove in clusters?

Thanks in advance!

squidsk 02-17-2014 01:52 PM

Quote:

Originally Posted by Pocket Aces (Post 2481751)
There are already two major 'next release's. I assume username/userid override for congratulatory pm already fixed? :)

Yes, it was fixed in 4.0.7.


All times are GMT. The time now is 07:46 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.03183 seconds
  • Memory Usage 1,798KB
  • 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
  • (2)bbcode_html_printable
  • (12)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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