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)

2root4u 03-10-2003 10:00 PM

Beta Donation Hack
 
Here is a copy of my donation hack. It does not have a pretty install or admin control panel config.

It features:
- Unlimited/Customizable donation brackets and titles
- Donation titles in all posts below username
- Donation titles next to names in member list
- 'Top Donators' listing in member list

Here you go...try at your own risk :)

HyperSonic 03-11-2003 03:00 PM

Nice, very useful.

Does it work with PAYPAL or other solutions? Can you post some screenshots please?

2root4u 03-11-2003 03:21 PM

Quote:

Originally posted by HyperSonic
Nice, very useful.

Does it work with PAYPAL or other solutions? Can you post some screenshots please?

The donation updates are not automatic, so it will work with whatever donation mechanism you want. You must edit the person's profile and update their donation amount. Since all my donations are made with paypal, I just wait until I get the payment and update the user's profile.

Dean C 03-11-2003 03:28 PM

Sounds good 2root4u - thanks for releasing :)

- miSt

2root4u 03-11-2003 03:46 PM

Memberlist screen shot.

2root4u 03-11-2003 03:51 PM

Thread screenshot with donation title.

Note that the donation title is customizable. On these examples I am using the <span> tag to change the background to black. You could make the donation titles as simple text or <img> to icons or whatever you want.

FleaBag 03-11-2003 04:24 PM

Why have you concealed the name and URL of your site?

2root4u 03-11-2003 04:38 PM

Quote:

Originally posted by GamerForums
Why have you concealed the name and URL of your site?
Just to attract as little attention as possible to my site. It is only for members only so I have no reason to really advertise it. Its somewhat like people graying out the license plate when posting pics of their car. Everyone sees it on the road anyway, but people do it just in case.

And yes, the site is running on a licensed copy of VBulletin.

Vile 03-11-2003 08:38 PM

Cool, thanks for releasing this. I'll prob test it out :)

WildStorm 03-11-2003 09:25 PM

I"m curious about your website, I know the 'logo' in the corner... can you pm a link? I'm a member.

Thanks
Dave
MoM

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

Funkie 04-07-2003 08:05 PM

Worx a treat fella.
Managed to get it working just right:)
Used a few icons,looks nice now many thanx for the Mod,and your work

[high]* Funkie clicks install[/high]

Alien 04-18-2003 05:44 PM

How many queries does this hack add to postbit and member profile?

I know the "contributor hack" uses 1 in the postbit, is it the same here? I'd like to use this one because of the multi-levels and just wanted to check before install...

-Jason

Alien 04-27-2003 01:12 AM

Anyone? :)

Alien 04-30-2003 12:22 AM

Maybe on extended vacation? ;)

GaleForce 04-30-2003 12:50 AM

Yeah, there is a donation Hack already released... I have it running on my forums, as do some other forums, such as Yaxay. However, this donation hack seems to be a lot more feature rich :)

santeematt 05-05-2003 12:00 AM

worked perfect in 2.2.6

santeematt 05-05-2003 03:26 PM

i added something for the leeches, check it out

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++];
    }
    
// for the leechs from santeematt
else {
            
$post[donationtitle] = "<smallfont>worthless leech!</smallfont>";
    }
////End 2root4u Donation Hack 

that is in /admin/functions.php

cinq 05-05-2003 03:36 PM

Will this work on 2.2.9 ?

Lethal 05-05-2003 04:46 PM

Quote:

Today at 12:26 PM santeematt said this in Post #27
i added something for the leeches, check it out

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++];
    }
    
// for the leechs from santeematt
else {
            
$post[donationtitle] = "<smallfont>worthless leech!</smallfont>";
    }
////End 2root4u Donation Hack 

that is in /admin/functions.php


LOL good one

Dean C 05-05-2003 05:42 PM

Ok i may be missing something here but how exactly does this work? :)

All the best

- miSt

santeematt 05-05-2003 08:02 PM

Quote:

Today at 09:36 AM cinq said this in Post #28
Will this work on 2.2.9 ?
it works on 2.3.0 & 2.2.6.

i would assume that it would work on 2.2.9

AllMadden.net 05-30-2003 04:01 PM

can you put images instead of titles?

Funkie 05-30-2003 04:22 PM

(post #21)

Yes you can

santeematt 06-12-2003 02:51 PM

Quote:

05-30-03 at 10:01 AM AllMadden.net said this in Post #32
can you put images instead of titles?
yep, that is how i have mine set up.

jclay 06-15-2003 05:07 PM

Just a quick dumb question, but how do you add a profile field?


All times are GMT. The time now is 02:45 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.01350 seconds
  • Memory Usage 1,841KB
  • 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
  • (6)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete