vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Mark User as Contributor (https://vborg.vbsupport.ru/showthread.php?t=61082)

assassingod 02-01-2004 10:00 PM

Mark User as Contributor
 
Mark User as Contributor [vB3]

Coded by: assassingod
Original: MarkB

Thanks to MarkB for letting me port this hack to vBulletin 3 and creating the original.

Description:
This allows you as an administrator to mark users if they have donated to your website. You can use text/icon whatever you want by editing the phrase. It appears in postbit and the users profile:)

Xyphen 02-02-2004 06:12 PM

Can this be done with an image? Just wondering, nice hack, was looking for something like this, I'm sure it can be done as a image but just verifying.

assassingod 02-02-2004 06:14 PM

Do you mean that can you use an image? Then yes, you can by editing the phrase. (If that's not what you meant you'll have to explain again, thanks:))

TheComputerGuy 02-02-2004 06:34 PM

Good job! Will install!

gmarik 02-02-2004 07:56 PM

I'll use it for the ones who submit text to my library, thanks pal.

assassingod 02-02-2004 08:04 PM

Don't forget to click the install button if you use this hack:)

akiy 02-02-2004 08:10 PM

Quote:

Originally Posted by assassingod
Mark User as Contributor [vB3]

Coded by: assassingod
Original: MarkB

Thanks to MarkB for letting me port this hack to vBulletin 3 and creating the original.

Description:
This allows you as an administrator to mark users if they have donated to your website. You can use text/icon whatever you want by editing the phrase. It appears in postbit and the users profile:)

I may be missing something, but couldn't this be done without any file hacks by using a secondary usergroup (eg "Contributor") and a conditional in the right templates to display the text/image (<if condition="is_member_of($post, X)"><B>Contributor</B></if>)?

Allan 02-02-2004 08:12 PM

Good Job Assanssingod :)

assassingod 02-02-2004 08:18 PM

Quote:

Originally Posted by akiy
I may be missing something, but couldn't this be done without any file hacks by using a secondary usergroup (eg "Contributor") and a conditional in the right templates to display the text/image (<if condition="is_member_of($post, X)"><B>Contributor</B></if>)?

Yes, but I myself would prefer a simpler way (and I find this way easier)

akiy 02-02-2004 08:20 PM

Quote:

Originally Posted by assassingod
Yes, but I myself would prefer a simpler way (and I find this way easier)

Ah, OK. Just wondering. I guess I personally prefer methods that'll work without file modifications since I hate having to reapply file patches when upgrading...

FastAttack 02-03-2004 01:04 AM

I did the simple way and used this conditional in the postbit:

PHP Code:

<if condition="$post[subscriptionid] == 4">Im a paying member</if> 

thanks to funkie for pointing it out ..

btw this hack works if you don't want to have added features as a donator

Randuin 02-03-2004 02:03 AM

Okay... I tried using the <img> tags in phrases...It didn't work :(

assassingod 02-03-2004 05:43 AM

Quote:

Originally Posted by Randuin
Okay... I tried using the <img> tags in phrases...It didn't work :(

I'll get to work on this.

PranK 02-03-2004 05:53 AM

schweet - nice job assasingod!! :) :D

[high]* PranK clicks install
[/high]

Christian

gmarik 02-03-2004 06:24 AM

akiy - could you write a step-by-step tut about what you did?

Exero 02-03-2004 09:35 AM

totaly sweet
ill install when vB3 Gold is out ;)

Funkie 02-05-2004 09:34 AM

Quote:

Originally Posted by FastAttack
I did the simple way and used this conditional in the postbit:

PHP Code:

<if condition="$post[subscriptionid] == 4">Im a paying member</if> 

thanks to funkie for pointing it out ..

btw this hack works if you don't want to have added features as a donator


@FastAttack did this work for you as I couldn't get it to work I put it in the postbit-legacy template but nothing shows up how did you get it to work m8 as I've had to setup aload of xtra usergroups and added this code to cover it

PHP Code:

 <if condition="IS_MEMBER_OF($post, 20)">Donated:  <img src="/forum/images/gold.gif" width="50" height="50"></if><if condition="IS_MEMBER_OF($post, 21)">Donated:  <img src="/forum/images/bronze.gif" width="50" height="50"></if><if condition="IS_MEMBER_OF($post, 22)">Donated:  <img src="/forum/images/silver.gif" width="50" height="50"></if><if condition="IS_MEMBER_OF($post, 23)">Donated:  <img src="/forum/images/mon.gif" width="20" height="30"></if> 


FastAttack 02-05-2004 11:16 AM

Its working perfectly fine.. just remember to change the Usergroup ID.

I can give you my postbit code so you can look at it. PM me l8r! :)

Funkie 02-05-2004 01:12 PM

when you say change the usergroup id do you mean the subscription id like when your first setup a supscription its 1 and so forth or is there something in usergroup I need to change?

a look at your postbit would be helpfull m8 if you don't mind

funkie@btconnect.com

FastAttack 02-06-2004 01:28 AM

Letme send you the postbit layout.. its pretty simple its actually not subscription id but usergroup == blablabl

anyhow code on its way

Ig@r 02-06-2004 02:13 AM

Quote:

Originally Posted by akiy
I may be missing something, but couldn't this be done without any file hacks by using a secondary usergroup (eg "Contributor") and a conditional in the right templates to display the text/image (<if condition="is_member_of($post, X)"><B>Contributor</B></if>)?

IMHO, this is the best way to do it. There is no file hack needed, only the template modification. This is a power of VB3!

Funkie 02-06-2004 07:17 AM

@FastAttack thx man:D



Quote:

Originally Posted by Ig@r
IMHO, this is the best way to do it. There is no file hack needed, only the template modification. This is a power of VB3!

that is an option m8 but its not the easiest way to do it as you have to setup different usergroups it would be best done under subscription id then whoever has subscribed to one of the subsriptions you can make a different gif for each

but saying that I don't know what the code is for subscription id or even if its a condition cuz noone answered me when I asked

Mellow 02-14-2004 05:01 PM

Quote:

Originally Posted by gmarik
akiy - could you write a step-by-step tut about what you did?

I liked this mod... I took the template-only suggestion and it worked great. I still clicked Install since the idea and original intent was very good.

The Quibbler 02-15-2004 11:50 PM

It'd be nice if you could mark them as different levels (like "Contributor" if they dontate $XX-$XX, "Donator" if $XX-$XX, and so on). But it's still really nice as is. I'll install it soon.

FastAttack 02-16-2004 01:18 AM

Quote:

Originally Posted by The Quibbler
It'd be nice if you could mark them as different levels (like "Contributor" if they dontate $XX-$XX, "Donator" if $XX-$XX, and so on). But it's still really nice as is. I'll install it soon.

again you can make it a conditional using fields.

First make the regular Contributor tag . Then make new field get the ID number and once more using the conditional to display the amount if that field is populated ( of course only admins would have access to input the amount there)

Zachariah 02-28-2004 11:05 PM

Would be nice to have "Contributor page" as a VB page with header, footer, navbar ect .. with links to their profiles.

EX:

Yoursite.com would like to extend its thanks to the following individuals who have helped us pay back some of our debts and expenses over the years.
blaw, blaw blaw blaw......

Code:

SELECT `userid` , `username` , `contrib`
FROM `user`
WHERE 1 AND `contrib` =1
ORDER BY `usergroupid` ASC  LIMIT 0 , 30

Thoughts ?

trackpads 02-29-2004 01:38 AM

Great hack!!

assassingod 02-29-2004 06:43 AM

Quote:

Originally Posted by HarryButt
Would be nice to have "Contributor page" as a VB page with header, footer, navbar ect .. with links to their profiles.

EX:

Yoursite.com would like to extend its thanks to the following individuals who have helped us pay back some of our debts and expenses over the years.
blaw, blaw blaw blaw......

Code:

SELECT `userid` , `username` , `contrib`
FROM `user`
WHERE 1 AND `contrib` =1
ORDER BY `usergroupid` ASC  LIMIT 0 , 30

Thoughts ?

This would be pretty easy, i'll make it an addon soon.

trackpads 02-29-2004 12:05 PM

Thanks!

ap0c 02-29-2004 11:21 PM

for the image showing up in the postbit, couldnt you just use the rank feature.I set mine up using subscriptions which are automatic, and a new rank for that usergroup they entered with the $ image for rank.

trackpads 03-02-2004 12:43 AM

Quote:

Originally Posted by ap0c
for the image showing up in the postbit, couldnt you just use the rank feature.I set mine up using subscriptions which are automatic, and a new rank for that usergroup they entered with the $ image for rank.

You can but this is even better because you can save ranks for other things.

Zachariah 03-08-2004 10:18 PM

Quote:

Originally Posted by assassingod
This would be pretty easy, i'll make it an addon soon.

Its "dirty" code and don't have VB code vs. hard code, I am sure there is a simple way, but here is some thoughts.



Code:

<?php
require('./global.php');

$contribreport=mysql_query("SELECT userid,username,contrib FROM user WHERE contrib='1' ORDER BY userid");
while(list($userid,$username,$contrib)=mysql_fetch_row($contribreport)){

?>
<table width='98%' border='0' cellspacing='1' cellpadding='0' align='center'>
  <tr>
  <td align='center' width='100%'><a target='_blank' href='../forums/member.php?u=<? echo"$userid"; ?>'><font size='1' face='Verdana'><? echo" $username"; ?></font></a></td>
 </tr>

<?
}
?>


assassingod 03-09-2004 04:29 PM

Contributor Page:
Upload contributors.php and upload it to your forums root directory

Add the template 'CONTRIBUTORS'
Code:

$stylevar[htmldoctype]
 <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
 <head>
        <title>$vboptions[bbtitle] - $vbphrase[contribs]</title>
 $headinclude
 </head>
 <body>
 $header
 $navbar
 <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
 <thead>
        <tr>
                <td class="tcat">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('newpost_options')"><img id="collapseimg_newpost_options" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_newpost_options].gif" alt="" border="0" /></a>$vbphrase[contribs]
                </td>
        </tr>
 </thead>
 <tbody id="collapseobj_newpost_options" style="$vbcollapse[collapseobj_newpost_options]">       
        <tr valign="top">
                <td class="panelsurround" align="center">
                <div class="panel">
                        <div style="width:$stylevar[formwidth]" align="$stylevar[left]">                   
                        <fieldset class="fieldset">
                                <legend>$vbphrase[contribs]</legend>
                                <div style="padding:$stylevar[formspacer]px">
                                <div>$contrib_bit</div>
                                </div>
                        </fieldset>
                        </div>
                </div>
                </td>
        </tr>
 </tbody>
 </table>
 $footer
 
 </body>
 </html>

Add the template 'contrib_bit'
Code:

<a href="member.php?$session[sessionurl]userid=$contributors[userid]">$contributors[username]</a>
 <br />

Edit template 'footer'
Find:
Code:

<a href="$vboptions[contactuslink]">$vbphrase[contact_us]</a>
Above, add:
Code:

                            <a href="contributors.php">Contributors</a> -
Add phrase:
Quote:

varname: contribs
text: Contributors

Boofo 03-09-2004 06:59 PM

Excellent addition, Steve! Good work! ;)

Zachariah 03-09-2004 11:44 PM

Quote:

Originally Posted by assassingod
Contributor Page:

:banana:

I changed a few things:
http://www.gzhq.net/forums/contributors.php

Boofo 03-09-2004 11:49 PM

Quote:

Originally Posted by HarryButt
:banana:

I changed a few things:
http://www.gzhq.net/forums/contributors.php

That looks great! Would you care to share the code? ;)

Zachariah 03-10-2004 12:20 AM

Quote:

Originally Posted by Boofo
That looks great! Would you care to share the code? ;)


Template: CONTRIBUTORS (in this template is Yoursite.com and Youremail@Yoursite.com) *fill in your info.

Code:

$stylevar[htmldoctype]
 <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
 <head>
        <title>$vboptions[bbtitle] - Contributors</title>
 $headinclude
 </head>
 <body>
 $header
 $navbar
 <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
 <thead>
        <tr>
                <td class="tcat">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('newpost_options')"><img id="collapseimg_newpost_options" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_newpost_options].gif" alt="" border="0" /></a>$vbphrase[contribs]
                </td>
        </tr>
 </thead>
 <tbody id="collapseobj_newpost_options" style="$vbcollapse[collapseobj_newpost_options]">       
        <tr valign="top">
                <td class="panelsurround" align="center">
                <div class="panel">
                        <div style="width:$stylevar[formwidth]" align="$stylevar[left]">                   
                        <fieldset class="fieldset">
                                <legend>$vbphrase[contribs]</legend>
                                <div style="padding:$stylevar[formspacer]px">
                                <div><p align="center">Yoursite.com would like to extend its thanks to the following individuals who
have helped us pay back some of our debts and expenses over the years. Yoursite.com
is currently fueled only by such notable individuals at those that follow, and
it is they who help us keep this site online. If you are interested in donating
to Yoursite.com, please use Paypal and this <a target="_blank"
href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=Youremail@Yoursite.com&amp;item_name=Donation%20to%20Yoursite.com&amp;item_number=Donation&amp;no_shipping=1">link</A>. <br>
                      <br>
                      <b><font size="5">The People Making Yoursite.com Possible</font></b></p></div>
                                <div><center>$contrib_bit</center><br></div>
                                </div>
                        </fieldset>
                        </div>
                </div>
                </td>
        </tr>
 </tbody>
 </table>
 $footer
 
 </body>
 </html>

Template: contrib_bit
Code:

<a target="_blank" href="member.php?$session[sessionurl]userid=$contributors[userid]">$contributors[username]</a>
 <br />

Phrase: contribs (in this Phrase is Yoursite.com) *fill in your info.
Code:

<img border="0" src="$stylevar[imgdir_misc]/donate.gif" alt="Yoursite.com Contributors !!!" width="16" height="16"> Contributors
Image: donate.gif (style image/misc)
VBroot/images/misc

Boofo 03-10-2004 01:59 AM

Thank you, sir. ;)

assassingod 03-10-2004 05:37 AM

Looks good:)

Infopro 03-25-2004 12:52 PM

Quote:

.....It appears in postbit and the users profile
It appears on the profile page, but I can't make it appear on postbit. It does have a space there, but the text does not show. I noticed this same issue on another members forum here in this thread as well.

Any ideas? Thanks.


All times are GMT. The time now is 04:46 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.01445 seconds
  • Memory Usage 1,859KB
  • 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
  • (10)bbcode_code_printable
  • (3)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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