vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Mark User As Contributor V 2.0 Multi Tier (https://vborg.vbsupport.ru/showthread.php?t=33441)

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:

PHP Code:

Database error in vBulletin Control Panel 2.2.1:

Invalid SQLALTER TABLE `userADD `donator` `donatorSMALLINT 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
: [url]http://www.mydomain.org/forums/forums/admin/contribute.php[/url]
Referer: [url]http://www.mydomain.org/forums/admin/contribute.php[/url] 

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:
PHP Code:

## 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

PHP Code:

$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:
PHP Code:

## 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/showthrea...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.


All times are GMT. The time now is 04:47 PM.

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.02173 seconds
  • Memory Usage 1,828KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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