PDA

View Full Version : Miscellaneous Hacks - Mark User as Contributor


Boofo
08-16-2005, 10:00 PM
Mark User as Contributor
(By Boofo)

Original vB 3 version: assassingod

Thanks to assassingod for allowing me to port his hack to vBulletin 3.5 RC 2 and creating the original hack. And to Revan for teaching me about product management.

// Description:
This allows you as an Administrator to mark users if they have donated to your web site. The setting in in the Admin CP profile for each user.

You can use text/icon, whatever you want by editing the phrase. It appears in the postbit and the user's profile.

Chris_D
08-17-2005, 05:49 PM
Nice work :)

I've got the PayPal Donations mod installed already so I won't need this one, but good work nonetheless.

Boofo
08-17-2005, 05:53 PM
Nice work :)

I've got the PayPal Donations mod installed already so I won't need this one, but good work nonetheless.

This just gives your contributors a page to have "their name in lights" so to speak. A thank you jester for donating to your site.

Zachariah
08-17-2005, 06:28 PM
Nice job sir. I was gana start that going.

Boofo
08-17-2005, 06:40 PM
Nice job sir. I was gana start that going.

Well, hello there, stranger. Nice to see you around, sir. ;)

Asterik
08-17-2005, 08:30 PM
Thanks, this is just what i was looking for :D.

Boofo
08-17-2005, 09:18 PM
Did you miss the install button then? ;)

Azhrialilu
08-17-2005, 09:25 PM
very nice :)

BigIke
08-18-2005, 01:40 AM
:: Instaled ::

Nice way to make the non-contributing users contribute ;) Thanks muchly Boofo

Zachariah
09-08-2005, 12:29 AM
Error
Footer Edit.

-------------------------------------------------------------------
Edit template 'FOOTER'

BELOW it add:
-------------------------------------------------------------------

<a href="contributors.php">$vbphrase[bf2_contribs]</a> -

-------------------------------------------------------------------

Try:
<a href="$vboptions/contributors.php">$vbphrase[contribs]</a> -


bf2_contribs :banana: ( you still got the brown bear I made ? as a logo ... ehhehe)





[B]Idea


'POSTBIT', 'MEMBERINFO', template

<if condition="$post['contrib']"><div class="smallfont"><a href="$vboptions[bburl]/contributors.php">$vbphrase[post_contrib]</a></div></if>

vs.

<if condition="$post['contrib']"><div class="smallfont">$vbphrase[post_contrib]</div></if>


It would be cool to add the same bit of code to the Members list too :o

**Note: In the XML file. I do not know if there is a way, but <if> the mysql Table / field has been done from an older hack ask the Forums Admin durring install to del and reinstall or skip DB edits.

I had the old hack (assassingod) in and when I did the install the DB edits told me to get Bent for the contrib field was already there. I edited the installer by hand and cliped out the DB installer code and all is well.

Guess make 2 XML's ? the upgrade one and the new install ?

Boofo
09-08-2005, 01:15 AM
You're probably one of the very few who would ever run into something like that. If it's there, you will find it. LOL

The contributors.php worked fine for me, but, yes, your code would be better, I guess. There! I said it! ;)

Feel free to make whatever additions you see fit and I will link them in the first post. ;)

And glad to see you still alive and kicking, my friend. ;)

Zachariah
09-08-2005, 01:28 AM
also some type of WOL plug-in edit.

Perhaps this is a bit much ?

<!-- Begin Official PayPal Seal --><a href="https://www.paypal.com/us/verified/pal=$EMAIL ADDY" target="_blank"><img src="http://www.paypal.com/en_US/i/icon/verification_seal.gif" border="0" alt="Official PayPal Seal"></A><!-- End Official PayPal Seal -->

ashley53680
10-27-2005, 09:47 PM
I have the same issue as Zachariah, but I don't know how to fix it. :(

Anyone have a new xml file for those of us who don't know how to edit it? *purty please*

ashley53680
10-27-2005, 10:06 PM
Okay amazingly I edited the xml file correctly... I think at least. I have an error though. I had the old hack on my board, and I am trying to upgrade to this one. This is the error:

Fatal error: Call to a member function on a non-object in /home/XXXXX/public_html/forum/contributors.php on line 43

Boofo
10-27-2005, 10:11 PM
Okay amazingly I edited the xml file correctly... I think at least. I have an error though. I had the old hack on my board, and I am trying to upgrade to this one. This is the error:

Fatal error: Call to a member function on a non-object in /home/XXXXX/public_html/forum/contributors.php on line 43

This is for 3.5.0. Do you have 3.0.3 installed by chance? ;)

ashley53680
10-27-2005, 10:58 PM
It didn't copy over the old contributors.php file. ;) hehe (user issues oops)

Boofo
10-27-2005, 11:36 PM
It didn't copy over the old contributors.php file. ;) hehe (user issues oops)

No problem. Glad you got it working. ;)

cheech4487
11-01-2005, 11:09 PM
Where do the images show up? I'm not seeing them. am I supposed to be seeing them in the footer?

cheech4487
11-02-2005, 11:53 PM
Anybody?

cheech4487
11-06-2005, 01:39 AM
Well if there is no support here then I will scrap this mod. Pretty disappointing because it was a great idea that I was lookin forward too. :tired:

dan35
11-06-2005, 04:21 AM
I don't see it at the footer either!

although my footer includes:
<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
<a href="contributors.php">$vbphrase[bf2_contribs]</a> -

It just shows: Contact Us - Forumname - - Archive - Top

Boofo
11-06-2005, 05:37 AM
I don't see it at the footer either!

although my footer includes:
<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
<a href="contributors.php">$vbphrase[bf2_contribs]</a> -

It just shows: Contact Us - Forumname - - Archive - Top

Make sure the phrase is there. ;)

Boofo
11-06-2005, 05:42 AM
Well if there is no support here then I will scrap this mod. Pretty disappointing because it was a great idea that I was lookin forward too. :tired:

Maybe if you would learn to click the install button, you might get some answers once in a while. ;)

As far as images, you will have to add your own if you want that. Right now it shows Contributor in the postbit and profile. The images are already there on the Contributors page. ;)

dan35
11-06-2005, 06:50 AM
Make sure the phrase is there. ;)


I just followed your instructions in the text file. I search for 'bf2_contribs" phrase but don't see it. So we have to add "bf2_contribs" phrase manually?

Boofo
11-06-2005, 06:53 AM
I just followed your instructions in the text file. I search for 'bf2_contribs" phrase but don't see it. So we have to add "bf2_contribs" phrase manually?

Yes. I must have missed that in the xml file. Glad you caught it. ;)

dan35
11-06-2005, 07:01 AM
Please update it :p

Boofo
11-06-2005, 07:57 AM
Please update it :p

When I get some time, I will.

cheech4487
11-06-2005, 08:25 PM
Maybe if you would learn to click the install button, you might get some answers once in a while. ;)


So because I didn't click install "before" I actually installed it, I was being ignored for 5 days while I was waiting for help?

BuRNZau
11-08-2005, 06:25 AM
Works great thanks! Clicks install. :)

One questions is there a way to order the list of contributors alphabetically?

Zachariah
11-08-2005, 10:26 AM
So because I didn't click install "before" I actually installed it, I was being ignored for 5 days while I was waiting for help?

Ya most of the time. I usually make them wait 2-3 months or ignore them all together.

To me its like clock work. If I download, I hit install even if I install it 3 months later.

5 days is nothing 9/10 time I could care less about people that do not follow a set standard of rules or directions.

Your lucky he took the time IMO.

@BuRNZau
contributors.php

Find:
$getusers = $db->query_read("
SELECT `userid`, `username`, `usergroupid`, `displaygroupid`
FROM `" . TABLE_PREFIX . "user`
WHERE `contrib` = '1'
");

Change:
$getusers = $db->query_read("
SELECT `userid`, `username`, `usergroupid`, `displaygroupid`
FROM `" . TABLE_PREFIX . "user`
WHERE `contrib` = '1'
ORDER BY `username` ASC
");

cheech4487
11-08-2005, 09:04 PM
I could care less about people that do not follow a set standard of rules or directions.



Hey Zachariah. I was not aware that there was a set standard of rules or directions that I should click install "before" I actually had installed it. I have "never" had any problem with this before, & I really appreciate you taking the time to explain this to me, Thank You very much.
Maybe they should consider "you" for a moderator position. :up:

KW802
11-08-2005, 09:25 PM
.... I could care less about people that do not follow a set standard of rules or directions.If you 'could care less' then that means you care at least a little bit. :p


:D

Zachariah
11-08-2005, 09:27 PM
Maybe they should consider "you" for a moderator position. :up:
It would never happen. I would snap 25 times a day and start banning entire domain names.

If you 'could care less' then that means you care at least a little bit. :p

:D

I do not like bugs. :D

I do not like people to have extra stress, unless I am there to give it too them in person. :squareeyed:

Boofo
11-08-2005, 09:40 PM
That wasn't a bug. I left it out intentionally because I like to know what order users donated in. ;)

Zachariah
11-09-2005, 01:02 AM
That wasn't a bug. I left it out intentionally because I like to know what order users donated in. ;)

He was talking to me on my outlook of people that don't care to hit the "install" not your contrib port :p

Boofo
11-09-2005, 01:19 AM
He was talking to me on my outlook of people that don't care to hit the "install" not your contrib port :p

I was referring to this:

I do not like bugs. :D

My apologies if I took it wrong, sir. ;)

Smiry Kin's
12-18-2005, 10:09 PM
work on vb 3.5.2?

lifesourcerec
12-21-2005, 08:56 AM
This just gives your contributors a page to have "their name in lights" so to speak. A thank you jester for donating to your site.

If this was to work with the paypal donations, that would have been super nice.. automatically mark them as contributors, so you wouldn't have to do it manually.

beansbaxter
12-30-2005, 08:57 AM
I am running 3.5.2 and when I import the XML plugin, I get a database error.

BuRNZau
01-10-2006, 10:07 AM
@BuRNZau
contributors.php

Find:
$getusers = $db->query_read("
SELECT `userid`, `username`, `usergroupid`, `displaygroupid`
FROM `" . TABLE_PREFIX . "user`
WHERE `contrib` = '1'
");

Change:
$getusers = $db->query_read("
SELECT `userid`, `username`, `usergroupid`, `displaygroupid`
FROM `" . TABLE_PREFIX . "user`
WHERE `contrib` = '1'
ORDER BY `username` ASC
");

Works great.

TY! :)

EDIT: Also running it on vB v3.5.3 no probs.

Club3G
01-14-2006, 07:30 PM
* Club3G clicks install.

3.5.3, two small issues,

- The install doc says:

Edit file 'contributors.php'
Change 'xxx@xxx.xxx' to your paypal email (2 places)


But I only see one instance of it.

Additionally, importing the product didn't create the phrase bf2_contribs, I had to make it manually. Working perfectly though, thank you. :)

White Knight
05-29-2006, 12:22 PM
How do you upgrade from 3.0 since i have 3.0 already installed?

White Knight
05-29-2006, 12:30 PM
Nevermind.. fix the code myself..

If you already have 3.0 installed and you need to just do a upgade.. download this xml file.

Dont want anyone that used 3.0 and couldnt get it to work on 3.5 just junk it.. specially when it can make a lot of your members mad

SHalliday
06-01-2006, 06:59 PM
Looking for something like this for quite some time. Thank you and Clicks Install

between worlds
06-12-2006, 08:54 PM
Installed. Thank you!

ditangquan
06-16-2006, 10:28 PM
this thing is buggy. i don't see anything on the memberinfo even though i put the phrase in the right place. i do show it on the regular info page. 3.5.4

Boofo
06-16-2006, 11:01 PM
this thing is buggy. i don't see anything on the memberinfo even though i put the phrase in the right place. i do show it on the regular info page. 3.5.4

It is not, buggy. The code to look for my have changed.

Don't use it if you don't want to. ;)

hotwheels
06-17-2006, 09:47 PM
will try tonight........

The Wise One
06-18-2006, 02:41 AM
installed. thanks for porting it.

i also had to remove the DB code as i got the same error. after that...installed just fine and works great.

between worlds
06-21-2006, 09:14 PM
I installed it fine but the link does not appear in the footer it shows up as:

- -

The link should be between the dashes but for some reason isn't showing. Any idea why this might be?

The code looks like this

<td class="tfoot" align="right">
<div class="smallfont">

<strong>
<if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if>
<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
<a href="contributors.php">$vbphrase[bf2_contribs]</a> -
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a> -</if>
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
<if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
<if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
</strong>

<br />
$vboptions[copyrighttext]


</td>
</tr>
</table>

VMB
08-13-2006, 01:23 AM
How would I get the contributor title to show up above avatars on the postbit_legacy?

brvheart
10-02-2006, 09:35 PM
any chance for this on 3.6.x? I sure hope so :)

phpdevrus
10-03-2006, 02:31 AM
yep would definitely be great for 3.6.x :-)

spaghie
10-07-2006, 09:33 PM
It worked for me on 3.6.1! thanks.

brvheart
10-09-2006, 01:04 AM
sweet thank you :)

Sax on the Web
12-08-2006, 08:15 AM
Got following error message. What am I doing wrong?

There seems to have been a problem with the The Sax on the Web Forum database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, whom you can also contact if the problem persists.
We apologise for any inconvenience.

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT `userid`, `username`, `usergroupid`, `displaygroupid`
FROM `user`
WHERE `contrib` = '1';

MySQL Error : Unknown column 'contrib' in 'where clause'
Error Number : 1054
Date : Friday, December 8th 2006 @ 11:41:05 AM
Script : http://forum.saxontheweb.net/contributors.php
Referrer :
IP Address : 84.249.42.17
Username : Harri Rautiainen
Classname : vB_Database

MrPHD
12-08-2006, 09:15 AM
Great job. Thanks and installed

BuRNZau
07-08-2007, 12:53 PM
I have an old database and I wanted to know if I can use phpMyAdmin to list all my users in the database marked as contributors?

ozmazdaclub
08-08-2007, 03:18 PM
Try:
<a href="$vboptions[bburl]/contributors.php">$vbphrase[contribs]</a>

between worlds - Have you tried that?