PDA

View Full Version : Standalone Add-On for Awards/Medals/Cards Hack


Creed
02-22-2005, 10:00 PM
Stand Alone Awards/Medals/Cards Add-On Hack

What this hack does:

This hack removes the award showcase from your users profile, but leaves a link to the new standalone version. This hack gives your members (usergroups you specify) the ability to request awards for other members.

Requires: Awards/Medals/Cards Hack (https://vborg.vbsupport.ru/showthread.php?t=61108) installed!

Instructions include:

Template Edits: 5
New Templates: 3
New Files: 1
New Phrases: 2
File Edits: 5
DB Changes: 1


1.01 Update:
-- Removed unused queries in award.php, and cached templates to make sure page loads as fast as possible.
-- Grouped awards templates together, to make styles and templates cleaner
-- Fixed typo in template causing images not to show properly in IE
-- General coding cleanup!

Screenies are attached, and you can see this in use here! (http://www.hdclan.org/forums/award.php?u=1)

Creed
02-23-2005, 02:09 PM
Screenies!!

Polo
02-23-2005, 03:01 PM
mmm... :) interesting thanks Creed

willie3wire
02-23-2005, 06:19 PM
Nice Addon.

bigcurt
02-23-2005, 06:37 PM
Awesome man thanks...

/me installs

Creed
02-24-2005, 03:00 AM
Glad some people found use from it ;)

Creed
02-25-2005, 10:38 AM
The update is there, I will be hopefully soon adding a nice little optional link to display an available awards list soon :) (Meaning, such as in navbar, or postbit, etc) Also, when I get off my lazy arse, I will make a variable for the User that is emailed the requests for awards in the admincp, so it doesn't have to be hardcoded into the award.php file :D

paulomt1
02-26-2005, 12:53 PM
The hack work with vb 3.0.7?

Creed
02-26-2005, 12:54 PM
I haven't installed 3.0.7 yet, however there is absolutely NO reason that it wouldn't work. There is only one template edit from the original vBulletin install files.

paulomt1
02-26-2005, 01:12 PM
I have this hack installed in my previous vb 3.0.3 but when I upgraded to 3.0.7 this hack doesn’t work anymore.
I have installed it from scratch but didn't work.

Creed
02-26-2005, 01:15 PM
Do you have the Awards/Medals/Cards Hack (https://vborg.vbsupport.ru/showthread.php?t=61108) installed as well?

paulomt1
02-26-2005, 01:18 PM
No, because don't work in VB 3.0.7

Creed
02-26-2005, 01:36 PM
That would likely be the problem, as for why the hack wouldn't work with 3.0.7 I don't know. You need it installed before my add-on will work. Sorry!

Creed
02-26-2005, 09:56 PM
What exactly is happening, that causes the Awards/Medals/Cards Hack not to work with 3.0.7? I would like to try to fix it myself ;)

Arial
02-27-2005, 10:27 AM
No, because don't work in VB 3.0.7

Can I ask you why the original hacks version does not work with vb 3.0.7 ?

We are considering paying a developer to update the medals hack program but he needs to know waht the basic problem was.

paulomt1
02-27-2005, 12:17 PM
I have installed it finally in VB 3.0.7 but with some hard work for who don't know program in PHP.
The queries codes are different in VB 3.0.7.

Arial
02-27-2005, 01:03 PM
Would you be interested in installing it on my forum for a fee, seeing as you have managed to get it work?

Arial
02-27-2005, 02:47 PM
Or alternatively give us some idea of what you had to do so another modder/coder could attempt to make this work for vb 3.0.7 etc.

paulomt1
02-27-2005, 03:36 PM
Sorry, but I'm not a coder for can do this.

The queries that I talk is the code started by this line:
$post = $DB_site->query_first("

You must see the differences and apply the changes yourself or ask for a coder do the job for you.

Arial
02-27-2005, 03:40 PM
Ok thanks , Creed is that enough to go on re our PM?

Creed
02-27-2005, 07:25 PM
Hrmn, odd. I finally got off my lazy arse and installed a test 3.0.7 board and its working just fine there. So there should be NO problems installing on 3.0.7.

http://caldermonkey.hdclan.org/forums

You can see it in action

Creed
02-27-2005, 07:46 PM
I've also re-written the install instructions. So that they are hopefully easier to understand, and yes it DOES work on 3.0.7

Cyricx
03-01-2005, 05:00 PM
I didn't have any problems adding the awards in 3.0.7 you just have to toss in the part that says ,useraward
or the left join section.

Basically, whenever you have a HUGE replace this in a hack and you don't have the original code, compare what they want you to take out with what they want you to put in, figure out the differences and then add in those differences.

Creed - How does this hack go about adding the award? Does it automatically add it to the user? That's what I'm hoping for that way I can give my mods the abilities to request these or more directly add them via a controllable link then granting them access to edit users :)

Creed
03-02-2005, 02:16 AM
It uses the admin user options to add/remove the awards. I was thinking about adding the ability to let usergroups you specify add/remove awards

Cyricx
03-02-2005, 11:51 AM
That would be very cool, kinda cut out the middle man some and let some of the mods do the work. :)

Great hack in any case, gonna roll this onto my test server and then take it live :)

Arial
03-04-2005, 07:09 PM
Hrmn, odd. I finally got off my lazy arse and installed a test 3.0.7 board and its working just fine there. So there should be NO problems installing on 3.0.7.

http://caldermonkey.hdclan.org/forums

You can see it in action

Creed

On the one you had installed on the above URL you had some great looking award graphics. ?

I think they were animated in blue. Where they stock with the hack or did you just locate them somewhere?

Creed
03-05-2005, 08:13 AM
My co-admin made them. Unfortunately the test board I had up, is currently dead (not because of the awards hack :-p), because I killed it to save space on a database :)

You can still view the awards images that he's talking about at www.hdclan.org/forums/awards.php

Arial
03-05-2005, 08:51 AM
Ahh, shame, they look fantastic. Shame there's not a whole set, I would have paid for those they look that good.

Arial
03-05-2005, 01:38 PM
To Creed/ And or any other gurus out there

Anybody interested in earning some $$$ utilising their knowledge of this hack go here:
https://vborg.vbsupport.ru/showthread.php?p=621249

Twiser
03-14-2005, 09:26 PM
Thx for a great hack. I have got everything working perfectly except
the following.

U are not allowed to reqeust an award. I have check and the email and its enabled. But I was wondering

"DB QUERY (replace *TABLE.PREFIX* with your VB table prefix, if you don't have one remove it completely along with the underscore),:
*****************************************
ALTER TABLE *TABLE.PREFIX*_usergroup ADD `awrequest` INT( 12 ) NOT NULL"

were to I change that in the db or in the award.php.

thx for any help.

Creed
03-15-2005, 08:40 AM
Thx for a great hack. I have got everything working perfectly except
the following.

U are not allowed to reqeust an award. I have check and the email and its enabled. But I was wondering

"DB QUERY (replace *TABLE.PREFIX* with your VB table prefix, if you don't have one remove it completely along with the underscore),:
*****************************************
ALTER TABLE *TABLE.PREFIX*_usergroup ADD `awrequest` INT( 12 ) NOT NULL"

were to I change that in the db or in the award.php.

thx for any help.


As far as the request award, that is a setting under your Admincp, you can set so that only certain usergroups can request awards.

For the DB Query, you need to run that for the settings to take effect, if you don't have a prefix on your table just run this:

ALTER TABLE usergroup ADD `awrequest` INT( 12 ) NOT NULL

Twiser
03-15-2005, 01:27 PM
That worked liked a charm , Thx for the help =)

Creed
03-15-2005, 11:32 PM
No problem, glad you got it working :)

Flow Fusion
03-16-2005, 12:13 AM
sorry but where is the "awards_mailselect template" located? I only have ustom Templates

AWARDS [Edit] [Revert] [View Original]

awards_bit [Edit] [Revert] [View Original]

awards_earnawards_bit [Edit] [Revert] [View Original]

awards_userawards_bit [Edit] [Revert] [View Original]?

Creed
03-16-2005, 05:25 AM
awards_mailselect is a new template :)

Flow Fusion
03-16-2005, 10:54 AM
So far soo good till I get to this...

DB QUERY (replace *TABLE.PREFIX* with your VB table prefix, if you don't have one remove it completely along with the underscore),:<----what does this mean?
*****************************************
ALTER TABLE *TABLE.PREFIX*_usergroup ADD `awrequest` INT( 12 ) NOT NULL<----what does this mean?

also I noticed the java script doesn't work any longer on the drop menu for the usernames. I click o the name and it takes me to his/her member id. Any suggestions?

Marco van Herwaarden
03-16-2005, 11:30 AM
If you don't use table prefix, then use:
ALTER TABLE usergroup ADD `awrequest` INT( 12 ) NOT NULL

If you use a table prefix of for example 'vb3_', then use:
ALTER TABLE vb3_usergroup ADD `awrequest` INT( 12 ) NOT NULL

Flow Fusion
03-16-2005, 11:37 AM
I'm sorry but what do you mean "if I use table prefix?" I'm lost here and yes I did click the link lol.

Marco van Herwaarden
03-16-2005, 12:09 PM
Check either your includes/config.php for a line like:
$tableprefix = '';
If you are using a table prefix, then you will see it here between the quotes.

Or check in myphpadmin, if all tables are prefixed.

Twiser
03-16-2005, 03:08 PM
Spoke a bit to soon =) , I have everything set up all the modification done , But in userprofile the awardspicture shows up instead of the link , What can I have missed? ,
I have gone trough all the step in the upgrade a couple of times now and cant see that I missed something.
Sorry to bother u with questions but I really would love to see this mod work perfectly

Flow Fusion
03-16-2005, 08:49 PM
OK i don't have a table prefix. I think what I'm asking is do I add a table to my usergroup or do I edit them in the dAtabase?

OK I fixed it. It was the darn ' that messed me up.

Creed
03-16-2005, 09:50 PM
Spoke a bit to soon =) , I have everything set up all the modification done , But in userprofile the awardspicture shows up instead of the link , What can I have missed? ,
I have gone trough all the step in the upgrade a couple of times now and cant see that I missed something.
Sorry to bother u with questions but I really would love to see this mod work perfectly

There is an edit in the MEMBERINFO template, that removes the award pictures and provides a link to the award.php file. Make sure you've done that edit.

Twiser
03-17-2005, 08:25 AM
Checked and the modification is done correctly in the memberinfo :ermm:

Creed
03-17-2005, 09:50 PM
Can you provide a link to the site, or is this a localhost test?

Twiser
03-17-2005, 10:02 PM
Sure thing

www.webpal.nu/TRR

Flow Fusion
03-18-2005, 11:07 AM
OK I seem to have done something wrong I tested it out and this is the message I get...

From: Megatron@st06.startlogic.com
Subject: Request Award for Megatron
Date: March 18, 2005 7:55:37 AM EST
To: flow@giftedsouls.com

This is a request from Flow Fusion at Gifted Souls for an Award to be given.
The Gifted Souls owners cannot accept any responsibility for the

Now it doesn't show what award they requested or even a subject that I typed in. And why is it saying from Megatron when I made the request for him?

Creed
03-19-2005, 09:52 AM
So it seems it truncated the email.

Make sure that the global phrase : awards_email contains the following:

This is a request from $bbuserinfo[username] at $vboptions[bbtitle] for an Award to be given.
The $vboptions[bbtitle] owners cannot accept any responsibility for the contents of the email.
-----------------------
This is the message:
-----------------------

User Requesting Award: <a href=http://WWW.DOMAIN.COM/FORUM-DIR/moderator.php?do=useroptions&u=$userinfo[userid]> $from</a>
Recipient: $recip
Award Requested: $which
Reason: $message

of course replacing WWW.DOMAIN.COM/FORUM-DIR with your site and forums address :)

Flow Fusion
03-19-2005, 02:06 PM
Thanks alot that did it.

Twiser
03-19-2005, 03:41 PM
Any solution to my problem Creed? , I did a clean install but ended up with the same problem.


www.webpal.nu/TRR


Here is the code for memberinfo

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>
$headinclude
</head>
<body>
$header
$navbar

<!-- main info - avatar, profilepic etc. -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[view_profile]<span class="normal">: $userinfo[username]</span></td>
</tr>
<tr>
<td class="alt2">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="border-bottom:1px solid $stylevar[tborder_bgcolor]" width="100%" colspan="2">
<if condition="$userinfo['rank'] OR $userinfo['reputationdisplay']">
<div style="float:$stylevar[right]; padding:4px">
<if condition="$userinfo['rank']"><div align="center">$userinfo[rank]</div></if>
<if condition="$userinfo['reputationdisplay']"><div align="center">$userinfo[reputationdisplay]</div></if>
</div>
</if>
<div style="font-size:18pt">$userinfo[musername]</div>
<if condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if>
</td>
<if condition="$show['profilepic']">
<td valign="top" align="$stylevar[right]" rowspan="2">
<img src="image.php?u=$userinfo[userid]&amp;type=profile&amp;dateline=$userinfo[profilepicdateline]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]" />
</td>
</if>
</tr>
<tr valign="top">
<if condition="$show['avatar']">
<td><img src="$userinfo[avatarurl]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
<else />
<td>&nbsp;</td>
</if>
<td class="smallfont" valign="bottom" align="$stylevar[right]">
<if condition="$show['lastactivity']">
<div>$vbphrase[last_activity]: $userinfo[lastactivitydate] <span class="time">$userinfo[lastactivitytime]</span>&nbsp;</div>
</if>
<if condition="$show['currentlocation']">
<div><if condition="$userinfo['action']">$userinfo[action] $userinfo[where]<if condition="$show['detailedtime']"> - <else /> @ </if> $userinfo[time]<else />$vbphrase[offline]</if>&nbsp;</div>
</if>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- / main info - avatar, profilepic etc. -->

<!-- button row -->
<if condition="$show['profilelinks']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$userinfo['showvcard']">
<td class="vbmenu_control"><a href="member.php?$session[sessionurl]do=vcard&amp;u=$userinfo[userid]">$vbphrase[download_vcard]</a></td>
</if>
<if condition="$show['member']">
<td class="vbmenu_control">
<if condition="$show['addbuddylist']">
<a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_buddy_list]</phrase></a>
<else />
<a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_buddylist]</phrase></a>
</if>
</td>
<td class="vbmenu_control">
<if condition="$show['addignorelist']">
<a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_ignore_list]</phrase></a>
<else />
<a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_ignorelist]</phrase></a>
</if>
</td>
</if>
<if condition="can_moderate()">
<td class="vbmenu_control"><a href="moderator.php?$session[sessionurl]do=useroptions&amp;u=$userinfo[userid]">$vbphrase[user_options]</a></td>
</if>
</tr>
</table>
</if>
<!-- / button row -->

<br />

<if condition="$show['signature']">
<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
<td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</tr>
</table>
<!-- / signature row -->
<br />
</if>


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" width="50%">$vbphrase[forum_info]</td>
<td class="tcat" width="50%">$vbphrase[contact_info]</td>
</tr>
<tr valign="top">

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[join_date]: <strong>$userinfo[datejoined]</strong>
</div>
</div>

<fieldset class="fieldset">
<legend>$vbphrase[posts]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
$vbphrase[total_posts]: <strong>$userinfo[posts]</strong> (<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)
</td>
</tr>
<if condition="$vboptions['profilelastpost']">
<tr>
<td>
$vbphrase[last_post]:<br />
<a href="$userinfo[lastposturl]">$userinfo[lastposttitle]</a><br />
$userinfo[lastpostdate] <span class="time">$userinfo[lastposttime]</span>
</td>
</tr>
</if>
<tr>
<td><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td>
</tr>
<tr>
<td><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;s earchuser=$userinfo[urlusername]"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></td>
</tr>
</table>
</fieldset>

<if condition="$vboptions['usereferrer']">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[referrals]: <strong>$referrals</strong>
</div>
</div>
</if>

<if condition="$show['usernotes']">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[user_notes]: <strong>$usernote[total]</strong> [<a href="usernote.php?$session[sessionurl]u=$userinfo[userid]">$vbphrase[view]</a>]
<if condition="$show['usernotetotal']">
<br />($vbphrase[last]: $usernote[lastpostdate] <span class="time">$usernote[lastposttime]</span>)
</if>
</div>
</div>
</if>
<!-- [Awards Hack ] -->

<fieldset class="fieldset">
<legend>$userinfo[username]'s Awards</legend>
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
<a href="award.php?u=$userinfo[userid]">View $userinfo[username]'s Awards</a>

</div>
</div>
</fieldset>

<!-- [end Awards Hack ] -->
</div>
</div>
</td>

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$show['homepage']">
<tr>
<td>
$vbphrase[home_page]:<br />
<a href="$userinfo[homepage]" target="_blank">$userinfo[homepage]</a>
</td>
</tr>
</if>
<tr>
<td>
$vbphrase[email]:<br />
<a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[send_message_via_email_to_x]</phrase></a>
</td>
</tr>
<if condition="$userinfo['pm']">
<tr>
<td>
$vbphrase[private_message]:<br />
<a href="private.php?$session[sessionurl]do=newpm&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[send_private_message_to_x]</phrase></a>
</td>
</tr>
</if>
</table>
</div>

<if condition="$show['hasimicons']">
<fieldset class="fieldset">
<legend>$vbphrase[instant_messaging]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$userinfo['showicq']">
<tr>
<td>$userinfo[icqicon]</td>
<td><a href="#" onclick="return imwindow('icq', '$userinfo[userid]', 500, 450)">$userinfo[icq]</a></td>
</tr>
</if>
<if condition="$userinfo['showaim']">
<tr>
<td>$userinfo[aimicon]</td>
<td><a href="#" onclick="return imwindow('aim', '$userinfo[userid]', 400, 200)">$userinfo[aim]</a></td>
</tr>
</if>
<if condition="$userinfo['showmsn']">
<tr>
<td>$userinfo[msnicon]</td>
<td><a href="#" onclick="return imwindow('msn', '$userinfo[userid]', 400, 200)">$userinfo[msn]</a></td>
</tr>
</if>
<if condition="$userinfo['showyahoo']">
<tr>
<td>$userinfo[yahooicon]</td>
<td><a href="#" onclick="return imwindow('yahoo', '$userinfo[userid]', 400, 200)">$userinfo[yahoo]</a></td>
</tr>
</if>
</table>
</fieldset>
</if>

</div>
</div>
</td>

</tr>
<tr>
<td class="tcat" width="50%">$vbphrase[additional_information]</td>
<td class="tcat" width="50%">$vbphrase[group_memberships]</td>
</tr>
<tr valign="top">

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<if condition="$show['extrainfo']">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$userinfo['birthday']">
<tr>
<td>
<strong>$vbphrase[birthday]</strong>:<br />
$userinfo[birthday]
</td>
</tr>
</if>
$customfields
</table>
<else />
<em>$vbphrase[n_a]</em>
</if>
</div>

</div>
</div>
</td>

<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<div class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]px" border="0">
<tr>
<if condition="$show['membergroups']">
<td><strong><phrase 1="$userinfo[username]">$vbphrase[x_is_a_member_of_the_following_groups]</phrase></strong>:</td>
<else />
<td><strong><phrase 1="$userinfo[username]">$vbphrase[x_is_not_a_member_of_any_public_groups]</phrase></strong></td>
</if>
</tr>
$membergroupbits
</table>
</div>

</div>
</div>
</td>

</tr>
</table>

$footer

</body>
</html>

Creed
03-19-2005, 11:41 PM
BTW, I checked your site...and the hack is working ;)

Twiser
03-20-2005, 07:46 AM
Plz call me stupid :squareeyed: but under the membersname when they post should´t there be a link instead of pictures?

Creed
03-20-2005, 08:20 AM
Actually, I see what you're talking about and that is a function of the original hack. The pictures of the awards in the postbit. I didn't take that out, but I could very easily make a change to it if you would like. The only thing that I changed in the postbit, is if you click the poster's username there is a DHTML menu that includes a link to the poster's awards. :)

Twiser
03-20-2005, 08:28 AM
That would be great Creed if u could do that :)

Creed
03-20-2005, 08:47 AM
Ok, I've cooked a little something up for you. Since this was kind of like a request. See the attacked txt file for the hack...or follow the directions in this post:

Open /includes/functions_showthread and find:
// [START HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 12 ]
// AWARDS IN POSTBIT
foreach($userawards AS $key => $useraward)
{
$userawardid = "award$useraward[awardid]";
if (!empty($post["$userawardid"]))
{
$userawardid_desc = $userawardid."_desc";
if ($post[$userawardid_desc] != '')
{
$useraward[description] = $post[$userawardid_desc];
}
eval('$post[\'userawards\'] .= "' . fetch_template('awards_bit') . '";');
}
}
// END AWARDS IN POSTBIT
// [END HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 12 ]
replace with:
// [START HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 12 ]
// AWARDS IN POSTBIT
foreach($userawards AS $key => $useraward)
{
$userawardid = "award$useraward[awardid]";
if (!empty($post["$userawardid"]))
{
$userawardid_desc = $userawardid."_desc";
if ($post[$userawardid_desc] != '')
{
$useraward[description] = $post[$userawardid_desc];
}
eval('$post[\'userawards\'] .= "' . fetch_template('awards_postbit') . '";');
}
}
// END AWARDS IN POSTBIT
// [END HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 12 ]

created a new template called: "awards_postbit" and fill with:
<a href="award.php?u=$userinfo[userid]"><img src="$useraward[icon_url]" alt="$useraward[name]" height="17" width="17" border="0" /></a>

That will do it :)

**NOTE** you can change the size of the display of the images, by changing the height= and width= in the awards_postbit template. If you want to go further, I could probably do just about whatever you wanted in postbit just let me know. I take requests in most cases :)

Twiser
03-20-2005, 09:02 AM
Thx a lot Creed for all the help :D , I was just wondering if instead of a icon or a pic to have text (User awards) with a link to the awardpage :nervous:


Damn I finally managed to do something by myself , Thx again for all the help Creed

Creed
03-20-2005, 09:07 AM
sure, like I said just let me know what you want.


How about this...

in POSTBIT/POSTBIT LEGACY template find:
<div>$post[userawards]</div>

replace with:
<div id="awardspostmenu_$post[postid]"><b>View Awards</b>
<script type="text/javascript"> vbmenu_register("awardspostmenu_$post[postid]", true); </script>
</div>
<div class="vbmenu_popup" id="awardspostmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]'s Awards</td>
</tr>
<tr><td class="vbmenu_option">$post[userawards]</td></tr>

</table>
</div>

Tell me what you think :)

Creed
03-20-2005, 09:45 AM
This is becoming fun, I've decided to create a nice little extra that allows the user to choose whether or not to show the awards menu is shown in the postbit. This is controlled by an option in the User CP :)

Just follow the instructions on the attached txt file :)

Twiser
03-20-2005, 09:53 AM
That looks awsome , Thx man :) :up:

Creed
03-20-2005, 09:55 AM
That looks awsome , Thx man :) :up:

No Problem, glad you like!