vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Yet Another Awards System (https://vborg.vbsupport.ru/showthread.php?t=187600)

AuroraStorm 09-09-2008 09:44 PM

Works just fine. Where can I get more medals?

*installed*

Tanpapasmurf 09-09-2008 11:12 PM

Thanks for your hard work, My user's are now striving to play better on the field to get awards on our forum.

Thank you so much.

AuroraStorm 09-10-2008 12:31 AM

Uh, at the rate of sounding like I'm picking a scab (which I'm doing), how can I change the outgoing PM?

Quote:

Congratulation! You have got a new award!
Quote:

On behalf of myforums, it is with great honor that I extend to you best wishes and congratulations as you are receiving Gold Medal award.

The reason that goes with your award is:
...because this is kind of busted...

kurv 09-10-2008 02:13 AM

Quick question.... is there a way to create a link that when you click on the award, it takes you to the thread they received the award for..? I guess it would have to have a URL link box for each award given that it links to.

Is that possible... and what would this modification cost me :)

Thank you!! and thanks for the hard work!!

ImmortalForums 09-10-2008 08:32 PM

For those having the MySQLi error on their member pages open the plugin with your text editor of choice

Go to line 704 or find
Code:

$total_awards = mysql_num_rows($alluserawards);
and change to
Code:

$total_awards = mysqli_num_rows($alluserawards);
I dont know how to make this work in MySQL and MySQLi but MySQLi is recommended over MySQL by both the vbulletin developers and creates of mysql so this is a simple fix.

Maybe this can be thrown into the main post.

pretke 09-11-2008 06:05 AM

Quote:

Originally Posted by ImmortalForums (Post 1619391)
For those having the MySQLi error on their member pages open the plugin with your text editor of choice

Go to line 704 or find
Code:

$total_awards = mysql_num_rows($alluserawards);
and change to
Code:

$total_awards = mysqli_num_rows($alluserawards);
I dont know how to make this work in MySQL and MySQLi but MySQLi is recommended over MySQL by both the vbulletin developers and creates of mysql so this is a simple fix.

Maybe this can be thrown into the main post.

Working!
Thank you:up:

liwo 09-11-2008 05:17 PM

Thanks for looking into that! I wanted to do, too, but haven't come round to update my testforum to 3.7.3 yet...

To make it work with both, mysql and mysqli, you could just use the vBulletin API:

PHP Code:

$total_awards $db->num_rows($alluserawards); 

I haven't tested it yet but I'm sure it will work.

ssslippy 09-12-2008 04:03 PM

ah so $db replaces mysql supper easy fix!

nul7 09-13-2008 06:13 AM

Installed and working fine except for the links in the postbit did not link directly to the "My Awards" tab in the member profile. Here is the fix:

In member.php find:
Code:

        'contactinfo' => array(
                'class' => 'ContactInfo',
                'title' => $vbphrase['contact_info'],
        ),


Below that add the following:
Code:

        'myawards' => array(
                'class' => 'MyAwards',
                'title' => $vbphrase['my_awards'],
        ),


NOTE: It appears the coder is trying to do this with the plugin "YAAS in Member Profile - Profile", but it doesn't seem to be working.

Then, replace the entire awards_postbit_display template with:
Code:

<!-- show awards -->
<if condition="$post[showuserawards]">
<br />
<fieldset><legend><a href="member.php?u=$post[userid]&tab=myawards" title="$vbphrase[more_awards]">$vbphrase[award_showcase]</a></legend>
<div>
$post[userawards]
<br>
<a href="member.php?u=$post[userid]&tab=myawards" title="$vbphrase[more_awards]">$vbphrase[total_awards]</a>: $post[num_awards]
</div>
</fieldset>
</if>
<!-- /show awards -->


For anyone who has edited this template, all you need to do is replace the "#award" appended on the links with "&tab=myawards".

Hope that helps!

liwo 09-13-2008 07:23 AM

Thanks for that info! I tested it and there is no need to change anything in member.php. It works with the code in the plugin.
The template edit of course is necessary.


All times are GMT. The time now is 09:12 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.01963 seconds
  • Memory Usage 1,746KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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