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)

Darren Evans 01-30-2002 06:42 PM

I've looked before posting this and didn't find anything close to what I would like to implement. So, here goes...

I would like to have a system to award multiple awards (be it ribbons, medals, etc...) to my users that would be displayed as small graphic files under their username and avatar.

Ideally, this would only be done as an administrative tool, but I think moderators or privys could be granted to give awards.

This is beyond my programming capabilities, and if done, I think this would be a popular hack. :)

Lesane 01-30-2002 07:12 PM

You could use this hack:
https://vborg.vbsupport.ru/showthrea...highlight=mark

and instead of using contributor u can put your own code in the template thats gonna be displayed under the username/avatar of the users.

Darren Evans 01-30-2002 07:27 PM

Yeah, I've been referred to that hack before, but it only gives one award.

Basically, what I want is to have more than one award awarded to a user. In the Admin area, I want to be able to select check boxes to display the awards that the user has earned:

Example:

Mark has earned the following awards:

[ ] Award 1 [ ] Award 2 [ ] Award 3 [ ] Award 4

The the database calls up the award IDs and displays the small award pictures under the avatar.

black 01-30-2002 07:46 PM

In this forum i seen someone said they were going to be making this dont know what happened.






==

What about making a user group and in that usertitle the img code for the image just a thought ;)

Darren Evans 01-31-2002 07:07 PM

Hmmmmm..... I thought this would be a popular hack idea. :(

Steve Machol 01-31-2002 10:07 PM

Actually I think it's a great idea! Kinda like handing out 'Merit Badges'. I'd definitely like to see something like this.

black 02-01-2002 12:25 AM

I think its a great idea also..

I Have an award forum on my site i will love this.

Lesane 02-02-2002 08:22 AM

1 Attachment(s)
I will give it a try :)

the admin section is already finished.

I added a new table called award with the tables name & url. Thats for the award name and graphic url.

U can add new awards in the admin and edit them and remove them, thats already done.

Now i gonna focus on the user page.

Any suggestions and comments are welcome :)

Lesane 02-02-2002 08:23 AM

1 Attachment(s)
screenshot of the modify page in the admin:

Darren Evans 02-02-2002 11:18 PM

Lesane,

Thanks for taking this on! Looks great so far. :)

Darren Evans 02-03-2002 04:09 PM

Suggestion/Request:

My particular site will be using small ribbon pics as the displayed awards. These awards are also in order of precedence, therefore, I suggest that a unique ID be entered in the award's table for the final display output.

As far as the output display in the member name column, I would like them show 3 or 4 in row, rows being broken and returned.

Example:

Username
Avatar
[medal1] [medal2] [medal3]
[medal4] [medal5] [medal6]
[medal7] [medal8] [medal9]

Hamma 02-03-2002 04:55 PM

This is sweet

slideboxer 02-03-2002 11:38 PM

I'm excitedly looking forward to this hack. Thank you.

Lesane 02-06-2002 08:57 PM

The hack is almost done :)

@Darren Evans, an unique id will be used and a template will be used for the awards/medals with 2 variables $award[name] and $award[url] so you are free to display them whatever you want them to be displayed :up:

Darren Evans 02-06-2002 09:52 PM

Lesane.... you rock! :D

RoC-RTCWCentral 02-08-2002 02:14 AM

I just wanted to put my two cents in and say I can hardly wait for this. Great job Lesane!!

RoC

Darren Evans 02-09-2002 07:42 PM

1 Attachment(s)
Here is what I am hoping that this hack will acheive.

Lesane, how is progress going? :)

Lesane 02-09-2002 08:18 PM

Yes, thats possible.

About the progress, i'm fighting with those checkboxes :) I hope its done within these days. I cant hardly wait for the hack 2 ..hehe

Darren Evans 02-09-2002 08:19 PM

Thanks for the update. :)

Lesane 02-13-2002 02:26 PM

1 Attachment(s)
I'm almost done with the hack. I gonna start with the instructions/documentation now.

I attached a screenshot of the users page(where you can edit the users profile), as you can see is Lesane Award selected and that award will be displayed in the postbit. I also added an option to Enable awards for an user or not.

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

kurv 10-16-2004 12:58 AM

Quote:

Originally Posted by Lesane
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

Anyone knwo what happened to this thread..? I am desperatly looking for a system like this...

Thanks!!! :D


All times are GMT. The time now is 02:45 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.01116 seconds
  • Memory Usage 1,797KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete