vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Yet Another Awards System 3.5 v2.1.2 (https://vborg.vbsupport.ru/showthread.php?t=94836)

Flow Fusion 10-14-2005 07:52 AM

Quote:

Originally Posted by mtha
- Read the manual
- Check the Award settings. Request is Off by default, you need to turn is ON and configure "award_request_settings" if you want to use.

Help. I turned it on but I still don't see a link to request an award?

pfvc 10-15-2005 05:53 AM

I didn't have too much luck with your alterative code to display 5 awards, then if there is more, drop to the next line to display next 5 etc, etc... any suggestions or other alternatives?

The other thing that also came to mind was, my awards in the posts etc aren't tiny like the example you included, I can probably make them slightly smaller but any smaller would defeat the purpose of the size they display at. Because of this if like in my case I want to display 5 awards across etc, the above stuff i.e. Last Online, Join Date, Posts, and IM icons etc, all still sit above the awards but sit with the left most awards. Is it possible to keep that data where it belongs at the far right so they don't move with the awards... oh I probably have said my user stat bar that most people have on the left of each post is at the top of user posts on my forum.

Would be greatful for any assistance you can assist me with to get this working the way I'd like it to.



Quote:

Originally Posted by mtha
I didnt test, but you can try. edit YAAS - Showthread_postbit_create plugin...


WhiteWolf 10-15-2005 07:15 PM

Fixed it not showing after quick reply.
It appears that in newreply.php we find that the QuickReply is calling the same method as the post, except that the script name changes to the if check in the postbit_display_start fails and the code is not included.

To fix:
Replace in postbit_display_start:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement')) 

With:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply')) 


secret1980 10-16-2005 05:07 AM

clicked install :D thanks for the good mod :D

Flow Fusion 10-16-2005 05:43 AM

Quote:

Originally Posted by WhiteWolf
To fix:
Replace in postbit_display_start:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement')) 

With:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply')) 



Where is postbit_display_start?

mtha 10-16-2005 05:51 AM

You can either re-import the product xml (2.0.4) or edit the plugin YAAS - Showthread_postbit_create as mention above.

Thank WhiteWolf for the fix.

klinsek 10-16-2005 01:24 PM

This is a great mod. Nice job Mtha!

Trying it out on our test server and happy with its core functionality. No issues as of yet.

We use a "badge" system on our current site (vb 3) which is made up of hacks here and there. Basically a badge is shown in the users postbit if they belong to a certain group.

Id love to see a usergroup functionality added to this however. We have about 30k members and to add accolade badges manually is pretty much out of the question. Hehe. I want to just do "usergroup ID = this badge".

I like the ability to add to a single user though, as it may serve useful for more "special" awards. The awards page showing a nice legend of all the awards is great as well. Nice touch.

Anyways, is anyone else interested in a "issue award to usergroup" functionality within this mod? Not sure how hard or simple it will be, but I am going to ask my partner (the code guru) to give it a go.

Thanks
*install*

Flow Fusion 10-16-2005 01:37 PM

PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement'

With:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply'

This is the other script and it is edited cause it had an extra ) after announcement but...it still doesn't work.
From YAAS - postbit_display_start
PHP Code:

