PDA

View Full Version : Give Points from the Postbit for Ebux


Reeve of shinra
02-23-2006, 10:00 PM
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.


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

caimakale
02-24-2006, 12:50 AM
Nice addon!

CMX_CMGSCCC
02-24-2006, 01:21 PM
Crafty idea!

-CMX

The Chief
02-24-2006, 01:41 PM
really nice, I will try this later on :)

Gallio
02-26-2006, 10:48 AM
Very nice ad on! *Installs* Good Job A++

LBSources
02-26-2006, 08:41 PM
seems to work for postbit_legacy only? any docs for postbit?

good job though

Reeve of shinra
02-27-2006, 02:49 AM
It should work the same for the regular postbit. You just may want to add it in a more aestetically pleasing place. Only staff sees it so I guess it doesn't matter that much either way.

lairnoc
03-04-2006, 05:14 PM
does this one work in the letest version v 1.2.5? and are you stil working on this hack as it is still a beta

Reeve of shinra
03-04-2006, 05:22 PM
a) this should currently work with any version of ebux or ucash actually.

b) I have some small updates in mind but I've also been extreemly busy. It seems that no one has been having any issues with it so I should just remove the "beta".

lairnoc
03-08-2006, 08:22 PM
thnx, but a new question m8 ;) will it work with the new version vbBux/vbPlaza?

Reeve of shinra
05-28-2006, 11:53 PM
sorry didnt seen the question - it should, but you may need to rename the fields in the file.

jacks0_0
07-09-2006, 02:44 AM
Help me , i get a bug

" Warning: main(./global.php): failed to open stream: No such file or directory in i:\easyphp1-8\www\forum\estore\points.php on line 9

Fatal error: main(): Failed opening required './global.php' (include_path='.;I:/EasyPHP1-8\php\pear\') in i:\easyphp1-8\www\forum\estore\points.php on line 9 "

BreeBears
08-12-2006, 07:55 AM
You are going to have to excuse me, because I know this is a very silly question but nevertheless I still need help LOL

Step 2:
Upload points.php to your estore folder

Ok, got me, where the world is my estore folder?!?!?! LOL Can I just make one? If so, where do I make it at?

Was there something else I was supposed to install to create that folder? I have vBulletin/CMPS - a top posters mod and then of course the vbbuxplaze_v1[1].5.8....

I'm sorry for wasting your time *blush* but I'm new to this and somethings just don't click with me... Thanks in advance for your help =0)

Always, Bree

ROFL Nevermind I got it *bigger blush*

ngocha85
08-30-2006, 12:53 PM
Help me , i get a bug

" Warning: main(./global.php): failed to open stream: No such file or directory in i:\easyphp1-8\www\forum\estore\points.php on line 9

Fatal error: main(): Failed opening required './global.php' (include_path='.;I:/EasyPHP1-8\php\pear\') in i:\easyphp1-8\www\forum\estore\points.php on line 9 "
Me too, i don't know where is "global.php" file?

If using vbBux 1.5.8, where is "estore" folder?

ngocha85
08-31-2006, 08:07 AM
Anybody here?

Please help us!

iamnofear
09-08-2006, 08:38 PM
there are 2 global files
1. in forum folder
2. in admincp folder

ngocha85
10-02-2006, 05:15 PM
can someone update this for vbux?

Reeve of shinra
10-13-2006, 02:33 AM
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.

ngocha85
11-01-2006, 04:11 AM
Hey man,
??
in the next week or two

joanne8621
11-10-2006, 01:04 PM
Can someone please update this for VBBux/Plaza?

Thanks

yingzhou
12-14-2006, 10:13 PM
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!:D :D

Reeve of shinra
01-09-2007, 03:50 AM
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.


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

timja
10-23-2007, 10:42 AM
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?)

Reeve of shinra
10-24-2007, 03:43 AM
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.


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.

timja
10-24-2007, 12:30 PM
Very kind of you. I shall try this later today.