vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - ICash, Simple, stand alone point system. (https://vborg.vbsupport.ru/showthread.php?t=119086)

hippiesimz 03-04-2007 12:48 PM

hi there.. im running vb 3.63 , no problem with the installation, everything works perfectly, but i had some problem, i tried to give people point everytime they make a thread its working, but it doesnt work when they post a reply. can anyone help me or does anybody have the same problem with me ? thanks.

Blaine0002 03-04-2007 12:50 PM

it is actually very easy to add points for different actions people do ont he forums, i am going to cover voting on a poll.
Create a new plugin and call it : ICash Poll
The hooklocation should probably be : pollvotedata_postsave
and the code should look somthing like this
PHP Code:

$amount '1';
$vbulletin->db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$amount}' where userid='{$vbulletin->userinfo['userid']}'"); 

now just set the $amount variable to the amount you want to give to the voter.

simple as that, you simply have to know what hook is located where.

if you wanted to subtract points all you would need to do is change + to - in the php code.

Have fun and feel free to post your plugins :)

Zagis 03-04-2007 01:35 PM

Quote:

Originally Posted by Blaine0002 (Post 1193510)
Zagis, i posted earlier in the thread that you simply need to change the hook location to newpost_complete instead of newpost_process

Sorry Blaine, I didn't noticed that you answered earlier.
Any way, the hook location is newpost_complete but the main problem now is that ICash does not work after the vB 3.6.5 upgrade...

Blaine0002 03-04-2007 01:58 PM

great.... are you sure about this? i dont have a renewed liscense so i can not investigate further >_<

Zagis 03-04-2007 03:29 PM

I had a few complains so I tested a couple of times. If someone else has the same prob with ICash on vB 3.6.5, please post...;)

razor69 03-04-2007 11:48 PM

Is there any way to import UCash users and their points?

Blaine0002 03-05-2007 01:31 AM

no need to import, just find out the row that ucash used for it and change the settings to it in the admincp

razor69 03-05-2007 01:37 AM

Quote:

Originally Posted by Blaine0002 (Post 1195883)
no need to import, just find out the row that ucash used for it and change the settings to it in the admincp

Thanks for the quick reply! I am trying to ensure that users keep all their points they have acrued in Ucash.

fitnesshealth 03-05-2007 06:00 AM

Hi,

I've upgraded from 1.01 to 1.02.

Any idea why points still remain the same after replying in a thread when "points per character" is disabled?

My settings:
- Points per thread/post is activated in Icash settings.
- Points per reply has also been set under Forum manager.
- Nothing in the code is modified.

Please advise.

Zagis 03-05-2007 12:31 PM

Quote:

Originally Posted by Zagis (Post 1195465)
Any way, the hook location is newpost_complete but the main problem now is that ICash does not work after the vB 3.6.5 upgrade...

:rolleyes: I've upgraded vB to 3.6.5 and right after ICash from 1.01 to 1.02 so I'm not quite sure what exactly is the reason that I'm having the same problem with "fitnesshealth"

Marko777 03-05-2007 11:25 PM

Blaine,

Any news about the deletion of posts/points?

Thank you.

Detomah 03-06-2007 12:07 PM

Quote:

Originally Posted by Zagis (Post 1196198)
:rolleyes: I've upgraded vB to 3.6.5 and right after ICash from 1.01 to 1.02 so I'm not quite sure what exactly is the reason that I'm having the same problem with "fitnesshealth"

I'm having the same thing, just to add another confirmation that something aint quite right now.

Black Tiger 03-06-2007 01:50 PM

Quote:

Any idea why points still remain the same after replying in a thread when "points per character" is disabled?
Maybe it's the forums setting, I had this with 1 forum too.
I looked and the forum was setup to not count posts made in that forum to the users postcount. If the forum is setup that way, not only the post are not counted to the postcount but also Icash points are not given for characters, reply's, new threads in that forum.
Seems logic to me.

But maybe your problem is caused by something else.

Blaine0002 03-06-2007 02:36 PM

Quote:

Originally Posted by Detomah (Post 1197062)
I'm having the same thing, just to add another confirmation that something aint quite right now.

Hmm, are you guys gettin any error at all? or are you just not getting points added.

Check to make sure inthe Icash settings that points per thread/reply is enabled, then go into each individual forum under forum manager to ensure that the correct amount ot points is set per forum.

fitnesshealth 03-06-2007 04:27 PM

Quote:

Originally Posted by Blaine0002 (Post 1197176)
Hmm, are you guys gettin any error at all? or are you just not getting points added.

Check to make sure inthe Icash settings that points per thread/reply is enabled, then go into each individual forum under forum manager to ensure that the correct amount ot points is set per forum.


Yes, points per thread/reply is enabled in "ICash settings" and points are set as per forum under "Forum Manager".

Points per character, points for referring, points for registration all work fine.

The only problem is when points per character is disabled and points per thread/reply is enabled. The points just don't get added and there is no error at all.


Screenshot of Icash settings: here

Screenshot of Forum manager settings: here

fitnesshealth 03-06-2007 04:30 PM

Quote:

Originally Posted by Black Tiger (Post 1197138)
Maybe it's the forums setting, I had this with 1 forum too.
I looked and the forum was setup to not count posts made in that forum to the users postcount. If the forum is setup that way, not only the post are not counted to the postcount but also Icash points are not given for characters, reply's, new threads in that forum.
Seems logic to me.

But maybe your problem is caused by something else.

I have no idea either. My forum is 3.6.5 and only has ICash, visitors for the last 24 hours and multiple account detector mods installed.

Black Tiger 03-06-2007 04:36 PM

It's working fine here with characters disabled and post/reply and newthread enabled.
So if your postcount for the forums are active, I don't know what's going wrong.
I run vB 3.6.5.

fitnesshealth 03-06-2007 04:39 PM

Ok, i upgraded vbulletin from 3.6.4 to 3.6.5 and then ICash 1.01 to ICash 1.02.

These are my settings. Anything i did wrongly?

Screenshot of Icash settings: here

Screenshot of Forum manager settings: here

Black Tiger 03-06-2007 04:55 PM

Looks fine to me, I have it setup the exact same way as in your screenshots, just have another (original) name for the "Name of points" but that should not make any difference.

I presume you used the "overwrite" option when upgrading to 1.02, if you did, then all should be fine, settings are OK. In that case I hope the coder can help you with the problem.

fitnesshealth 03-06-2007 05:13 PM

Quote:

Originally Posted by Black Tiger (Post 1197320)
Looks fine to me, I have it setup the exact same way as in your screenshots, just have another (original) name for the "Name of points" but that should not make any difference.

I presume you used the "overwrite" option when upgrading to 1.02, if you did, then all should be fine, settings are OK. In that case I hope the coder can help you with the problem.

Yes, i did overwrite. And I just tried overwriting every files and importing/overwriting with 1.02 again and the same problem still exists.


Thanks for your help though. :)

Black Tiger 03-06-2007 05:23 PM

Hmmz... may you will be more happy now because more users have the same problem.
Because I only tested by making a new thread and I thought I had tested with reply too.

I just reply'd to another thread and guess what? Points did not get added at my forums either so I have the same problem as you have.
New thread works, reply does not work.:(

fitnesshealth 03-06-2007 05:27 PM

Black Tiger,

Thanks! At least now i can confirm it's not my fault.

I just hope that Blaine0002 can have it fixed soon when he has the time. :)

Black Tiger 03-06-2007 05:34 PM

Quote:

Thanks! At least now i can confirm it's not my fault.
You're welcome!
Confirmation is the reason why I went and tested it again because I did definately did not see any mistake on your side and since I had the same setup, I thought of the fact that I might still have forgotten to test the reply option.
Hope he will have time soon indeed.:)

Blaine0002 03-06-2007 10:05 PM

i seem to have fixed it, it works on my board at least :D download latest zip.

Black Tiger 03-06-2007 10:44 PM

Downloaded, tried and fixed indeed.:)

Thanks for your quick support Blaine!!

Blaine0002 03-06-2007 11:36 PM

Glad its finally working for you ^^

fitnesshealth 03-07-2007 04:48 AM

Now it works great. Thanks a lot Blaine0002 for the fix. :)

Mys 03-08-2007 12:31 AM

Yes, thank you for that, Blaine!

Regarding integration to ibProArcade, Marcel at vBHacks provided the following information:

"all hooks are present in ibProArcade to place PlugIns for any cash-system in it.

check /includes/xml/hooks_ibproarcade.xml for more details..."

So I looked in that file and found:

<?xml version="1.0" encoding="ISO-8859-1"?>
<hooks>
<hooktype type="ibProArcade">
<hook>ibproarcade_global_start</hook>
<hook>ibproarcade_navbar_complete</hook>
<hook>ibproarcade_play_game</hook>
<hook>ibproarcade_play_game_popup</hook>
<hook>ibproarcade_play_game_tourney</hook>
<hook>ibproarcade_new_champ</hook>
<hook>ibproarcade_tourney_won</hook>
<hook>ibproarcade_register_tourney_start</hook>
<hook>ibproarcade_do_create_tourney_start</hook>
<hook>ibproarcade_gamebit</hook>
</hooktype>
</hooks>

Could you suggest or offer any ideas on how to use this to enable members to use their points to play arcade games that permit wagering? The integration would pass points both ways: points wagered from member's iCash account to ibProArcade and then any game winnings from ibProArcade back into member's iCash account.

As always, your help is appreciated.


:)

Mys 03-08-2007 12:33 AM

Been gone a couple days and trying to catch up here.

Looks like we are good to upgrade to 3.6.5 now?


:o

Blaine0002 03-08-2007 12:39 AM

would be simple enough, like just put the following code in whatever hook you want to take action for

PHP Code:

$amount '1';
$vbulletin->db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$amount}' where userid='{$vbulletin->userinfo['userid']}'"); 

for example giving points on arcade champ would be the hook ibproarcade_new_champ

Black Tiger 03-08-2007 12:54 AM

I had posted the same question as Mys has posted here, in the ibProarcade support area, so in fact I have the same question.:)

But I don't have a clue how to work with hooks or how to implement them.
I can understand a little what the db query does you wrote Blaine, but I don't have a clue how to implement it nore where. I would need screenshot examples or a product.xml file or something like that, cause on this territory I'm really a noob.

I would already be very glad if I (for starters) only had a way that users had to pay to play with Icash credits and that I could setup in the ACP the amound of credits needed to play a game. Any help is VERY appreciated!

Blaine0002 03-08-2007 01:01 AM

ok try this, make a new plugin, hook location ibproarcade_play_game

contents somthing like this

PHP Code:

$amount '1';

if ((
$vbulletin->userinfo[$vbulletin->options['icashf']] - $amount) < 0) {
          eval(
standard_error(fetch_error('your_error')));
}
$vbulletin->db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}-'{$amount}' where userid='{$vbulletin->userinfo['userid']}'"); 

you will need to make a phrase called whatever you want saying somthing like 'you dont have enough to play this game'

heres what each individual thing does
$amount is set to whatever you want your games to cost, you need to set this

if (($vbulletin->userinfo[$vbulletin->options['icashf']] - $amount) < 0) {
eval(standard_error(fetch_error('your_error')));
}

this checks the money row, and sees if they have enough to play the game, if not, ERROR!
of course you will need to make a new error phrase and edit the code to whatever you named your phrase.

$vbulletin->db->query("update " . TABLE_PREFIX . "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}-'{$amount}' where userid='{$vbulletin->userinfo['userid']}'");

if the error passes this updates their settings and minuses the $amount from their points :D

have fun !

Mys 03-08-2007 04:32 AM

Quote:

Originally Posted by Blaine0002 (Post 1198462)
would be simple enough, like just put the following code in whatever hook you want to take action for

PHP Code:

$amount '1';
$vbulletin->db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$amount}' where userid='{$vbulletin->userinfo['userid']}'"); 

for example giving points on arcade champ would be the hook ibproarcade_new_champ

Thank you, sir!

I will try to work with that.

Mys 03-08-2007 04:35 AM

really looking forward to hear how Black Tiger makes out with that....

Thanks, again, Blaine!


:up:

2meplie 03-08-2007 01:08 PM

I installed the update a first time. But it was not working correctly (we got points for a new thread but not for a reply). I tried to reinstall it and I got this:

Database error in vBulletin 3.6.4:

Invalid SQL:
ALTER TABLE user ADD COLUMN money decimal(15,2) DEFAULT '0' NOT NULL;

MySQL Error : Duplicate column name 'money'
Error Number : 1060

???

2meplie 03-08-2007 02:05 PM

ok I found the way.

nvm

mcqwert 03-08-2007 02:13 PM

So is this working on v3.6 yet?

Blaine0002 03-08-2007 02:20 PM

yes, this has always been working on 3.6..

2mepile was it a problem with my code?

Black Tiger 03-08-2007 02:22 PM

Working fine on 3.6.x mcqwert, no problem.

@Blaine0002: Thanks very much! This evening I have to go out, but I will try to do it like you said later tonight (around 02.00 GMT+1). I'll let you all know how it worked out.

2meplie 03-08-2007 02:29 PM

Quote:

Originally Posted by Blaine0002 (Post 1195448)
it is actually very easy to add points for different actions people do ont he forums, i am going to cover voting on a poll.
Create a new plugin and call it : ICash Poll
The hooklocation should probably be : pollvotedata_postsave
and the code should look somthing like this
PHP Code:

$amount '1';
$vbulletin->db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$amount}' where userid='{$vbulletin->userinfo['userid']}'"); 

now just set the $amount variable to the amount you want to give to the voter.

simple as that, you simply have to know what hook is located where.

if you wanted to subtract points all you would need to do is change + to - in the php code.

Have fun and feel free to post your plugins :)

I did this and it does not work. It say:

Fatal error: Call to a member function on a non-object in .../public_html/forum/includes/class_dm_pollvote.php(138) : eval()'d code on line 2


All times are GMT. The time now is 12:49 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.01877 seconds
  • Memory Usage 1,865KB
  • 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
  • (5)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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