vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Yet Another Awards System 2.1.4 (https://vborg.vbsupport.ru/showthread.php?t=142487)

Simetrical 07-20-2007 08:25 PM

Change line 427 of award.php from
Code:

WHERE username = '". $vbulletin->GPC['awardusername'] ."'
to
Code:

WHERE username = '". mysql_real_escape_string( $vbulletin->GPC['awardusername'] ) ."'
Repeat for line 556, and the bug should disappear. If you're paranoid, repeat for every other variable used in an SQL query in the file, although in principle it looks okay.

Is this extension maintained? Are the maintainers on vacation or something, perhaps?

The Librarian 07-20-2007 08:29 PM

Quote:

Originally Posted by Simetrical (Post 1296874)
Change line 427 of award.php from
Code:

WHERE username = '". $vbulletin->GPC['awardusername'] ."'
to
Code:

WHERE username = '". mysql_real_escape_string( $vbulletin->GPC['awardusername'] ) ."'
Repeat for line 556, and the bug should disappear. If you're paranoid, repeat for every other variable used in an SQL query in the file, although in principle it looks okay.

Is this extension maintained? Are the maintainers on vacation or something, perhaps?

Thank you so much! I'll give this a try.

...and I was wondering the same thing about the maintainers. I hope all is well and they'll return soon.

The Librarian 07-20-2007 08:45 PM

Quote:

Originally Posted by The Librarian (Post 1296877)
Thank you so much! I'll give this a try.

Well, that fixed the MA'AM problem - no more database error (Thanks again!) - BUT I'm still getting the mix up between 5peaches and MA'AM. Any ideas on that one?

Just so you understand, when I type in 5peaches and click SAVE it says "Give Award to MA'AM successfully" and then MA'AM shows on the award list. :confused:

Simetrical 07-20-2007 08:51 PM

As a workaround, you could try giving the award by user id instead of name.

The Librarian 07-20-2007 08:57 PM

Quote:

Originally Posted by Simetrical (Post 1296886)
As a workaround, you could try giving the award by user id instead of name.

ARGGGG !!! I am SUCH an idiot!!! I just realized that I'd been putting the "username" in both blanks, not understanding that the userid wasn't the name but the number! MA'AM is member #5 so that's why she was given the award. DUH!!

All I needed to do is leave the userid field blank and just put 5peaches in the username field.

Works perfectly now.

Thank you again, especially since I've wasted your time a bit. :o

katie hunter 07-22-2007 02:35 PM

Quote:

Originally Posted by katie hunter (Post 1290243)
Hi I have a small question in the award how can i edit this part ? Name / Description

I want to stretch it more a little or add more words to it other then Name / Description

http://forum.nihonomaru.com/awards.php

Thanks

Can someone help with this if they know :rolleyes:

mtha 07-23-2007 04:19 AM

Quote:

Originally Posted by The Librarian (Post 1296877)
Thank you so much! I'll give this a try.

...and I was wondering the same thing about the maintainers. I hope all is well and they'll return soon.



... due to some problems reported, and I haven't got time to fix it yet, I temporary put this release back to beta release. I might not have time to work on this for the next few weeks though. sorry for any inconvenient. any suggestions or fixes from other members would be greatly appreciated.

lostgirl815 07-24-2007 07:38 PM

Okay so... if this is showing up like it should be in the postbit, do I need to worry about the problems that were reported?

Simetrical 07-25-2007 01:11 AM

Probably not unless you have a large site, which could get slowed down until the issue I first reported here gets fixed. The other issue probably isn't a huge deal ― if you get weird errors when giving awards, try using user id's instead of usernames.

lostgirl815 07-25-2007 01:16 AM

Thanks very much for your reply, Simetrical! I don't have a large site, so I'll see how it goes. :)

The Ottoman 07-25-2007 08:01 PM

Quote:

Originally Posted by katie hunter (Post 1298270)
Can someone help with this if they know :rolleyes:

AdminCP\Styles&Templates\whatever the style is\YAAS Templates\awards_category shows you all the different phrases for the page.

It looks like you want to change the $vbphrase[award_name] and $vbphrase[award_description] phrases; so go to the Phrase manager and find it in the GLOBAL phrases; and change it there.

Repeat with awards_category.

The Ottoman 07-25-2007 08:09 PM

I was wondering if anyone had managed to configure this so that awards were automatically awarded after the request was submitted rather than require administrator approval.

lostgirl815 07-26-2007 03:28 AM

And, I was wondering if there's any way to put the send-PM thing on no by default?

military-space 07-26-2007 07:30 PM

is there a way to change the displayed awards in postbit and member info to show on more that one row?

Lets say I want to set my awards system to show 6 awards and have them display on 2 rows instead of stretching across on one row.

Would this be possible? Any suggestions on how to do this?

Apophis 07-26-2007 09:58 PM

I've been toying with this system for a while but what I really wanted to do was to get the awards to display via a bbcode tag.

