vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Medals/Awards System (https://vborg.vbsupport.ru/showthread.php?t=34638)

slideboxer 02-13-2002 03:05 PM

Sweet, I'm counting the minutes, Lesane. Thanks alot.

Lesane 02-14-2002 05:52 PM

Aight its done, it works perfect on my board. I hope its gonna work perfect aswell by the rest ;)

U can expect the hack soon in the Beta Hack's Forum :up:

Lesane 02-14-2002 08:16 PM

After testing the hack succesfully on 2 boards i decided to put the hack in the Full Releases forum :up: :)

https://vborg.vbsupport.ru/showthrea...threadid=35075

Darren Evans 02-15-2002 05:22 AM

Thanks again Lesane! :)

Again, how do I go about lining them up 3 abreast in order by precedence? See my pic in above post.

Lesane 02-15-2002 06:10 AM

U could do that by using only <img src="$awardsp[url]" alt="$awardsp[name]"> in the awards template. Then it will display all the awards near eachother without the name, however the way u want it u need to add $post[hasaward] between <td> </td> in the postbit.

Example to put in the postbit instead of $post[hasaward]:

PHP Code:

<td width="100" valign="middle" nowrap>$post[hasaward]</td

U probably must change the width...

Darren Evans 02-15-2002 04:13 PM

Lesane, I haven't tried the suggestion yet, but won't that just line up the medals horizontally instead of vertically... all in a line?

I need it to do that, but break after the third award.

Code:

[award] [award] [award] <br>
[award] [award] [award] <br>
[award] [award] [award] <br>


Lesane 02-15-2002 06:22 PM

I thought it could be done by templates, if all the awards have the same sizes then u can do it what i above said with <td> but thats the hard way.

The easy way:

Open admin/functions.php

Find:

PHP Code:

// awards/medals/cards hack by lesane

if ($post[award]=="1"
    {
     
$result=$DB_site->query("SELECT * FROM useraward WHERE userid='$post[userid]' AND awardsid=aw ");
       while (
$awardsp=$DB_site->fetch_array($result))  
        { 
          eval(
"\$post[hasaward] .= \"".gettemplate("awards")."\";");

        }            
   }
   
// awards/medals/cards hack by lesane 

And change it to:

PHP Code:

// awards/medals/cards hack by lesane

if ($post[award]=="1"
    {
     
$result=$DB_site->query("SELECT * FROM useraward WHERE userid='$post[userid]' AND awardsid=aw ");
               
$count=0;         
       while (
$awardsp=$DB_site->fetch_array($result))  
        {      
          if (
$count%3=="2") {  
            
$rule="<br>";
       } else {
            
$rule="";
    }
        eval(
"\$post[hasaward] .= \"".gettemplate("awards")."\";");
          
$count++;
        } 
   }
   
// awards/medals/cards hack by lesane 

Open the template: awards

Replace all code with this code:

PHP Code:

<img src="$awardsp[url]alt="$awardsp[name]">$rule 

That should work :cool:

Darren Evans 02-15-2002 06:32 PM

Lesane,

That works perfect. :D I just need to fix it now so there is a small space between the medals:

http://www.bombs-away.net/forums/sho...&threadid=5095

Lesane 02-15-2002 06:36 PM

Glad its working :D

To put a space between every award u can use
PHP Code:

&nbsp

Like this in the awards template:

PHP Code:

<img src="$awardsp[url]alt="$awardsp[name]">&nbsp;$rule 


Ignite 04-05-2002 01:35 PM

I cannot locate a headinsert template in my new vBulletin 2.2.4 software to modify for the Awards hack. Essentially, I can create the Award and it's graphic in the admincp, and can see the new section when I attempt to ADD a New User from the admincp, but I can't every add one to an existing user. Most everything else with the installation of the hack went well. What am I missing (besides finding the headinsert template) that controls the adding a an Award to a user? I also don't see the option as a Mod even though I installed all the mod options in the 1.2 version. Help

Dale Kubler
octothorp@bigfoot.com


All times are GMT. The time now is 01:46 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.01025 seconds
  • Memory Usage 1,755KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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