// [START HACK='Yet Another Award System' AUTHOR='HacNho']

 
if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply')  OR (THIS_SCRIPT == 'newreply'))
{
    global 
$db$vbulletin;
    {
        if (
$vbulletin->options['aw_postbit']) 
        {
            if (
THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid'];
            
$post['userawards'] = '';
            
// Obtain list of awards for current user
            
$alluserawards =  $db->query_read("
                SELECT a.*, au.*
                FROM " 
TABLE_PREFIX "award a, " TABLE_PREFIX "award_user au
                WHERE (au.userid = "
.$this->post['userid'].") AND (a.award_id=au.award_id)
                ORDER BY au.issue_time
            "
);

            
$post['showuserawards'] = false;
            if (
$post['num_awards'] = $db->num_rows($alluserawards))
            {
                
$aw_i 0;

                while (
$award $db->fetch_array($alluserawards))
                {
                    
$aw_i++;
                    if (
$aw_i <= $vbulletin->options['aw_display_limit'])
                    {        
                        eval(
'$post[userawards] .= "' fetch_template('awards_bit') . '";');
                    }
                }
                
$post['showuserawards'] = true;
                
$db->free_result($alluserawards);
            }
        }
    }
}
// [END HACK='Yet Another Award System' AUTHOR='HacNho'] 


Kaelon 10-16-2005 03:35 PM

Great hack - but found a bug on one of my threads (and not sure how to even debug or fix it):

Code:

Database error in vBulletin 3.5.0:

Invalid SQL:

                                SELECT a.*, au.*
                                FROM award a, award_user au
                                WHERE (au.userid = ) AND (a.award_id=au.award_id)
                                ORDER BY au.issue_time;

MySQL Error  : You have an error in your SQL syntax near ') AND (a.award_id=au.award_id)
                                ORDER BY au.issue_time
                        ' at line 4
Error Number : 1064
Date        : Sunday, October 16th 2005 @ 11:25:07 AM
Script      : http://www.xxxxxx.com/forums/showpost.php?p=6344
Referrer    :
IP Address  : xxx.x.xx.xxxx
Username    : Kaelon
Classname    : vb_database

Edit: I've debugged the problem. Apparently, the poster had his account deleted and the post is showing up as coming from an Unregistered user. Thoughts on how we can fix this?

Kaelon 10-16-2005 04:27 PM

Fixed it! Apparently, an error over in the postbit_display_start plugin.

CHANGE THIS:

Code:

                if ($vbulletin->options['aw_postbit'])
TO THIS:

Code:

                if (($vbulletin->options['aw_postbit']) AND ($this->post['userid']))

WhiteWolf 10-16-2005 11:25 PM

Quote:

Originally Posted by Flow Fusion
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement'

...
This is the other script and it is edited cause it had an extra ) after announcement but...it still doesn't work.
From YAAS - postbit_display_start
...

Didn't notice, typed it as I remembered it before I edited it (my mistake!)

Quote:

Originally Posted by Kaelon
Fixed it! Apparently, an error over in the postbit_display_start plugin.

CHANGE THIS:

Code:

                if ($vbulletin->options['aw_postbit'])
TO THIS:

Code:

                if (($vbulletin->options['aw_postbit']) AND ($this->post['userid']))

Instead of
PHP Code:

        if (($vbulletin->options['aw_postbit']) AND ($this->post['userid'])) 

To avoid a typecast from int to bool, it should be this (assuming you want it non-zero):

PHP Code:

if (($vbulletin->options['aw_postbit']) AND ($this->post['userid'] !== 0)) 

Assuming data is bad.

Flow Fusion 10-17-2005 12:12 AM

But it still will remove the award if you hit the edit button and edit the thread. And can I get some help on the request award?

WhiteWolf 10-17-2005 09:10 PM

In order to display after edit, open the postbit_display_start "YAAS - postbit_display_start" plugin hook and change:

(Current file should say this... if it doesn't then you don't have the latest product file or have not been following the topic:)
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply')) 

To contain
Code:

OR (THIS_SCRIPT == 'editpost')
, as such:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply') OR (THIS_SCRIPT == 'editpost')) 


mtha 10-17-2005 11:08 PM

Quote:

Originally Posted by WhiteWolf
In order to display after edit, open the postbit_display_start "YAAS - postbit_display_start" plugin hook
To contain
Code:

OR (THIS_SCRIPT == 'editpost')
, as such:
PHP Code:

if ((THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'announcement') OR (THIS_SCRIPT == 'newreply') OR (THIS_SCRIPT == 'editpost')) 


Thanks WhiteWolf :)

Using this would work too:


PHP Code:

if (in_array(THIS_SCRIPT,  array('showpost''private''announcement''newreply','editpost'))) 


Flow Fusion 10-17-2005 11:20 PM

Yup that fixed it. Thanks guys. Now about that request award thing?

o0Hubba0o 10-18-2005 09:50 PM

Quote:

Originally Posted by Flow Fusion
Yup that fixed it. Thanks guys. Now about that request award thing?

Edited, nvm me I was being silly heh, forgot to upload the files. :nervous:

WhiteWolf 10-20-2005 01:02 AM

Quote:

Originally Posted by mtha
Thanks WhiteWolf :)

Using this would work too:


PHP Code:

if (in_array(THIS_SCRIPT,  array('showpost''private''announcement''newreply','editpost'))) 


I'd be cautious about using in_array, it may be more (detrimental) than it's worth in terms of processing time on the template. (Roughly 50% over a chained OR statement)

Flow Fusion 10-21-2005 03:29 PM

OK I don't even see where to click to request an award from? Any help?

mtha 10-22-2005 06:09 PM

Quote:

Originally Posted by Flow Fusion
OK I don't even see where to click to request an award from? Any help?


All I can say is turn on the Show Request Award in AdminCP/ award options, and go to this page. there will be a column on the far right, to request award.

/forum/awards.php

Flow Fusion 10-22-2005 09:07 PM

Does anyone have it active?

mtha 10-23-2005 10:44 AM

Quote:

Originally Posted by Flow Fusion
Does anyone have it active?

1. Did you turn the option to request award ON? (see attachment)
http://giftedsouls.com/gs/admincp/op...dogroup=awards

2. Did you look at the right place for the request award link? (see attachment)
http://giftedsouls.com/gs/awards.php


remember, when you turn it on and use it, you HAVE to configure the request-award properties in order to use it properly.

Flow Fusion 10-23-2005 03:43 PM

I'm afraid my confusion is in this part.

PHP Code:

//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array 
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7,8.9.10.11.12,27,))) print_no_permission();

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF THIS PHP FILE AND TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS!
//You can easily make more forms by just copying this file, renaming it, and modifying the variable in
//this file. You can keep the same templates for different forms. For more customization, you can 
//use different templates, by renaming and modifying the templates.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Name of this file
$phpfilename "request_award.php";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum "1";

//FORUM TO POST NEW THREAD IN
$formforumid "131";<---------------------------------------I added the arror

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll "1";
$formoption1 "Yes";
$formoption2 "No";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO REPLY TO EXISTING THREAD
$formreply "1";

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid "1";<---------------------------------------I added the arror


//FORUM ID WHERE THE EXISTING THREAD IS IN
$formreplyforumid "2";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm "1"


Flow Fusion 10-23-2005 05:53 PM

I have it working I just don't see the link..

http://www.giftedsouls.com/gs/reques...php?award_id=1

Name: test
PW: 999999

Flow Fusion 10-23-2005 07:21 PM

I got it now. Great hack. Thanks.

Flow Fusion 10-25-2005 12:27 AM

Any way to make it so more than one person can get a PM on the request?

MissKalunji 10-25-2005 12:07 PM

i get this error when i try to go here : http://www.dancehallareaz.com/forum/...8&postcount=15


Quote:

