Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Give Points from the Postbit for Ebux Details »»
Give Points from the Postbit for Ebux
Version: 1.00, by Reeve of shinra Reeve of shinra is offline
Developer Last Online: Jan 2015 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 02-23-2006 Last Update: Never Installs: 11
DB Changes Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

Give Points from the postbit - Ebux Edition!

** Please not that this is a beta ***

What this hack does: (see screenshots below)

This lets you add/deduct user points directly from the postbit updating your default ebux fields. If your not using the standard ebux fields, or if your using an alternate points system like ucash, its easy to edit the variable for these fields in points.php.

This also adds a field to the post table which will show how many points were given for that particular post.

So for example, I see a post I like and I give that user 5 points. When another mod comes around, he can see that the user now has a total of 20 points and it will show that 5 points was given for that post so he doesn't double credit the user.

Queries:

I have a decent size board and I've been using a variation of this mod since vb2 -- its very friendly. If you have a lot of posts, you may want to turn off your board for the minute it will take for the product to add the new field.

It uses 0 additional queries during regular use.

When your staff gives points, it uses 4 small queries but again thats only when your staff uses this to give points and NOT during regular use.


Why is it beta?

1. If your using a table prefix you need to manually set the field edit points.php and change this $pointstable = 'user'; to including your table prefix.

2. I had to do a very small work around because of a problem I started having as of 3.5... I haven't experienced any issues because of this but others might. Its related to the postbit so if its an issue you can just undo that part and be okay.

3. This doesn't record the points staff give to users in the ebux history log. I may add that if enough people want it.

4. This uses whole numbers and not decimals so they get dropped or rounded up. I have to see about changing that.


Install Instructions:

Step 1:

If your using a table prefix, you will need to edit points.php and add it
in the very begining to the $pointstable so $pointstable = 'prefix_user';


Step 2:
Upload points.php to your estore folder
Upload coin.gif to your images/misc folder

Step 3:
Import shinrapoints.xml as a product in your admincp.


Step 4:

Add the following to your postbit template.

HTML Code:
<!-- begin points mod -->
<if condition="is_member_of($bbuserinfo, 5, 6, 7)">
	<div>
				
	</form> <!-- gets around an error -->

	<form action="./estore/points.php" method="post" name="gilform">
						
	<input type="hidden" name="postid"   value="$post[postid]">
	<input type="hidden" name="userid"   value="$post[userid]">
											
	<input type="text" name="amount" size="3">&nbsp;
	<input type="image" src="images/coin.gif" border="0" name="submit" alt="Give Points" onClick="javascript:alert('Points Paid!');">
	</form>
	<br />
	<br />
	</div>
	<div class="smallfont">
	Post Points: $post[pointspd]
	</div>				
</if>
<!-- / end points mod -->

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 12-14-2006, 10:13 PM
yingzhou's Avatar
yingzhou yingzhou is offline
 
Join Date: Oct 2006
Location: Ho Chi Minh
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Reeve of shinra View Post
I am installing the latest vbplaza for vb 3.6.2 and will likely update this hack if any changes are necessary... no promises on how long it might take but it should be in the next week or two.
Cant wait for it! THANK YOU very much!
Reply With Quote
  #23  
Old 01-09-2007, 03:50 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry folks, just got around to playing around with the script and it works pretty much as-is with vb 3.6.4 but I noticed a few things...

1. upload points.php to your /forum/ folder for now... I need to add a cd/ before calling global.php at the top line. Not sure how I missed that earlier. =p

2. when you update the postbit template, be sure to update the patch to points.php. If you installed this to your /forum folder, then you can use this.

HTML Code:
<!-- begin points mod -->
<if condition="is_member_of($bbuserinfo, 5, 6, 7)">
	<div>
				
	<!-- </form> -->
<!--gets around an error -->

	<form action="./points.php" method="post" name="gilform">
						
	<input type="hidden" name="postid"   value="$post[postid]">
	<input type="hidden" name="userid"   value="$post[userid]">
											
	<input type="text" name="amount" size="3">&nbsp;
	<input type="image" src="images/coin.gif" border="0" name="submit" alt="Give Points" onClick="javascript:alert('Points Paid!');">
	</form>
	<br />
	<br />
	</div>
	<div class="smallfont">
	Post Points: $post[pointspd]
	</div>				
</if>
<!-- / end points mod -->
Reply With Quote
  #24  
Old 10-23-2007, 10:42 AM
timja timja is offline
 
Join Date: Oct 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't use ebux or ucash or any other mod/hack like this. Can I still use your point system? (does it work standalone?)
Reply With Quote
  #25  
Old 10-24-2007, 03:43 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep, in fact I use it stand alone as well on 3.6.8.

Since you are NOT using an existing points system, you will need to do the following:

Admincp -- Maintenance -- Execute SQL query.
Change 'user' to 'tableprefix_user' if you need to.

Code:
ALTER TABLE `user` ADD `points` INT( 10 ) DEFAULT '0' NOT NULL ;
Then just follow the instructions. Ignore any version issues that you get. If you have trouble - hit me up on aim.
Reply With Quote
  #26  
Old 10-24-2007, 12:30 PM
timja timja is offline
 
Join Date: Oct 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very kind of you. I shall try this later today.
Reply With Quote
Reply

Thread Tools

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 10:58 AM.


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.04707 seconds
  • Memory Usage 2,261KB
  • Queries Executed 20 (?)
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)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete