vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [HTL] & [TXT] Awards/Medals/Cards Hack [vB3] (https://vborg.vbsupport.ru/showthread.php?t=61108)

Sadie Frost 02-14-2004 07:37 AM

I installed this with no problem on RC3, but installing on RC4 I get no awards showing anywhere and can't figure out why. I doublechecked all the code additions and I don't think I missed any.

Edit: for some reason the award template wasn't added - that fixed it :)

blubber12 02-14-2004 02:13 PM

Thanks that was the fix. Installed and working on rc2. Thanks again.

Sadie Frost 02-14-2004 06:45 PM

When I try to read and announcement, I get this error at the top of the page:

Quote:

Warning: Invalid argument supplied for foreach() in /path/to/forums/includes/functions_showthread.php on line 792
which is "foreach($awards AS $useraward)"

Any ideas?

agbates 02-15-2004 02:51 PM

I think AnimeWebby is doing a great job..and thanks go to Lesane for his original idea. I am also going to wait until Gold before I install this, but one thing is for sure..I am going to install it! It's a great idea that really should have been included into VB.

maurier 02-15-2004 06:55 PM

I have run SQL-query using phpmyadmin getting error: my site vbRc4 help me please !

Quote:

CREATE TABLE " . TABLE_PREFIX . "award (
awardid smallint(5) unsigned NOT NULL auto_increment,
name varchar(50) NOT NULL default '',
description varchar(250) NOT NULL default '',
icon_url varchar(250) NOT NULL default '',
PRIMARY KEY (awardid)
) TYPE=MyISAM;
MySQL said:


You have an error in your SQL syntax near '" . TABLE_PREFIX . "award (
awardid smallint(5) unsigned NOT NULL auto_incre' at line 1



Quote:

CREATE TABLE " . TABLE_PREFIX . "useraward (
userid int(10) NOT NULL auto_increment,
PRIMARY KEY (userid)
) TYPE=MyISAM;
MySQL said:


You have an error in your SQL syntax near '" . TABLE_PREFIX . "useraward (
userid int(10) NOT NULL auto_increment,
' at line 1

InfiniteWebby 02-16-2004 12:26 AM

@sadie: it looks like you may have missed out a step. you have to add
PHP Code:

global $awards

after
PHP Code:

global $vboptions$stylevar$vbphrase$DB_site$datastore$_USEROPTIONS$style$show$usergroupcache

in your /includes/functions_showthread.php file

@maruier: you are meant to replace " . TABLE_PREFIX . "with your table prefix before you run those queries.

kcradio 02-16-2004 04:20 AM

I am still getting this error:

SQL-query :

CREATE TABLE " . TABLE_PREFIX . "award(

awardid smallint( 5 ) unsigned NOT NULL AUTO_INCREMENT ,
name varchar( 50 ) NOT NULL default '',
description varchar( 250 ) NOT NULL default '',
icon_url varchar( 250 ) NOT NULL default '',
PRIMARY KEY ( awardid )
) TYPE = MYISAM

MySQL said:

#1064 - 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 '" . TABLE_PREFIX . "award( awardid smallint( 5 ) unsigned NOT

Can anyone tell me what I am doing wrong on this?

kcradio 02-16-2004 04:22 AM

nevermind, if I look up a thread I can see the answer, sorry...

InfiniteWebby 02-16-2004 05:16 AM

if you are getting an error when you are trying to view announcements then.....

in /includes/functions_showthread.php
instead of finding
PHP Code:

    $show['messageicon'] = iif($post['iconpath'], truefalse); 

find:
PHP Code:

            $show['reputationlink'] = iif($vboptions['reputationenable'] AND $bbuserinfo['userid'] AND $post['userid'] AND !($usergroupcache["$post[usergroupid]"]['genericoptions'] & ISBANNEDGROUP), truefalse); 

then add above it:
PHP Code:

            // AWARDS IN POSTBIT
            
foreach($awards AS $useraward)
            {
                
$userawardid "award$useraward[awardid]";
                if (!empty(
$post[$userawardid]))
                {
                    
$userawardid_desc $userawardid."_desc";
                    if (
$post[$userawardid_desc] != '')
                    {
                        
$useraward[description] = $post[$userawardid_desc];
                    }
                    eval(
'$awardsbit .= "' fetch_template('award') . '";');
                }
            }
            
// END AWARDS IN POSTBIT 

I will update all the files soon with all the current bug fixes plus instructions for versions less than RC 4. Sorry for the inconvinience

Sadie Frost 02-16-2004 07:42 AM

Works perfectly now - thanks! :D

The Quibbler 02-16-2004 05:13 PM

I get an error when trying to install the hack using the Hack Tracking Log at /admincp/index.php?loc=install_htl.php?inside=1:

Parse error: parse error in /home/quibbler/public_html/forums/includes/functions.php on line 1805

Fatal error: Call to undefined function: exec_nocache_headers() in /home/quibbler/public_html/forums/admincp/global.php on line 37


Looked at the code, but couldn't figure anything out. Any idea what's wrong? I think it has something to do with the file edits I did for this hack.

The Watcher 02-16-2004 08:25 PM

I have installed this successfully on RC3 and I have to say - GREAT HACK !!!

I followed the txt instructions and there were some differences in the codes quoted and what are in my phps but that was only a minnor problem. Also I spotted one very small error. In awards.php line 179 should be:

PHP Code:

<td class=\"$bgclass\" align=\"center\"><img src=\"../$award[icon_url]\" border=\"0\"></td> 

Instead of ...

PHP Code:

<td class=\"$bgclass\" align=\"center\"><img src=\"$award[icon_url]\" border=\"0\"></td> 

(You missed out the ../ and as a result the images don't preview in the admin cp)

2 questions ...

1) How do I split the awards up. Currently they are directly next to each other with no spaces.
3) Any chance of some more medals/awards/trophy images being posted?

Thanks Again Great Work

neocorteqz 02-17-2004 02:05 AM

Quote:

Originally Posted by The Watcher
I have installed this successfully on RC3 and I have to say - GREAT HACK !!!

I followed the txt instructions and there were some differences in the codes quoted and what are in my phps but that was only a minnor problem. Also I spotted one very small error. In awards.php line 179 should be:

PHP Code:

<td class=\"$bgclass\" align=\"center\"><img src=\"../$award[icon_url]\" border=\"0\"></td> 

Instead of ...

PHP Code:

<td class=\"$bgclass\" align=\"center\"><img src=\"$award[icon_url]\" border=\"0\"></td> 

(You missed out the ../ and as a result the images don't preview in the admin cp)

2 questions ...

1) How do I split the awards up. Currently they are directly next to each other with no spaces.
3) Any chance of some more medals/awards/trophy images being posted?

Thanks Again Great Work

Add a <br> tag before, or after $post[arcadeawards] depending on how you would like it to look.

In postbit or postbit_legacy depending on which you use.

InfiniteWebby 02-17-2004 04:37 AM

@ the quibbler: Line 1805 or any lines surrounding that in /includes/functions.php has nothing to do with this hack unless you put something in the wrong place.

@the watcher: I am aware of the changes in code. I am trying to setup my own board and am not worried about some minor indescretions in the find and replace parts.

Also that isn't so much a mistake if you use full url's to your awards images which I thought people woulc use. But I will take this into account and build some added functionality.

1) shove a couple of &nbsp; at the end of the awards template or you can add some <br />'s depending on how you want them split up.
3) I think you meant 2) but oh well :P Not at the moment I am too busy, and not too graphical.

The Watcher 02-17-2004 12:53 PM

thanks :)

Ill find my own images and post them here haha

With reference to the spacing, this is what i was trying to acheive - sorry if I did not explain clearly ...

Ideally i would like my 5 medals on one line with 2 spaces inbetween and then my 3 trophies on the line below with perhaps 3 spaces in between.

couldn't work out how to do that though

thanks again

mtha 02-17-2004 08:48 PM

ERROR!!!

Quote:

Warning: Invalid argument supplied for foreach() in /XXXXXXXXXXXXXXX/forums/public_html/includes/functions_showthread.php on line 693
when you run forums/showpost.php?p=xxxxx


You may want to add $awards array into showpost.php too, like you did in showthread.php

InfiniteWebby 02-19-2004 05:30 AM

I will be moving it to the top of showthre_functions.php in the next version please bare with me.

trackpads 02-19-2004 11:56 AM

Quote:

Originally Posted by AnimeWebby
I will be moving it to the top of showthre_functions.php in the next version please bare with me.

Thanks again for all the work!

M.C. 02-19-2004 10:59 PM

i`ve got small bug! In Private Messages Page i got that:

Quote:

Warning: Invalid argument supplied for foreach() in z:\home\localhost\www\forum\includes\functions_sho wthread.php on line 691
on that line is hack code:

PHP Code:

    foreach($awards AS $useraward)
    {
        
$userawardid "award$useraward[awardid]";
        if (!empty(
$post[$userawardid]))
        {
            
$userawardid_desc $userawardid."_desc";
            if (
$post[$userawardid_desc] != '')
            {
                
$useraward[description] = $post[$userawardid_desc];
            }
            eval(
'$awardsbit .= "' fetch_template('award') . '";');
        }
    } 


Face Off Mobile 02-24-2004 09:21 PM

cant run both sql queries in the txt file can someone please tell me what they should be

thank you

mtha 02-25-2004 06:49 AM

Quote:

Originally Posted by M.C.
i`ve got small bug! In Private Messages Page i got that:
Warning: Invalid argument supplied for foreach() in z:\home\localhost\www\forum\includes\functions_sho wthread.php on line 691

Anypage that has user postbit displayed /showthread used will have the same problem

PM, view thread, viewpost ...

maybe this hack should be moved to Beta mods, as of it's not completed


Quote:

cant run both sql queries in the txt file can someone please tell me what they should be

thank you
:) dont think anyone can tell you if you dont tell us what the error is, and some details. otherwise, I just say, they should be as it is in the txt file.

InfiniteWebby 02-27-2004 11:03 PM

OK just upldated the attachements to version 2 where the errors regarding the showpost and announcements are fixed and also the extra page for users who have awards has been added.

I was hoping to get the request award option finished but I think this is an important update.

SpankMe 02-28-2004 01:21 AM

Nice hack. What I would like to see is the ability to give Mods and/or Super Mods the option to give out awards.

SpankMe 02-28-2004 03:38 AM

Never mind. I've done it myself.

SpankMe 02-28-2004 10:52 AM

Something else I've added you might want to think about, is who gave the award.

mtha 02-28-2004 06:49 PM

Quote:

Originally Posted by AnimeWebby
OK just upldated the attachements to version 2 where the errors regarding the showpost and announcements are fixed and also the extra page for users who have awards has been added.

how should I upgrade from version 1?

maytrix 03-01-2004 05:31 PM

Just a note, your awards hack and the vbarcade hack are not compatible. You use a global of $awards which is also used by that hack. If you change your global to $awards2 you can get both to live in harmony.

Flow Fusion 03-02-2004 01:21 AM

Can someone clean up the text file for this hack? When I try to view it on my Mac it looks like a mess?

Roxie 03-05-2004 01:19 AM

So, is this hack beta?

InfiniteWebby 03-05-2004 07:01 PM

@mtha: the only option is to undo all the changes made in v1 and then redo all the changes in v2

@maytrix: I realise that and I think to keep adequate varibale names you should change alll occurances of $award or $awards used in the arcade hack to $arcadeawards but whatever tickles your fancy so to speak.

@flow fusion: i cant help you out in anyway except to advise you to use HTL instead of relying on text files, macs aren't my speciality.

@roxie: I don't conisder it beta as it works perfectly at the moment. However some might consider it still in beta stages because of the large amounts of bugs found last time and that it might be the same case this time.

mtha 03-06-2004 03:21 AM

Quote:

Originally Posted by AnimeWebby
Awards/ Medals/ Cards Hack [vB3]
By: AnimeWebby
Idea by: Lesane

New in v2
- Extra page showing all awards available as well as all the users who have earned an award.
- Support for full urls and relative ones for award icons.
- Support for awards on showpost and announcement

Installation:
Just upload award.php to your admincp, awards.php to your root directory and follow the instructions in the text file.

it seems that the HTL and TXT instructions are different.

1: There's NO award.php in HTL zip file, there's only 1 file in /admincp/award.php
2: Cant find:

PHP Code:

require_once('./includes/functions_bbcodeparse.php');
global 
$vboptions$stylevar$vbphrase$DB_site$datastore$_USEROPTIONS$style$show

for step 9 in /includes/functions_showthread.php


Cant find this step on HTL instruction (it's only in TXT one)
Quote:

==>Find:
// do posts from ignored users
if ($tachyuser AND THIS_SCRIPT != 'showpost' AND THIS_SCRIPT != 'private')
{
$maintemplatename = 'postbit_ignore_global';
}
else if ($ignore["$post[userid]"]/* AND !in_array($post['userid'], explode(' ', $bbuserinfo['buddylist']))*/)
{
$maintemplatename = 'postbit_ignore';
$show['showpostlink'] = ($alternate != 'usernote');
}

==>Replace With:
// AWARDS IN POSTBIT
foreach($awards 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[\'awards\'] .= "' . fetch_template('awards_bit') . '";');
}
}
// END AWARDS IN POSTBIT
-------------------------------
and others ... after that

Cyricx 03-06-2004 07:11 AM

I will suggest that you go through the code fully again.

Make sure the templates names are correct.

I had to spend about a hour debugging the code and finally was able to fix it. It was searching for a template that doesn't exist.

I had to compare the file edits between both HTL / Text File. From my observation, one of those are outdated.

But it's working on my site now.

Cyricx

maytrix 03-06-2004 02:47 PM

I too had to go through the code twice. I also had to make it work better with some previous installed hacks. It is is a good working hack, but it is a medium to high installation skill level.

InfiniteWebby 03-06-2004 10:03 PM

@Cyricx: What template is that?

And I uploaded the wrong file so I will fix it as soon as I finish this post, sorry to all but trying to keep up with what you've done and haven't done gets quite confusing.

Flow Fusion 03-10-2004 05:10 AM

Quote:

Originally Posted by AnimeWebby
@Cyricx: What template is that?

And I uploaded the wrong file so I will fix it as soon as I finish this post, sorry to all but trying to keep up with what you've done and haven't done gets quite confusing.

Ok I installed this onto my forum and I get this error message when I try to view any of the threads.


Unable to add cookies, header already sent.
File: /hsphere/local/home/mojoblac/flowfusion.biz/forum/includes/functions_showthread.php
Line: 679


Any suggestions? Cause I been at it all night/Morning

Flow Fusion 03-10-2004 05:26 AM

Quote:

Originally Posted by Flow Fusion
Ok I installed this onto my forum and I get this error message when I try to view any of the threads.


Unable to add cookies, header already sent.
File: /hsphere/local/home/mojoblac/flowfusion.biz/forum/includes/functions_showthread.php
Line: 679


Any suggestions? Cause I been at it all night/Morning

Oh yeah once this is fixed. Where do I go to add an award? Or give someone an award?

maytrix 03-10-2004 11:30 AM

Quote:

Originally Posted by Flow Fusion
Ok I installed this onto my forum and I get this error message when I try to view any of the threads.


Unable to add cookies, header already sent.
File: /hsphere/local/home/mojoblac/flowfusion.biz/forum/includes/functions_showthread.php
Line: 679


Any suggestions? Cause I been at it all night/Morning

What is on lines around 679 in your functions_showthread.php?

Flow Fusion 03-10-2004 02:25 PM

Quote:

Originally Posted by maytrix
What is on lines around 679 in your functions_showthread.php?

if (!empty($post["$userawardid"]))

{

$userawardid_desc = $userawardid."_desc";
if ($post[$userawardid_desc] != '')

{

This is from 674 to 681 and I tried to remove the spaces

maytrix 03-10-2004 03:49 PM

Did you fix user info like it says in the last step?

Flow Fusion 03-10-2004 03:57 PM

Quote:

Originally Posted by maytrix
Did you fix user info like it says in the last step?

What do you mean? I did everything it says in the Hack


All times are GMT. The time now is 04:19 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.01577 seconds
  • Memory Usage 1,875KB
  • 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
  • (11)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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