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)

RichieBoy67 05-22-2011 04:31 PM

This is a great mod, any plans for this mod in the near future? Great work on this Cypher!!

Thanks

copjend 05-23-2011 10:18 PM

When updated for vBulletin™ Version 4.1.3

Many thanks

nacaruncr 05-25-2011 04:01 AM

Quote:

Originally Posted by sadiq6210 (Post 2189701)
UPDATE FOR: 4.0.8 - 4.1.3
(TAKE BACKUP BEFORE ANY REPLACE)


1- Find the template (memberinfo_block_myawards) and replace it all
Code:

<div id="view-myawards" class="<vb:if condition="$selected_tab == 'myawards'">selected_view_section<vb:else />view_section</vb:if>">
<div>

<div class="blocksubhead subsectionhead userprof_headers userprof_headers_border">
{vb:rawphrase award_showcase} - {vb:raw $block_data[num]} {vb:rawphrase awards} <vb:if condition="$vboptions[aw_points]"> - {vb:raw $block_data[total_points]} {vb:rawphrase points}</vb:if>
</div>

<div class="blockbody">
<table width="100%">
<tr align="center">
        <vb:if condition="$vboptions[aw_showicon]"><th class="blocksubhead" nowrap="nowrap">{vb:rawphrase award_icon}</th></vb:if>
        <vb:if condition="$vboptions[aw_showimage]"><th class="blocksubhead" nowrap="nowrap">{vb:rawphrase award_image}</th></vb:if>
        <th class="blocksubhead" width="100%">{vb:rawphrase award_description}</th>
</tr>
{vb:raw $block_data[myawards]}
</table>
</div>
</div>
</div>



2- From(Plugin Manager)
Find (YAAS - Profile Tab) and disactive it.


3- From (plugin manager)
Find (YAAS in Member Profile - Profile) >> EDIT >> Replace it all
Code:

$blocklist['myawards'] = array(
        'class' => 'MyAwards',
        'title' => $vbphrase['my_awards'],
        'options' => array(
                'pagenumber' => $vbulletin->GPC['pagenumber']
        ),
        'hook_location' => 'profile_tabs_last',
        'wrap' => false
);

require_once('./global.php');
global $vbulletin; 
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());

class vB_ProfileBlock_MyAwards extends vB_ProfileBlock
{
    var $template_name = 'memberinfo_block_myawards';

    function confirm_empty_wrap()
    {
        return false;
    }

    function confirm_display()
    {
        return ($this->block_data['myawards'] != '');
    }

    function prepare_output($id = '', $options = array())
    {
        global $show, $vbphrase, $stylevar, $vbcollapse, $bgclass, $vbulletin;
       
        require_once(DIR . '/includes/class_bbcode.php');
        $bbcode_parser =& new vB_BbCodeParser($this->registry, fetch_tag_list());

               
                $result = $this->registry->db->query_read('
            SELECT
                *
            FROM
            ' . TABLE_PREFIX . 'award_user AS award_user
                LEFT JOIN ' . TABLE_PREFIX . 'award AS award USING (award_id)
            WHERE
                award_user.userid = ' . $this->profile->userinfo['userid'] . '
                AND award.award_active = "1"
            ORDER BY
              '.$vbulletin->options['aw_awardorder'].'
        ');
       
                                if (($vbulletin->options['aw_points']) AND ($this->profile->userinfo['userid']))
                                {
                                        $userpoints = $this->registry->db->query_read('
                                                SELECT a.*, au.*, SUM(award_pointvalue) AS TotalPoints
                                                FROM ' . TABLE_PREFIX . 'award a, ' . TABLE_PREFIX . 'award_user au
                                                WHERE (au.userid = '.$this->profile->userinfo['userid'].') AND (a.award_id=au.award_id) AND (a.award_active = "1")
                                                GROUP BY au.userid
                                        ');
                               
                                        while ($array = $this->registry->db->fetch_array($userpoints))
                                                {
                                                $this->block_data['total_points'] = $array['TotalPoints'];
                                                } 
                                }
               
        $num = $this->block_data['num'] = $this->registry->db->num_rows($result);
       
        $this->block_data['myawards'] = '';
       
        if ($num > 0)
        {
            // Display Awards
            while ($award = $this->registry->db->fetch_array($result))
            {
                exec_switch_bg();
               
                $award['award_desc'] = $bbcode_parser->parse($award['award_desc']);
                $award['issue_reason'] = $bbcode_parser->parse($award['issue_reason']);
               
                $award_issue_date = vbdate($this->registry->options['dateformat'], $award['issue_time'], true);
                $award_issue_time = vbdate($this->registry->options['timeformat'], $award['issue_time']);
               
                //- VB3 -// eval('$this->block_data[\'myawards\'] .= "' . fetch_template('awards_userawards_bit') . '";');
                                //- BEGIN VB4 -//
                                $templater = vB_Template::create('awards_userawards_bit');
                                        $templater->register('award', $award);
                                        $templater->register('award_issue_date', $award_issue_date);
                                        $templater->register('award_issue_time', $award_issue_time);
                                $this->block_data['myawards'] .= $templater->render();
                                //- END VB4 -//
            }
        }
    }
}


Good luck :)

Thank you very much men :D awesome :D:eek::up::up::up::up::up: thanks dude ;)

S S0DEN 06-03-2011 03:06 PM

I am only showing 21 postbit icons - it will not show the rest in the users postbit. How do I increase the number of awards displayed in the users postbit?

squidsk 06-03-2011 03:24 PM

Go to admincp and look at the YAAS options, its one of the options listed there.

shane greer 06-03-2011 09:58 PM

In the postbit is there anyway to display more than 3 in a row.

I use the horizontal one and its getting a tad big now. :)

https://vborg.vbsupport.ru/external/2011/06/57.jpg

squidsk 06-04-2011 12:43 AM

You're limited by the width of the right panel in the postbit. Join Date, Location, etc are left justified (i.e. are at the left edge) so there's no room for more awards on a given line. You have two options, increase the width of that column or shrink the width of your awards or some combination of the two.

dej 06-04-2011 06:54 AM

Hello,

Does YAAS have the ability to re-order Ranks? Such as Admin, Mod, etc.

I know it can re-order Awards.

Thanks

squidsk 06-04-2011 01:36 PM

What do you mean by re-order ranks? Where are the ranks ordered? The only place I can think of is the leaders page and there the ordering is by group number I believe.

dej 06-07-2011 05:52 AM

Quote:

Originally Posted by squidsk (Post 2203401)
What do you mean by re-order ranks? Where are the ranks ordered? The only place I can think of is the leaders page and there the ordering is by group number I believe.

I'm using this mod for Awards and... for Ranks also (such as Admin/Moderator, etc). I found out it this mod does re-order Ranks.. it works =) I just add the images and assign them, just like I'd do an Award.

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

Is there a way to give an award to a Usergroup - instead of applying them 1 by 1?

Thanks :)


All times are GMT. The time now is 05:32 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.02664 seconds
  • Memory Usage 1,767KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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