Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2007, 01:25 AM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding an Image next to Username on Postbit

I dunno if this is the right forum, but I hope it is and I hope you all can help me out - PLEASE!! :up:
---------------------------------------------

Hey Guys,

I wanna make an addon to the Cyb - PayPal Donate Hack (LINK). What I want my addon to do is to add an image next to a member's username in the postbit (postbit_legacy) template after their donation has been "confirmed" by the Admin.

Basically, its something similar to what the v3 Arcade Hack has done. On this hack after a user wins a Championship for a game, he/she will receive a trophy image next to their username in the postbit (postbit_legacy) template ... So bascally I wanna do this, but instead make it so that it adds the image after a user's donation is "confirmed" ... Is this possible?

So far I have this ...

Code:
<!-- Donation Hack Image Addon -->
<if condition="DONT_KNOW_WHAT_TO_PUT_HERE"><a class="bigusername" href="misc.php?do=donlist"><img src="images/donate.gif" align="absmiddle" alt="User Has Donated!" border="0" /></a></if>
<!-- /Donation Hack Image Addon -->

I would place the above code after this line in postbit or postbit_legacy template (depending on which I'm using) ...

Code:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
This is what I'm thinking, but I'm not sure if it would work as I would need to figure out which "condition" to place in the <if> statement ...

After speaking with mfyvie I was adviced ...

Quote:
Originally Posted by mfyvie
There are no conditionals which are accesible which will give you this answer. You'd need to set a variable in the plugin code before the template is called, then you can test for it with a conditional inside the template.

In order to set that variable you'll have to first figure out if the current user is a donator, and for that you'd have to see if they appear in the database as a donator. You'd have to query the database for that info - the table in the database is "cybppdonate" if you look at the contents of this table you'll see how it is setup, querying it should be straightforward.

Note - you'll find examples of existing queries to this same table inside the plugin code itself.

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

... the easiest way to check for a donator is to see if there are records which are confirmed which match the current userid. In other words - does that table (cybppdonate) in the database have records where the userid in the table matches the current userid of the user. If yes - set a variable before the template is called and then check the conditional in the template ...

Well luckily the table (cybppdonate) has a "userid" field and the information inside the field there matches the current userid of the members. So now, I'm stuck and need your help. For one, I do not know how to create a variable or add one before a template. Also, how do I check a conditional on a template? How do I make a conditional? I dont have much knowledge of this stuff at all, that why I am seeking help, hopefully you all can help me.

Thanks,
Danny

BUMP! Anyone care to share their knowledge and help me out please?
Reply With Quote
  #2  
Old 07-05-2007, 08:00 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone care to help me out please?
Reply With Quote
  #3  
Old 07-07-2007, 04:34 AM
quiklink quiklink is offline
 
Join Date: Jun 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Set up a new usergroup for those who have donated, and give a rank badge for 0 posts to anyone in that usergroup. That's how I do it with my subscriptions.
Reply With Quote
  #4  
Old 07-07-2007, 05:07 AM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Thanks for replying ... I know that's one way of doing it, but that's just more work. I would have to manually add the member to the Usergroup - There are multiple ways of doing what I want manually, not only via Rank Image, but that's not what I want ... What I want is to implement a code so that it automatically adds the image to the member once they have Donated using the "Cyb - PayPal Donate Hack" without the need of usergroups, rank images, etc ... I do however appreciate you replying, atleast you took the time to come in here and give me your input, looks like no one else cares to help out now adays
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03595 seconds
  • Memory Usage 2,190KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete