Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Yet Another Awards System [1.2.1] Details »»
Yet Another Awards System [1.2.1]
Version: 1.2.1, by mtha mtha is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-27-2005 Last Update: 08-17-2005 Installs: 166
DB Changes Template Edits
Code Changes Additional Files  
No support by the author.

Yet Another Award System 1.2.1 ? by HacNho
Copyright (C) 2005 by HacNho, All rights reserved.


Hack Version: 1.2.1.050818
Compatible vB version: 3.0.8. It should work with all vB 3.0.x versions.
Support: https://vborg.vbsupport.ru/showthread.php?t=78934


For vBulletin 3.5.0, please check the other version:
https://vborg.vbsupport.ru/showthread.php?t=94836


DESCRIPTION:
This is a Medals/Awards system. Admin can give members awards, and award icons will be displayed in member's profile, posts, as well as in a award list.

FEATURES:
In ACP
- Can Create/Edit/Delete/Reorder categories/sub-categories in ACP (with category name and description)
- Can Create/Edit/Delete awards in ACP (with Award Name, Description, Icon URL, Image URL)
- Can Move one (or all) award(s) from one category to another
- Can set some awards un-classified (not displayed for public)
- Can re-order awards in awards showcase
+ Issue awards to members, based on username or userid, with Issue Reason
+ Remove awards from members
- [1.2] Options to set number of awards displayed in postbit
- [1.2] Options to turn on/off showing award icon, images, award requests in awards list, awards icons in memberlist

Front page

- Display awards list in with: Award Name, Description, Icon, Image, and Members who get each award.
- Display awards showcase in profile, with Award information, Issue time and reason
- Display award icons in postbit (showthread, showpost, announcement, private)
[1.2] Display limit awards in postbit, with total awards, and a link to awards showcase in member profiles.
[1.2] Award request, link to a form sending to email/PM/new thead or post (based on Dr Erwin Loh's Form hack)
[1.2] Display award on Memberlist page (by trulylowcarb)

CHANGES/MODIFICATION:
- Tables to add: 3 (award, award_user, award_cat)
- Files to add: 4 (/awards.php, /award_request.php, /admincp/award.php, /admincp/award_cat.php)
- Files to edit: 8 (/admincp/index.php, member.php, showthread.php, showpost.php, announcement.php, private.php, memberlist.php, /include/functions_online.php)
- Templates to add: 9 ('AWARDS', 'awards_awardbit','awards_awardusers_bit','awards_ bit','awards_userawards_bit','awards_category','aw ards_categorybit', 'awards_request_form', 'awards_request_formanswers')
- Templates to edit: 5 (MEMBERINFO, postbit, postbit_legacy, memberlist, memberlist_resultsbit )
- Phrases to add: 49

DIFFICULTY:
Easy-medium
Time: about 5-10 minutes
Installer is included

HISTORY:
For detail, please click here
2005.08.18: Version 1.2.1
2005.04.14: Version 1.2.02005.04.03: Version 1.1
2005.03.29: Version 1.0.1b
2005.03.28: Version 1.0.1
2005.03.28: Initial release

FUTURE PLAN:
- Allow comments on user's award (by Arial)
- PM/Email user when he/she get an award.
- Allow voting on user's award (by Arial)

ADD ONs


CREDIT:

Idea has been carried on by many people, here are some:
- Lesane for original Award hack for vB2, eventhough I've never use his hack
- AnimeWebby for Awards/ Medals/ Cards Hack [vB3], which I write new code based on his.
- Mac ycl6 for phpBB Medal System for phpBB forum
- Dr Erwin Loh for FORM TO THREAD/ FORUM/ PM/ EMAIL hack
- and all others for supports and ideas


IMPORTANT:
- BACKUP modified files and templates before making changes.
- Backup database is recommended.
- This hack is NOT compatible with AnimeWebby's Awards/Medals/CardsHack [vB3], you need to UNINSTALL his hack, before installing this one.

INSTALLATION:
Read HERE: https://vborg.vbsupport.ru/showthrea...316#post632316

UNINSTALL:
Read HERE: https://vborg.vbsupport.ru/showthrea...316#post632316

MANUAL:
Included in zip file

SCREENSHOT:
https://vborg.vbsupport.ru/showpost.php?p=632316

DEMO:
http://www.global-army.com/forum/awards.php
http://www.global-army.com/forum/sho...=9253#post9253
http://www.global-army.com/forum/member.php?u=22#award
There's some custom modification on this site, but you have the idea.

DONATIONS:
YAAS is free, but a donation of any amount is much appreciated.


SERVICE:
Installation service is available upon request

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 04-14-2005, 04:22 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
Basically, you need to make changes for some new functions to work.

File changed in this version:

/admincp/index.php => add link to awards system settings
member.php
showthread.php => limit awards to display, and show link in postbit
showpost.php => limit awards to display, and show link in postbit
announcement.php => limit awards to display, and show link in postbit
private.php => limit awards to display, and show link in postbit
memberlist.php => NEW, show award in Memberlist
/include/functions_online.php => NEW, show location in WhoisOnline

Templates changed in this version:

MEMBERINFO
postbit => show # of awards and link to profile
postbit_legacy => show # of awards and link to profile
memberlist => NEW, show award in memberlist
memberlist_resultsbit => NEW, show award in memberlist
are you sure you put upgrade files. Those instructions included were alreay done.
Reply With Quote
  #113  
Old 04-14-2005, 04:53 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TTG
Code:
$globaltemplates = array(
		'awards_bit'
);
Yep .. still only showing the additional column.
agrr, my bad. I forgot to change the "Find in File /private.php" with the correct file name in two spots

do the next changes that was named private.php next to it too. and the one bellow that for functions_online.php

or you can download the instruction again.

sorry.,


Quote:
Looking forward to installing the update, since I now need to incorporate a nomination and voting system for the Member of the Month awards I have created ... thanks again for this hack, I will be donating very soon!
what's your "voting system"? sounds like fun


Quote:
(Gotta get through tax day tomorrow, first.)
agrrr, I forgot this too , have to do it today
Reply With Quote
  #114  
Old 04-14-2005, 05:18 PM
p h o e n i x x p h o e n i x x is offline
 
Join Date: Jul 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mine will not show up in my postbit template. :-(
Help.

- PX
Reply With Quote
  #115  
Old 04-14-2005, 07:11 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by p h o e n i x x
Mine will not show up in my postbit template. :-(
Help.

- PX
make sure you have the following:

Pre-requirement:
1. You have some awards in stock
2. The member you are looking at, has some award
3. You have the option Display in postbit = YES
4. Maximum Awards Displayed > 0

make sure you did the follwing changes:

Code:
<edit file>
showthread.php
</edit file>

<search for>
	'pollresult',
</search for>

<replace>
	'pollresult',
	'awards_bit'
</replace>

<search for>
	if (!($forumperms & CANGETATTACHMENT))
	{
		$vboptions['viewattachedimages'] = 0;
		$vboptions['attachthumbs'] = 0;
	}

	$postcount = ($pagenumber - 1 ) * $perpage;
</search for>

<add before>
// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	if ($vboptions['aw_postbit'])
	{
		// Obtain list of awards for current user
		$alluserawards =  $DB_site->query("
			SELECT a.*, au.*, post.userid, post.postid 
			FROM " . TABLE_PREFIX . "post AS post
			INNER JOIN " . TABLE_PREFIX . "award_user AS au ON (au.userid=post.userid)
			INNER JOIN " . TABLE_PREFIX . "award AS a ON (a.award_id=au.award_id)
			WHERE $postids
			GROUP BY au.issue_id
		");
		while( $ua = $DB_site->fetch_array($alluserawards))
		{
			$userawardscache[$ua['userid']][$ua['issue_id']] = $ua;
		}
		$DB_site->free_result($alluserawards);
	}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']
</add before>

<search for>
	while ($post = $DB_site->fetch_array($posts))
	{
</search for>

<add after>
// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	$post['userawards'] = '';
	$post['showuserawards'] = false;
	if ($vboptions['aw_postbit'])
	{
			if (is_array($userawardscache[$post[userid]]))
			{
				$aw_i = 0;
		    	$post['num_awards'] = count($userawardscache[$post[userid]]);
		    	foreach($userawardscache[$post['userid']] AS $award_id => $award)
				{
					$aw_i++;
		    		if ($aw_i <= $vboptions['aw_display_limit'])
					{
		    		    eval('$post[userawards] .= "' . fetch_template('awards_bit') . '";');
					}
				}
				$post['showuserawards'] = true;
			}
		}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']

</add after>

<search for>
	// re-initialise the $postarray variable
	$postarray = array();
	while ($post = $DB_site->fetch_array($cacheposts))
	{
</search for>

<replace>
// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	if ($vboptions['aw_postbit'])
	{
		// Obtain list of awards for current user
		$alluserawards =  $DB_site->query("
			SELECT a.*, au.*, post.userid, post.postid 
			FROM " . TABLE_PREFIX . "post AS post
			INNER JOIN " . TABLE_PREFIX . "award_user AS au ON (au.userid=post.userid)
			INNER JOIN " . TABLE_PREFIX . "award AS a ON (a.award_id=au.award_id)
			WHERE post.postid IN (" . $cache_postids . ")
			GROUP BY au.issue_id
		");
		while( $ua = $DB_site->fetch_array($alluserawards))
		{
			$userawardscache[$ua['userid']][$ua['issue_id']] = $ua;
		}
		$DB_site->free_result($alluserawards);
	}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']

	// re-initialise the $postarray variable
	$postarray = array();
	while ($post = $DB_site->fetch_array($cacheposts))
	{

// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	$post['userawards'] = '';
	$post['showuserawards'] = false;
	if ($vboptions['aw_postbit'])
	{
		if (is_array($userawardscache[$post[userid]]))
		{
			$aw_i = 0;
			$post['num_awards'] = count($userawardscache[$post[userid]]);
			foreach($userawardscache[$post['userid']] AS $award_id => $award)
			{
				$aw_i++;
				if ($aw_i <= $vboptions['aw_display_limit'])
				{
		    		eval('$post[userawards] .= "' . fetch_template('awards_bit') . '";');
				}
			}
			$post['showuserawards'] = true;
		}
	}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']
</replace>
Make sure you did edit postbit (or postbit_legacy) template on the current using style.

HTML Code:
<!-- show awards -->
<if condition="$post[showuserawards]">
<div>
$post[userawards]
<br>
$vbphrase[total_awards]: $post[num_awards] (<a href="member.php?$session[sessionurl]u=$post[userid]#award">$vbphrase[more_awards] ...</a>)
</div>
</if>
<!-- /show awards -->
That's all what you need to do to show awards in "showthread", edit other files for other pages.

Hope you can get something out of it. It's hard to help if you provide me NO information, except saying "It will not show up"
Reply With Quote
  #116  
Old 04-14-2005, 08:23 PM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
agrr, my bad. I forgot to change the "Find in File /private.php" with the correct file name in two spots

do the next changes that was named private.php next to it too. and the one bellow that for functions_online.php

or you can download the instruction again.

sorry.,
(
Thanks mtha ... that fixed the problem .. thought I was going code crazy
Reply With Quote
  #117  
Old 04-14-2005, 10:38 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TTG

Thanks mtha ... that fixed the problem .. thought I was going code crazy
I still suggest you to install BoardMod and let it edit files automatically. it's quick, and it's easy. it also has option to show you to edit step by step too. I create the "file edit" mod in that program, before ... making the html instructions.
Reply With Quote
  #118  
Old 04-15-2005, 12:52 PM
RED_LINE RED_LINE is offline
 
Join Date: Jan 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack

i have this error

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT a.*, au.*, post.userid, post.postid
FROM post AS post
INNER JOIN award_user AS au ON (au.userid=post.userid)
INNER JOIN award AS a ON (a.award_id=au.award_id)
WHERE
GROUP BY au.issue_id
ORDER BY au.issue_time

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY au.issue_id
ORDER BY a

mysql error number: 1064

Date: Friday 15th of April 2005 09:50:46 AM
Script: http://www.xxx.net/vb/showthread.php?p=388449
Referer: http://www.xxx.net/vb/
Username: RED_LINE
IP Address: 62.150.45.128

.....
how can i fixed this error?

Regards,
Reply With Quote
  #119  
Old 04-15-2005, 01:19 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RED_LINE
nice hack

i have this error

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT a.*, au.*, post.userid, post.postid
FROM post AS post
INNER JOIN award_user AS au ON (au.userid=post.userid)
INNER JOIN award AS a ON (a.award_id=au.award_id)
WHERE
GROUP BY au.issue_id
ORDER BY au.issue_time

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY au.issue_id
ORDER BY a

mysql error number: 1064

Date: Friday 15th of April 2005 09:50:46 AM
Script: http://www.xxx.net/vb/showthread.php?p=388449
Referer: http://www.xxx.net/vb/
Username: RED_LINE
IP Address: 62.150.45.128

.....
how can i fixed this error?

Regards,
is that when you showthread? are you sure you did change the file correctly?

I DONOT have anything in showthread.php that ORDER BY au.issue_time, Could you check the awards_install_file.html and make the correct changes to the file? if the errors still there, send me the showthread.php that you have.

here's what you need to change in showthread.php:


Code:
<edit file>
showthread.php
</edit file>

<search for>
	'pollresult',
</search for>

<replace>
	'pollresult',
	'awards_bit'
</replace>

<search for>
	if (!($forumperms & CANGETATTACHMENT))
	{
		$vboptions['viewattachedimages'] = 0;
		$vboptions['attachthumbs'] = 0;
	}

	$postcount = ($pagenumber - 1 ) * $perpage;
</search for>

<add before>
// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	if ($vboptions['aw_postbit'])
	{
		// Obtain list of awards for current user
		$alluserawards =  $DB_site->query("
			SELECT a.*, au.*, post.userid, post.postid 
			FROM " . TABLE_PREFIX . "post AS post
			INNER JOIN " . TABLE_PREFIX . "award_user AS au ON (au.userid=post.userid)
			INNER JOIN " . TABLE_PREFIX . "award AS a ON (a.award_id=au.award_id)
			WHERE $postids
			GROUP BY au.issue_id
		");
		while( $ua = $DB_site->fetch_array($alluserawards))
		{
			$userawardscache[$ua['userid']][$ua['issue_id']] = $ua;
		}
		$DB_site->free_result($alluserawards);
	}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']
</add before>

<search for>
	while ($post = $DB_site->fetch_array($posts))
	{
</search for>

<add after>
// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	$post['userawards'] = '';
	$post['showuserawards'] = false;
	if ($vboptions['aw_postbit'])
	{
			if (is_array($userawardscache[$post[userid]]))
			{
				$aw_i = 0;
		    	$post['num_awards'] = count($userawardscache[$post[userid]]);
		    	foreach($userawardscache[$post['userid']] AS $award_id => $award)
				{
					$aw_i++;
		    		if ($aw_i <= $vboptions['aw_display_limit'])
					{
		    		    eval('$post[userawards] .= "' . fetch_template('awards_bit') . '";');
					}
				}
				$post['showuserawards'] = true;
			}
		}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']

</add after>

<search for>
	// re-initialise the $postarray variable
	$postarray = array();
	while ($post = $DB_site->fetch_array($cacheposts))
	{
</search for>

<replace>
// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	if ($vboptions['aw_postbit'])
	{
		// Obtain list of awards for current user
		$alluserawards =  $DB_site->query("
			SELECT a.*, au.*, post.userid, post.postid 
			FROM " . TABLE_PREFIX . "post AS post
			INNER JOIN " . TABLE_PREFIX . "award_user AS au ON (au.userid=post.userid)
			INNER JOIN " . TABLE_PREFIX . "award AS a ON (a.award_id=au.award_id)
			WHERE post.postid IN (" . $cache_postids . ")
			GROUP BY au.issue_id
		");
		while( $ua = $DB_site->fetch_array($alluserawards))
		{
			$userawardscache[$ua['userid']][$ua['issue_id']] = $ua;
		}
		$DB_site->free_result($alluserawards);
	}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']

	// re-initialise the $postarray variable
	$postarray = array();
	while ($post = $DB_site->fetch_array($cacheposts))
	{

// [START HACK='Yet Another Award System' AUTHOR='HacNho']
	$post['userawards'] = '';
	$post['showuserawards'] = false;
	if ($vboptions['aw_postbit'])
	{
		if (is_array($userawardscache[$post[userid]]))
		{
			$aw_i = 0;
			$post['num_awards'] = count($userawardscache[$post[userid]]);
			foreach($userawardscache[$post['userid']] AS $award_id => $award)
			{
				$aw_i++;
				if ($aw_i <= $vboptions['aw_display_limit'])
				{
		    		eval('$post[userawards] .= "' . fetch_template('awards_bit') . '";');
				}
			}
			$post['showuserawards'] = true;
		}
	}
// [END HACK='Yet Another Award System' AUTHOR='HacNho']
</replace>
Reply With Quote
  #120  
Old 04-15-2005, 07:40 PM
RED_LINE RED_LINE is offline
 
Join Date: Jan 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello

yes im sure about change the file correctly

the error somtimes apear not alaways

can you check showthread.php plz

Regards,
Reply With Quote
  #121  
Old 04-15-2005, 07:56 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Red Line

Please remove that file immediate. It is against your license agreement and against our forum rules to post vB files.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04980 seconds
  • Memory Usage 2,357KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_html
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete