vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Beta Donation Hack (https://vborg.vbsupport.ru/showthread.php?t=49956)

chad777 03-12-2003 11:43 PM

I think something like this has already been done...its called the controbutor hack.

When I seen the donation hack I was like great! I kind want something that will allow members to donate and use paypal IPN to send back that they donated and how much they donated then list a top donators list and how much they donated.

Also when donating they would have the option of not being added to the top donator list ..

2root4u 03-13-2003 12:12 AM

Quote:

Originally posted by chad777
I think something like this has already been done...its called the controbutor hack.

When I seen the donation hack I was like great! I kind want something that will allow members to donate and use paypal IPN to send back that they donated and how much they donated then list a top donators list and how much they donated.

Also when donating they would have the option of not being added to the top donator list ..

Wish I had seen that earlier...however in the end, my hack better suits my needs because it allows for different titles based upon the amount donated. Thanks for the info!

Koopa 03-15-2003 05:51 PM

Nice hack, I will probably use this :)

petey20 03-21-2003 04:45 PM

Just what I needed.

I only had one issue with your install in admin/functions.php. I"m running v.2.3.0 and where you have to insert the code before

$post[postdate]=vbdate($dateformat,$post[dateline]);
$post[posttime]=vbdate($timeformat,$post[dateline]);

I had to actually place it right before the line

$datecut = time() - $cookietimeout;

to get everything to compile and work correctly. It must have something to do with declaring the globals in the body of function getpostbit. My version didn't like it where you suggest to put it!

Otherwise, thanks a bunch!
Petey

Lethal 04-05-2003 09:55 AM

I get this error when i try to few the memberlist:

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT *,5+0 as 5
FROM user,userfield
WHERE 1=1 AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
ORDER BY username ASC
LIMIT 0,30
mysql error: You have an error in your SQL syntax near '5
FROM user,userfield
WHERE ' at line 1

mysql error number: 1064


And in the postbit no matter what amount of donation I put in, it always shows up as *Diamond Donator*


Something is wrong with this part of the code:

PHP Code:

$users=$DB_site->query("SELECT *,$donationfield+0 as $donationfield
                          FROM user,userfield
                          WHERE 
$condition AND
                                user.userid = userfield.userid
                                "
.iif($memberAllGood" AND usergroupid NOT IN (1,3,4) """)."
                          ORDER BY 
$orderby $direction
                          LIMIT "
.($limitlower-1).",$perpage"); 


I moved stuff around but couldn't get it to work.

I am running 2.3.0

Little help plz

2root4u 04-05-2003 10:59 AM

Quote:

Today at 11:55 AM Lethal said this in Post #15
I get this error when i try to few the memberlist:

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT *,5+0 as 5
FROM user,userfield
WHERE 1=1 AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
ORDER BY username ASC
LIMIT 0,30
mysql error: You have an error in your SQL syntax near '5
FROM user,userfield
WHERE ' at line 1

mysql error number: 1064


And in the postbit no matter what amount of donation I put in, it always shows up as *Diamond Donator*


Something is wrong with this part of the code:

PHP Code:

$users=$DB_site->query("SELECT *,$donationfield+0 as $donationfield
                          FROM user,userfield
                          WHERE 
$condition AND
                                user.userid = userfield.userid
                                "
.iif($memberAllGood" AND usergroupid NOT IN (1,3,4) """)."
                          ORDER BY 
$orderby $direction
                          LIMIT "
.($limitlower-1).",$perpage"); 


I moved stuff around but couldn't get it to work.

I am running 2.3.0

Little help plz

In $donationfield, specify it as "field5" and not just "5". That should fix it.

Lethal 04-05-2003 11:28 AM

Ok that fixed the error, but now it shows up in the postbit but not the memberslist. I double checked the changes in memberslist.php and the templates and everything is ok but it won't show up. The top donators link is there but the label isn't.

??

2root4u 04-05-2003 12:18 PM

Quote:

Today at 01:28 PM Lethal said this in Post #17
Ok that fixed the error, but now it shows up in the postbit but not the memberslist. I double checked the changes in memberslist.php and the templates and everything is ok but it won't show up. The top donators link is there but the label isn't.

??

The only thing I can think of is either:
- You don't have '$post[donationtitle]' in your postbit
OR
- You don't have the correct code in functions.php
OR
- You are using a different version of vb

Lethal 04-06-2003 07:32 AM

ok well I will go over the changes again 1 by 1 to make sure everything is right. I am using vb 2.3.0

Lethal 04-06-2003 09:40 AM

I found the problem, in admin/functions.php I had:

PHP Code:

//2root4u Donation Hack
    
global $donationbrackets$donationtitles$donationfield;
    
$donation $post[$donationfield];
    if(
is_numeric($donation) && $donation>$donationbrackets[0]) {
        
$post[donationtitle] = $donationtitles[0];
        
$i 1;
        while(isset(
$donationbrackets[$i]) && ($donation $donationbrackets[$i]))
            
$post[donationtitle] = $donationtitles[$i++];
    }
////End 2root4u Donation Hack 

after:

PHP Code:

$post[postdate]=vbdate($dateformat,$post[dateline]);
$post[posttime]=vbdate($timeformat,$post[dateline]); 

Instead of before it, that fixed it. Nice hack again ty


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