SELECT a.*, au.*
FROM award a, award_user au
WHERE (au.userid = ) AND (a.award_id=au.award_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 ') AND (a.award_id=au.award_id)
ORDER BY au.issue_time' at
Error Number : 1064
Date : Tuesday, October 25th 2005 @ 09:05:56 AM
Script : http://www.dancehallareaz.com/forum/showpost.php?p=458
Referrer :
IP Address : 24.37.191.104
Username : MissKalunji
Classname : vb_database

mtha 10-31-2005 10:27 AM

Quote:

Originally Posted by MissKalunji
i get this error when i try to go here : http://www.dancehallareaz.com/forum/...8&postcount=15

it's because you are looking at a guest's post.

I dont have access to my code now, but you can try this:

Go to your AdminCP, edit the plugin YAAS - postbit_display_start

LOOK FOR
PHP Code:

        if ($vbulletin->options['aw_postbit']) 
        {
            if (
THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid']; 

REPLACE BY

PHP Code:

        if (THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid'];
         if ((
$vbulletin->options['aw_postbit']) AND ($this->post['userid']))
        { 


ps. i didnt test it, let me know if it works :)

MissKalunji 10-31-2005 01:35 PM

Quote:

Originally Posted by mtha
it's because you are looking at a guest's post.

I dont have access to my code now, but you can try this:

Go to your AdminCP, edit the plugin YAAS - postbit_display_start

LOOK FOR
PHP Code:

        if ($vbulletin->options['aw_postbit']) 
        {
            if (
THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid']; 

REPLACE BY

PHP Code:

        if (THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid'];
         if ((
$vbulletin->options['aw_postbit']) AND ($this->post['userid']))
        { 


ps. i didnt test it, let me know if it works :)

worked i didnt know it was a guest post

thanks!!

The Chief 10-31-2005 01:58 PM

looks like a great extension I'll try it out on my vb 3.5, lets see if it works!

RetroDreams 11-01-2005 02:18 PM

If I'm posting a thread to the forum, what do I edit to change the title of that? It currently just throws a generic title in there and I'd like it to basically say "User Nomination for $nominatedusername"??

Also, same goes for the poll? How do I edit what the question of the poll should be?

The Chief 11-02-2005 03:43 AM

looking good, I have installed, hope it all works out :D

*clicks install*

mtha 11-02-2005 12:36 PM

Quote:

Originally Posted by mtha
it's because you are looking at a guest's post.

Go to your AdminCP, edit the plugin YAAS - postbit_display_start

LOOK FOR
PHP Code:

        if ($vbulletin->options['aw_postbit']) 
        {
            if (
THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid']; 

REPLACE BY

PHP Code:

        if (THIS_SCRIPT == 'private'$this->post['userid'] =& $post['fromuserid'];
         if ((
$vbulletin->options['aw_postbit']) AND ($this->post['userid']))
        { 


ps. i didnt test it, let me know if it works :)

Version 2.0.5 has include this fix! please implement the change if you havent done so!

jluerken 11-02-2005 01:00 PM

How to update from 2.0.3 to 2.0.5 ?

mtha 11-02-2005 02:56 PM

Just re-import the product over the old one

Omranic 11-04-2005 12:29 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=100064" target="_blank">[plugin] Yet Another Awards System Template Grouping</a>

RetroDreams 11-06-2005 01:01 PM

Quote:

Originally Posted by RetroDreams
If I'm posting a thread to the forum, what do I edit to change the title of that? It currently just throws a generic title in there and I'd like it to basically say "User Nomination for $nominatedusername"??

Also, same goes for the poll? How do I edit what the question of the poll should be?

Bump?

mtha 11-06-2005 09:06 PM

Quote:

Originally Posted by RetroDreams
If I'm posting a thread to the forum, what do I edit to change the title of that? It currently just throws a generic title in there and I'd like it to basically say "User Nomination for $nominatedusername"??

Also, same goes for the poll? How do I edit what the question of the poll should be?

you can look over this one:
https://vborg.vbsupport.ru/showthrea...300#post813300

In the request award configuration, you can set

$formtitle = "User Nomination".

further customize, you can look over Dr Erwin Loh for FORM TO THREAD/ FORUM/ PM/ EMAIL hack, since I dont use the request form myself, and I cant customize further that way now.


there's also a new form hack for vb3.5.0, you can install that form hack, customize it, and chaneg the request form to link to the new form.

AshokForums.com 11-13-2005 11:53 PM

Tried installing this hack.. Everything worked perfectly.. Added few awards.. I awarded a award to a user.. And while viewing the thread i get this error..

If i disable the plugin.. There is no error.. Whats the problem any idea?

Please note that for testing purpose i have installed this hack on my local host.. :)

Fatal error: Using $this when not in object context in H:\localhost\xampp\xampp\htdocs\Vbulletin\showthre ad.php(923) : eval()'d code on line 2

AshokForums.com 11-14-2005 12:04 AM

Display in postbit
Do you want to show awards in member\'s postbit
Yes No

If i set this option to NO.. the error goes away.. Which means the award isnt displayed in the postbit area.. But i want it to be displayed.. Someone please help me...

What might be the problem?

Everything else is working just perfectly!

Thanks in advance

mtha 11-14-2005 02:38 AM

Quote:

Originally Posted by AshokForums.com
Tried installing this hack.. Everything worked perfectly.. Added few awards.. I awarded a award to a user.. And while viewing the thread i get this error..

If i disable the plugin.. There is no error.. Whats the problem any idea?

Please note that for testing purpose i have installed this hack on my local host.. :)

Fatal error: Using $this when not in object context in H:\localhost\xampp\xampp\htdocs\Vbulletin\showthre ad.php(923) : eval()'d code on line 2

well, dont remember why I added a $this->post['userid'] check in showthread hooks, so i just removed it.

anyway, you can download the new version, and import again.


All times are GMT. The time now is 08:54 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.01898 seconds
  • Memory Usage 1,932KB
  • 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
  • (22)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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