View Full Version : Mark User As Contributor V 2.0 Multi Tier
GeorgeofCS
12-22-2001, 10:00 PM
This is a modification of MarkB's Mark User As Contributor hack. It allows for 4 different tiers of Contributors based on what you set for donation limits for each tier.
It also allows the user to have the option of being listed as a "contributor" and not be listed in the various levels. Some of my users are happy to show that they support the site, but know their wife/husband won't be happy if they saw they were a platinum donator and such :p
Updated 1/13 To fix bugs in install file once again
GeorgeofCS
12-23-2001, 12:29 PM
Sorry Already found a bug in the dang thing :(
The attachment has been fixed. If you've already downloaded it all you gotta do is change:
member.php
if ($userinfo[showdonation]!="1") {
to
if ($userinfo[showdonation]!="1" and $userinfo[donator]) {
and the admin/functions.php
if ($post[showdonation]!="" and $post[showdonation]!="1") {
to
if ($post[showdonation]!="" and $post[showdonation]!="1" and $post[donator]) {
TheComputerGuy
12-23-2001, 01:32 PM
Looks like pretty work, Great improvment
bokhalifa
12-23-2001, 02:09 PM
good work
vertex
12-23-2001, 02:34 PM
nice we are using V1 of it right now, a demo of V2?
JohnBradshaw
12-25-2001, 04:34 PM
Hi,
Looks like a great hack but I am having a problem installing I am getting this error:
Database error in vBulletin Control Panel 2.2.1:
Invalid SQL: ALTER TABLE `user` ADD `donator` `donator` SMALLINT UNSIGNED NOT NULL
mysql error: You have an error in your SQL syntax near 'donator` SMALLINT UNSIGNED NOT NULL' at line 1
mysql error number: 1064
Date: Tuesday 25th of December 2001 03:46:15 PM
Script: http://www.mydomain.org/forums/forums/admin/contribute.php
Referer: http://www.mydomain.org/forums/admin/contribute.php
I am running: mysqladmin Ver 8.21 Distrib 3.23.43 if thats any help
Any ideas as I really want this hack!
Managed To Fix This By Removing The Second `Donation` Bit In The Code (Hope This Helps Someone)
Cheers and Merry Christmas,
masood
12-25-2001, 05:27 PM
Yep, right. there is additional 'donator' in the script :p which should be removed.
JohnBradshaw
12-25-2001, 05:30 PM
Hi, different problem this time!
In the installation guide it says to find this in admin/functions.php:
## FIND:
if ($bbuserinfo[adminemail]) {
$allowmailchecked="checked";
$allowmailnotchecked="";
} else {
$allowmailchecked="";
$allowmailnotchecked="checked";
}
## FIND:
$nosessionhash=iif($nosessionhash=="yes",1,0);
But I have checked my copy of vBulletin 2.2.1 and these are not present any clues? Also is it possible to change the level names, eg Bronze etc, to different ones?
Cheers,
masood
12-25-2001, 05:33 PM
Another problem: Where do we define the variables
$platinum,$gold,$silver,$bronze
all users get marked as platinum :(
And please be aware that you might have installed some other hack, so just by replacing a whole sql query (like user update/insert), you might get into trouble.
So only add the 'donator' and 'donation' appropriately in queries.
masood
12-25-2001, 05:35 PM
[QUOTE]Originally posted by JohnBradshaw
Hi, different problem this time!
In the installation guide it says to find this in admin/functions.php:
## FIND:
if ($bbuserinfo[adminemail]) {
$allowmailchecked="checked";
$allowmailnotchecked="";
} else {
$allowmailchecked="";
$allowmailnotchecked="checked";
}
## FIND:
$nosessionhash=iif($nosessionhash=="yes",1,0);
But I have checked my copy of vBulletin 2.2.1 and these are not present any clues? Also is it possible to change the level names, eg Bronze etc, to different ones?
Cheers,
JohnBradshaw
12-25-2001, 05:44 PM
Aha!! Cheers
GeorgeofCS
12-25-2001, 09:44 PM
Ok fixed the bug in the install file. Sorry about that it's my first time making a install file :(
As far as masood's question you define the variables in the main options of VB.
LangTuDaTinh
01-03-2002, 05:45 PM
What did i do wrong?
i put the code $post[donation] into postbit then the word "- Platinum Contributor" appear to all users.
masood
01-03-2002, 07:38 PM
[QUOTE]Originally posted by LangTuDaTinh
What did i do wrong?
i put the code $post[donation] into postbit then the word "- Platinum Contributor" appear to all users.
GeorgeofCS
01-03-2002, 09:01 PM
Actually the different level settings are in the main vb options where you can set what levels equal what amount of money.
I've been trying to rework this hack into something bigger. I'm currently testing donator perks, a way of users to earn site supporter status by visiting sponsors, and possibly a way of making a query list of contributors after they've made their donations. So far only a few bugs. If anyone has installed this is interested in the other end of the hack for testing please PM me and let me know.
LangTuDaTinh
01-03-2002, 10:36 PM
[QUOTE]Originally posted by masood
you need to define the variables $platinum, $gold, $silver and $bronze. otherwise they are all equal to zero, so everyone becomes platinum member by contributing nothing :p
I have defined mine in functions.php at the top...
masood
01-03-2002, 10:42 PM
[QUOTE]Originally posted by LangTuDaTinh
this may be stupid but how do i define it?, i insert a code into function.php as in the instruction ..is here any other code?
thanks
GeorgeofCS
01-03-2002, 10:46 PM
The $gold $sliver, etc. should be found at the bottom of your vb control panel options in the admin section. You shouldn't have to add anything into the function file
masood
01-03-2002, 11:45 PM
[QUOTE]Originally posted by GeorgeofCS
The $gold $sliver, etc. should be found at the bottom of your vb control panel options in the admin section. You shouldn't have to add anything into the function file
LangTuDaTinh
01-04-2002, 01:20 AM
OK i check cp but i just saw the word "donation" but there is no option under it....so pls tell me what is wrong?
thanks
masood
01-04-2002, 01:28 AM
[QUOTE]Originally posted by LangTuDaTinh
OK i check cp but i just saw the word "donation" but there is no option under it....so pls tell me what is wrong?
thanks
hypedave
01-05-2002, 02:03 AM
does any one know how to add an image to this hack, so that contrinuting member will stand out. here is an example
masood
01-05-2002, 02:18 AM
hypedave,
Just edit the templates through control panel. Search for 'Silver' etc. in templates and you'll be able to find the relevant templates.
hypedave
01-05-2002, 02:29 AM
ok can I ask this question again, because I am a total newbie :confused: can some one, point me to the right direction :confused: :stupid: :confused: :stupid:
masood
01-05-2002, 02:58 AM
Go to the admin control panel.
On the left navigation click on Modify under Tamplates.
Expand the list of templates.
Expand 'User Info Display Templates'
There are five templates for you to play with: getinfo_bdonation, getinfo_donation, getinfo_gdonation, getinfo_pdonation, getinfo_sdonation
Edit anyone and see the result :)
hypedave
01-05-2002, 03:09 AM
okay sorry for being a pain in the butt, hehe, what how would I tell it the path ti the image, when I say I am a php editing newbie, I really mean, yeah i know, some people you just dont give a baord to and im one of them, lol,
say I have an image in my image folder titled
tropghy.gif how would I give the path to that image ??
hypedave
01-05-2002, 03:21 AM
hey guys I figured it out, had to go grab me a beer , lol
compgeek83
01-13-2002, 06:29 PM
[QUOTE]Originally posted by masood
Looks like you have similar problem :)
This involves two MySQL tables, 'settinggroup' and 'setting'. If you browse the 'settinggroup' table (through phpMyAdmin etc.) look for the 'settinggroupid' value corresponding to the "Donator" - should be the last row in this table if you have not installed another hack involving change of this table...
Now this 'settinggroupid' value must match with the 'settinggroupid' in 'setting' table (where corresponding options are defined). If you browse 'setting' table, you can look for Silver, Bronze and Gold rows at the end.
In my case these values did not match, so I could not see the options under Donator in control panel options. I just edited those rows in 'setting' table and bingo! :)
compgeek83
01-13-2002, 06:39 PM
[QUOTE]Originally posted by masood
By default (in contribute.php installation) only three levels are defined in SQL queries, Platinum is not defined so non-contributors get Platinum label ;)
GeorgeofCS
01-13-2002, 06:50 PM
Ok the installer file has been updated. Sorry about the delays. I've been having tons of problems lately. My server got hacked, father had a heart attack, etc. The updated file should work fine now. **crossing his fingers**
compgeek83
01-13-2002, 07:13 PM
ok, i give up
mabye this hack should be moved to the beta forum until it actually works...
sevenOne8
01-15-2002, 01:52 PM
So I'm a little confused... Does this hack work or no? I'm running the latest vbulletin and would really find this hack usefull but I can't put a hack that might have problems.
Robert Basil
01-16-2002, 01:38 AM
I've decided to stick with the hack below until the bugs get worked out of this one.
https://vborg.vbsupport.ru/showthread.php?s=&threadid=33195
ckevin
01-23-2002, 11:48 AM
after a couple of fixes, it can work at my forum (vb 2.2.0) :)
SaintDog
01-24-2002, 01:40 AM
This is not working for me, the install file just returns the same errors as mentioned above. I have not installed the other contibuting hack, so this was done on a fresh install.
Could someone please help? I would like to get this installed as it is a nice hack from what I have seen from the previous one.
Any help is appreciated....
Thanks,
ckevin
01-24-2002, 01:55 AM
yes, first u need to fix the install.php file, check if it creates the relevant fields, if done but with errors, that's ok. Just delete the lines according to adding fields/values at the MySQL, then run it again, then it would create the templates, then u are alright :)
SaintDog
01-24-2002, 02:40 AM
Well it is installed but I am not seeing any options under the donations header in the Admin CP > Options > Donator
How do I fix this, I read something a few posts back but I am not a PHP person so I dunno what to do, if someone could guide me and tell me what to do, it would be appreciated,
Thanks
ckevin
01-24-2002, 03:04 AM
there won't have an option "Donator" in admin panel, u have to find the user, then u see a Contribute Points field, enter the values there!
SaintDog
01-24-2002, 10:41 AM
Ok so I will take it that should I need to raise the donation amount per level, I will have to make the changes via phpMyAdmin?
If so that will be fine, I thought that you were supposed to be able to set them via the admin cp, in the options area. That is ok though, just as easy to modify them via phpMyAdmin, I just wanted to make sure that I did not install something wrong.
I may just stick with the other hack until this one is completly fixed up.
----------------------------------------------------
On another note GeorgeOfCS, I hope that your father is feeling ok after his incident, my grandmother has had quite a few in past years, so I know how it feels.
GeorgeofCS
01-24-2002, 10:50 AM
yeah my father is getting better slowly, but it's definitely a long road for him.
The problem with the hack is I've installed it now without fail like 3 different times. And it always works. It's a problem in the installer file, but I'll be honest I don't know where the bug is and if someone know please post it so I can update the installer.
From now on my hacks will be in text files rather than installer files.
SaintDog
01-24-2002, 10:59 AM
If you have the time, is there a way you can just post what we need to do w/o using the installer file? I could do it manually if needed over using the installer file, just need to make sure that I am doing it right.
--------------------
I will give you one bit of feedback that I don't think anyone else has mentioned. In the installed file, once you click install, the error page pops up.
Well, the error is due to the fact that you are not placing data into all the fields (see below):
You are asking it to use the below fields:
settingid
settinggroupid
title
varname
value
description
optioncode
displayorder
Yet you do not use all of those to insert data into, you only use 7 of the 8 fields and it is causing a data error. You are using the below:
NULL,'Bronze Donator','bronze','10','How much of a donation is required to be a bronze level contributor','','1'
I think that is your problem right there, you need to specify what goes in the 8th field that you left out.
That is what the problem is from my point and after viewing it and the error, I think that is the problem.
kreftt
02-08-2002, 10:47 AM
thats right.
take a look into your settinggroup table
write down the settingroupid for the donation, in my case 41.
so i change the sql query from
INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,'Bronze Donator','bronze','10','How much of a donation is required to be a bronze level contributor','','1')
to
INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,'41','Bronze Donator','bronze','10','How much of a donation is required to be a bronze level contributor','','1')
this worked for me. simply exchange the 41 in the example with your matching settinggroupid.
kreftt
maverick1236
02-13-2002, 02:57 PM
could someone give me text files for these templates?
getinfo_bdonation, getinfo_donation, getinfo_gdonation, getinfo_pdonation, getinfo_sdonation
it would be a big help-tx!!!!!!!!!
streamzone
02-25-2002, 05:03 AM
hmm..i am having problems that i just cant figure out with this one. using 2.2.1 and i get this error:
"Invalid SQL: ALTER TABLE `user` CHANGE `donator` SMALLINT UNSIGNED NOT NULL
mysql error: You have an error in your SQL syntax near 'SMALLINT UNSIGNED NOT NULL' at line 1"
i just cant figure it out. any suggestions?
Lucky
03-05-2002, 12:33 AM
So does this work in 2.2.2?
There is a lot of confusion in this thread. Can someone please clarify that the installer infact works, and if not can someone post the text files needed to manually install.
TIA :)
vertex
03-24-2002, 08:07 PM
doesnt look like it works on 2.2.4
everytime i mark a user as a contributor i get:
mysql error: Unknown column 'showdonation' in 'field list'
mysql error number: 1054
Date: Sunday 24th of March 2002 03:59:55 PM
Script: http://www.somethingleet.com/admin/user.php
Referer: http://www.somethingleet.com/admin/user.php?s=&action=edit&userid=131
vertex
04-01-2002, 11:59 AM
crappiest hack ever since it totally ****ed up our cookies, it replaced browse board with cookies which we need to keep user's logged in.
GCPrez
01-16-2003, 05:47 AM
[QUOTE]Originally posted by masood
Looks like you have similar problem :)
This involves two MySQL tables, 'settinggroup' and 'setting'. If you browse the 'settinggroup' table (through phpMyAdmin etc.) look for the 'settinggroupid' value corresponding to the "Donator" - should be the last row in this table if you have not installed another hack involving change of this table...
Now this 'settinggroupid' value must match with the 'settinggroupid' in 'setting' table (where corresponding options are defined). If you browse 'setting' table, you can look for Silver, Bronze and Gold rows at the end.
In my case these values did not match, so I could not see the options under Donator in control panel options. I just edited those rows in 'setting' table and bingo! :)
GCPrez
01-16-2003, 08:14 AM
I finally figured it out! :dead:
Here's what I did to work around it...
Run the install, then Login to MySQL and locate your settinggroupid for the Donations block. Since 'contribute.php' tries to install a duplicate of this, it stops and doesn't finish the install.
Take the ID and change all the VALUES in 'contribute.php' file like this:
$DB_site->query("INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,'Bronze Donator','bronze','10','How much of a donation is required to be a bronze level contributor','','1')");
to:
$DB_site->query("INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,'32','Bronze Donator','bronze','10','How much of a donation is required to be a bronze level contributor','','1')");
* '32' = (your id)
rerun the install but you might get the same error so you may want to try the upgrade so that it can finish the install.
Because of this, you may now have duplicates blocks setup...just delete them and now it all should be working.
darkmaninc
01-23-2003, 08:26 PM
i've tried to do this and this is what i now get
Database error in vBulletin Control Panel 2.2.8:
Invalid SQL: INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (NULL,'Silver Donator','silver','25','How much of a donation is required to be a silver level contributor','','2')
mysql error: Column count doesn't match value count at row 1
mysql error number: 1136
darkmaninc
01-23-2003, 08:27 PM
i followed the instruction you have at the end here GCPrez and now it gives me that error ? what to do now ?
darkmaninc
01-23-2003, 08:32 PM
n/m i got it working doh... forgot to put the settinggroupid in all of them lol :)
darkmaninc
01-23-2003, 09:14 PM
geez i can't find this in admin/functions.php
if ($bbuserinfo[adminemail]) {
$allowmailchecked="checked";
$allowmailnotchecked="";
} else {
$allowmailchecked="";
$allowmailnotchecked="checked";
}
also can't find this
$nosessionhash=iif($nosessionhash=="yes",1,0);
I'm using vBulletin 2.2.8 btw :)
darkmaninc
01-23-2003, 10:23 PM
ok i've got it working now but here's the problem whatever i set the bronze , silver , gold, platinum settings to they won't show
what's up with that ? but if i set one at 0 it will show then
so what's up with that ?
darkmaninc
01-23-2003, 10:32 PM
doh i got it all working now great hack... forgot to set the amount user had donated to get it to show lol
GunsNetwork
05-04-2003, 06:24 PM
It seems all my members are showing platinum status.
What varibale is wrong here?
Something is out of whack.
GunsNetwork
05-04-2003, 10:56 PM
Nevermind I figured it out.
Thanks
Bison
07-24-2003, 01:29 PM
I know I have this thing setup correctly, I have people setup as "gold contributors" but they all come up as "platinmun" ... who's gotta fix for this? :ogre:
Using
Vbulletin 2.30
Bison
07-28-2003, 04:55 PM
^^Bump^^
Takamine334
11-27-2004, 01:21 AM
Fatal error: Call to undefined function: cpheader() in /www/g/groove_salad/htdocs/BitTorrent/admincp/contribute.php on line 4
I guess this doesn't work for 3.0.3
MTVSlick
02-24-2007, 01:38 PM
[QUOTE=Takamine334;576470]Fatal error: Call to undefined function: cpheader() in /www/g/groove_salad/htdocs/BitTorrent/admincp/contribute.php on line 4
I guess this doesn't work for 3.0.3
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.