I started by modifying the code a bit to get the awards to display below the signature area in the main body of a user's post but decided I wanted to give them more flexibility and give them some bbcode they could use to display their awards.

I added the following into class_bbcode.php

Code:

                // [RIBBONS]
                $tag_list['no_option']['ribbons'] = array(
                        'callback' => 'handle_bbcode_ribbons',
                        'strip_empty' => false,
                        'parse_option' => true
                );

Code:

        /**   
        * Handles a [RIBBONS] tag. TG Ribbons.
        *
        */
        function handle_bbcode_ribbons($ribbontext)
        {
                global $db, $vbulletin;
                $ribbontext = str_replace(array('<br>', '<br />', '\\"'), array('', '', '"'), $ribbontext);
                 
                $templaterib = 'tgribbons_display';
                eval('$html = "' . fetch_template($templaterib) . '";');
                return $html;
        }

Needles to say, it didn't do what I was hoping for. I created a new template called "tgribbons_display" using the code that I had placed in my postbit_legacy template and used the bbcode handler to display that template.

Well. Nothing shows up at all. I'm assuming that I'm missing some key step in pulling this off, such as making sure that the appropriate code is also executing to query the DB to display the awards when I call my template. Just to make sure I had the bbcode handler working I tried calling another template that just displays text and it worked fine.

Any ideas what I'm missing or what I could do to be able to use my custom bbcode tag to display the awards?

Apophis 07-27-2007 12:09 AM

Quote:

Originally Posted by military-space (Post 1302471)
is there a way to change the displayed awards in postbit and member info to show on more that one row?

Lets say I want to set my awards system to show 6 awards and have them display on 2 rows instead of stretching across on one row.

Would this be possible? Any suggestions on how to do this?

I actually modified the template code and create a table with a fixed width to display the awards in. They will automatically wrap to a new line if the number of awards exceed the width. IE: If your awards are 50 pixels wide and you want no more than 3 in a row, set the table size to a width of 160.

Here's a sample of how I display my ribbons (although it's in a considerably different place than the stock code).

Code:

<table width="425" border="0" cellspacing="0" cellpadding="0"><tr>
<td align="left"><div>$post[userawards]</div></td></tr></table>

You could replace the $post[userawards] line with something similar to what I have above and it should work for you with some minor tweaking.

lostgirl815 07-31-2007 06:59 AM

I would like to be able to have two rows of awards for two categories. I'd like to know if it would be possible to get such a thing as this via paid custom work. I wouldn't need most of the bells and whistles - don't need it to show on the members list, don't need the PM, the showcase, the description, and so on - I just need two rows and two categories and the ability for Mods to give a specific user an award in a category. (One category would be acquired game pieces and would change constantly. The other would be icons for completed games.)

If this is anything you would consider doing, I'd appreciate a PM and a ballpark figure. If we're not actually allowed to ask things like this in here... mea culpa. If it makes any difference, I wouldn't be asking for exclusivity and would not care who else used it for free.

djdonx 07-31-2007 11:15 AM

Hey, I currently have YAAS installed and I also have Psinoic Visions interactive profiles installed. The awards strectch my page because it is only in one half of the page, this only happens in internet explorer, not in fireworks. I was wondering if there is a way to make the awards flatten to say 4 per row and it works into columns like that.
Hopefully you understand my poor descriptive skills but if you don't then it is shown here: http://hffmforum.co.uk/member.php?u=222

djdonx 08-01-2007 09:21 AM

So could anyone possibly help me? Please :(

djdonx 08-01-2007 06:16 PM

BUMP. Its been over a day now :(

lostgirl815 08-01-2007 07:29 PM

Have you tried this suggestion from a few posts up?

Quote:

Originally Posted by Apophis (Post 1302683)
Here's a sample of how I display my ribbons (although it's in a considerably different place than the stock code).

Code:

<table width="425" border="0" cellspacing="0" cellpadding="0"><tr>
<td align="left"><div>$post[userawards]</div></td></tr></table>

You could replace the $post[userawards] line with something similar to what I have above and it should work for you with some minor tweaking.


djdonx 08-01-2007 09:04 PM

Should I change the original code, or add this underneath? :S

lostgirl815 08-01-2007 10:23 PM

When I tried it out, I added it underneath the original code and two sets of awards were displayed, so I'm guessing you can replace the original code with this. However, I am not a coder, and I'm just guessing - so keep that in mind.

djdonx 08-02-2007 06:57 AM

I've just realised that this code applies for the postbit template. I don't want a postbit edit, I need to change the profile view.
I just tried that code but it doesn't work ;)

lostgirl815 08-02-2007 07:58 AM

He did say he was working out some problems with it, which is why it's Beta again, but I don't recall that this was supposed to show on the profile anyway? Just the members' list and postbit?

djdonx 08-02-2007 08:27 AM

https://vborg.vbsupport.ru/external/2007/08/24.jpg

As you can see, it stretches

lostgirl815 08-02-2007 08:31 AM

Isn't the profile portion someone else's mod? But anyway, I'd think that a fixed table width would work for that too.

djdonx 08-02-2007 02:38 PM

Quote:

<!-- [START HACK='Yet Another Awards System hack' AUTHOR='HacNho'] -->
<if condition="$show['userawards']">
<fieldset class="fieldset">
<legend>$vbphrase[award_showcase]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td align="center">
$userawards
</td>
</tr>
</table>
</fieldset>
</if>
<!-- [END HACK='Yet Another Awards System hack' AUTHOR='HacNho'] -->
It says on the page /docs/award_install_template.html in the downloaded file to add that to the MEMBERINFO template

Adam21 08-02-2007 03:00 PM

Quote:

Originally Posted by djdonx (Post 1308115)
It says on the page /docs/award_install_template.html in the downloaded file to add that to the MEMBERINFO template

You can try posting that piece of MEMBERINFO template codes here to let us see if we could figure it out.

djdonx 08-02-2007 03:06 PM

PHP Code:

                    <if condition="$show['usernoteview']">
                        <
br />($vbphrase[last_note]: $usernote[lastpostdate] <span class="time">$usernote[lastposttime]</span>)
                    </if>
                </
div>
            </
div>
            </if>

<!-- [
START HACK='Yet Another Awards System hack' AUTHOR='HacNho'] -->
<if 
condition="$show['userawards']">
    <
fieldset class="fieldset">
    <
legend>$vbphrase[award_showcase]</legend>
    <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
        <
tr>
            <
td align="center">
                
$userawards
            
</td>
        </
tr>
    </
table>
    </
fieldset>
</if>
<!-- [
END HACK='Yet Another Awards System hack' AUTHOR='HacNho'] --> 


djdonx 08-02-2007 08:17 PM

I suppose I'm not really bothered how it will work as long as its displayed properly. Firefox automatically uses fixed width on the tables.
http://img340.imageshack.us/img340/4...firefoxyu8.png
Is it possible to do that as code?

Simetrical 08-02-2007 11:11 PM

You can put zero-width spaces (& #8203; but without the space) between each image to explicitly require them to be valid break points, if they aren't considered that already.

djdonx 08-03-2007 10:13 AM

How would I do that ;S

djdonx 08-04-2007 10:13 AM

So, can anyone possibly help then?

teamsupra 08-04-2007 06:06 PM

WIll this work with Usergroups? I want to give an award to a usergroup and everyone in the group will receive the award. Is this a built in option?

jluerken 08-04-2007 06:20 PM

Quote:

Originally Posted by teamsupra (Post 1309795)
WIll this work with Usergroups? I want to give an award to a usergroup and everyone in the group will receive the award. Is this a built in option?

No its not working this way

djdonx 08-05-2007 09:25 AM

Any help with my MEMBERINFO template then? :(

Apophis 08-06-2007 01:57 PM

I hate to do this, but I was curious if the author had any input on this dilemma or if anyone else knew of any plugins or modifications to the bbcode system that would allow me to complete this task.

Quote:

Originally Posted by Apophis (Post 1302597)
I've been toying with this system for a while but what I really wanted to do was to get the awards to display via a bbcode tag.

I started by modifying the code a bit to get the awards to display below the signature area in the main body of a user's post but decided I wanted to give them more flexibility and give them some bbcode they could use to display their awards.

I added the following into class_bbcode.php

Code:

                // [RIBBONS]
                $tag_list['no_option']['ribbons'] = array(
                        'callback' => 'handle_bbcode_ribbons',
                        'strip_empty' => false,
                        'parse_option' => true
                );

Code:

        /**   
        * Handles a [RIBBONS] tag. TG Ribbons.
        *
        */
        function handle_bbcode_ribbons($ribbontext)
        {
                global $db, $vbulletin;
                $ribbontext = str_replace(array('<br>', '<br />', '\\"'), array('', '', '"'), $ribbontext);
                 
                $templaterib = 'tgribbons_display';
                eval('$html = "' . fetch_template($templaterib) . '";');
                return $html;
        }

Needles to say, it didn't do what I was hoping for. I created a new template called "tgribbons_display" using the code that I had placed in my postbit_legacy template and used the bbcode handler to display that template.

Well. Nothing shows up at all. I'm assuming that I'm missing some key step in pulling this off, such as making sure that the appropriate code is also executing to query the DB to display the awards when I call my template. Just to make sure I had the bbcode handler working I tried calling another template that just displays text and it worked fine.

Any ideas what I'm missing or what I could do to be able to use my custom bbcode tag to display the awards?


teamsupra 08-06-2007 02:21 PM

Is there anyway to mod it to do usergroups?

es-league.com 08-21-2007 07:53 AM

I have a small issue with this mod now :

although it displays all awards clearly in the user cp
of each member who have awards, only some
have their medals showing in the posts ?

It appears to select random members to show
medals in posts rather than all members with awards.

any ideas ? rest of the mod seems to be
working fine and the members love it :)


All times are GMT. The time now is 11:49 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.01764 seconds
  • Memory Usage 1,864KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_php_printable
  • (12)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