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)

Black Tiger 05-01-2007 06:49 PM

No, sorry, it's just for version 2.3.0.:D

webstop 05-02-2007 05:34 AM

It's possible to deduct points from users that download an attachment, and transfer the points to the uploader?

kylek 05-02-2007 09:27 AM

Quote:

Originally Posted by Blaine0002 (Post 1198474)
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 !

So far this is working for me except for the phrase I made. What is the exact way to make the phrase?

We made a phrase that says "You do not have enough stars to play a game." - phrase type - global, varname - no_stars and saved. Then switched your_error in the above code with no_stars and saved.

Now when someone doesn't have enough stars ( our points) this pops up - Could not find phrase 'no_stars'.

Thanks!!

kylek 05-02-2007 08:37 PM

Finally got it working with Ibproarcade and it is great. However I noticed that it does not seem to work for the games that are played in a new window. Would this need to be another plugin?

4newbies 05-02-2007 11:08 PM

Quote:

Originally Posted by JD45 (Post 1238314)
Yep, forum manager

Please look at my post and image below to see what I am talking about:

https://vborg.vbsupport.ru/showthrea...37#post1238037

Is this the "Forum Manager" I need to be looking at? If so, I can only adjust "Points for Registering" and "Points Per Referral"

I need to adjust the following as well:

Points per reply
Points per new topic
Points per character of reply (Length of Post)

kylek 05-02-2007 11:16 PM

Quote:

Originally Posted by 4newbies (Post 1240173)
Please look at my post and image below to see what I am talking about:

https://vborg.vbsupport.ru/showthrea...37#post1238037

Is this the "Forum Manager" I need to be looking at? If so, I can only adjust "Points for Registering" and "Points Per Referral"

I need to adjust the following as well:

Points per reply
Points per new topic
Points per character of reply (Length of Post)

To set those three items go to vbadmincp > forums and moderators > forum manager, and then click on one of your forums as you would when you edit them. Should be down towards the bottom is where you will find those 3 settings.

Black Tiger 05-03-2007 12:22 AM

@Kylek:
Quote:

Finally got it working with Ibproarcade and it is great.
What exactly do you have working?
I have it working that playing a game costs an x amount of cash, and if a user gets the all-time-highscore of a game, he wins an x amount of cash.

Do you have the same or do you have more options working?

4newbies 05-03-2007 12:42 AM

Quote:

Originally Posted by kylek (Post 1240178)
To set those three items go to vbadmincp > forums and moderators > forum manager, and then click on one of your forums as you would when you edit them. Should be down towards the bottom is where you will find those 3 settings.

Thanks for the clarification. I was able to find it now. I have over 70 boards set up on my forum. Is there any way to globally customize point rewards so that I don't have to spend hours editing each indiviual forum? Also, has anyone found a way to cap the amount of points a user can get total per post?

kylek 05-03-2007 12:57 AM

Quote:

Originally Posted by Black Tiger (Post 1240224)
@Kylek:

What exactly do you have working?
I have it working that playing a game costs an x amount of cash, and if a user gets the all-time-highscore of a game, he wins an x amount of cash.

Do you have the same or do you have more options working?

Dam, you are one up on me, don't have the high score one yet. Took awhile to figure out how to get it to charge cash when a game was opened in a new window.

@4newbies - nothing yet so have fun doing your forums. I dont know about the cap as I dont use that.

incurable 05-03-2007 02:14 AM

works smoothly. thank you.

BozzaJos 05-03-2007 02:44 PM

I know this has been asked a lot of times but the search function isn't working probably (searching for 3.6 is probably not enough characters). I am upgrading my forum from 3.5 to 3.6 and installing a whole new layout but I've got a problem when installing iCash. Installing goes like normal but when I want to post a new thread it gives a database error. I can remember reading about this somewhere along the 44 pages so I guess/hope there is a simple solution for this...

Could anyone point me to the right page/post? Many thanks in advance!

*edit*
Quote:

Okay, im working on fixing some issues, i currently know of the Duplicate post issue in 3.6.5 and am putting all efforts into fixing this.
I've noticed this post after I replied but is there any update on this? Post is from somewhere halfway April!? I'm using 3.6.5 but I guess besides my mysql error there is also a duplicate post issue.

VTV6 05-03-2007 10:38 PM

do you have Top Statics for iCash, iBank, iShop

Black Tiger 05-03-2007 11:22 PM

Quote:

Dam, you are one up on me, don't have the high score one yet. Took awhile to figure out how to get it to charge cash when a game was opened in a new window.
Ah oke, then you already have something I don't have.

For the all-time-highscore, it's about the same as when starting a game, only the use the highscore hook and set it up that people get + amount when reaching a all time topscore.

Maybe you can tell me how to charge the game when it's opened in a new window?

Scathmere 05-04-2007 07:47 AM

I can't find the logs for the cash mod.

Is there any PM feature, where it alerts them?

kylek 05-05-2007 01:31 AM

Quote:

Originally Posted by Black Tiger (Post 1240958)
Ah oke, then you already have something I don't have.

For the all-time-highscore, it's about the same as when starting a game, only the use the highscore hook and set it up that people get + amount when reaching a all time topscore.

Maybe you can tell me how to charge the game when it's opened in a new window?

So with the all time score is it so when a person gets top score in say Snake, they get what ever you have set for the price? If it is I will have to search for this in this thread.

I used the same same code that was in post 392? by Blaine0002 but just make a different plug in called ibproarcade_play_game_popup so it charges for games opened in a new window.
It worked for me.

deezelpope 05-05-2007 09:50 AM

Quote:

Originally Posted by Scathmere (Post 1241161)
I can't find the logs for the cash mod.

Is there any PM feature, where it alerts them?

Nope...my members either send PMs or reputation to notify the recipient.

Black Tiger 05-05-2007 02:27 PM

Quote:

So with the all time score is it so when a person gets top score in say Snake, they get what ever you have set for the price? If it is I will have to search for this in this thread.
Yes that is correct. The way to do this I've found in this thread too. It's just 1 page before posting #392, depending on how you have the pages set.

I Just took over the example and that worked it's in post #390.

Quote:

just make a different plug in called ibproarcade_play_game_popup
Cool. Which code did you put in there to have Icash recognize it's the "new window" version of the game and not the normal version?

spaceman33 05-05-2007 05:34 PM

I went through 20 pages of the forum looking for assistance but couldn't find any assistance.

I got the error by email:
Quote:

Database error in vBulletin 3.6.5:

Invalid SQL:
UPDATE vb_user SET money=money+ WHERE userid='1';

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid='1'' at line 1
Error Number : 1064
Date : Saturday, May 5th 2007 @ 11:09:00 AM
Script : http://www.hborea.us/forums/newreply...streply&t=1254
Referrer : http://www.hborea.us/forums/showthread.php?t=1254
IP Address : 86.155.241.104
Username : [Hborea]Spaceman
Classname : vb_database
I think it happened when I added a post of 10 characters, it didn't add to points, I deleted it, then got the above.

Also, if I make a post, and delete it, the points are deducted.

Anyone know why to the above 2?

Apologies if this had been answered in pages 21 to the end, eyes started going funny reading all the posts, and need to get some food.

Cheers.

PS. Thanks for the mod, by the way. Wanted to install a points mod, and this seemed to be the best available.

JimmDaBimm 05-05-2007 05:45 PM

Quote:

Originally Posted by kylek (Post 1240245)
Dam, you are one up on me, don't have the high score one yet. Took awhile to figure out how to get it to charge cash when a game was opened in a new window.

@4newbies - nothing yet so have fun doing your forums. I dont know about the cap as I dont use that.

Can you explain how i can give the User Points for getting a highscore ?

And.. i want to display the points under the PN Info in the Navbar.. but $post[money] doesn't work :\

Black Tiger 05-05-2007 06:12 PM

@JimmdaBimm
Quote:

Can you explain how i can give the User Points for getting a highscore ?
Look in this thread, postnumber #390, it's explained in there.

@Spaceman33
Quote:

UPDATE vb_user SET money=money+ WHERE userid='1';
I thing there is missing the amount here. Set money=money+.... should this not be money+5 or something like that?
However I don't know what's causing this so hopefully Blaine0002 can help you here.

spaceman33 05-05-2007 06:17 PM

Quote:

Originally Posted by Black Tiger (Post 1241983)
@Spaceman33

I thing there is missing the amount here. Set money=money+.... should this not be money+5 or something like that?
However I don't know what's causing this so hopefully Blaine0002 can help you here.

That's what I noticed. I presume it should be -xx points, not a blank. I saw someone else with a similar problem but that was because they renamed their points system. That's not the problem here so hopefully someone has a fix :)

Scathmere 05-05-2007 07:15 PM

Quote:

Originally Posted by deezelpope (Post 1241818)
Nope...my members either send PMs or reputation to notify the recipient.

Well I'm wondering where there is a log. It says on the first page there is. =/

deezelpope 05-05-2007 07:31 PM

Ok, I found it. When you donate to a member, and afterward, if you go to their postbit/profile page, and click on where it says Donate, the log will come up. Even if you go to your own postbit/profile page, and click on your "Donate" the log will come up.

kylek 05-05-2007 08:23 PM

Quote:

Originally Posted by Black Tiger (Post 1241893)
Yes that is correct. The way to do this I've found in this thread too. It's just 1 page before posting #392, depending on how you have the pages set.

I Just took over the example and that worked it's in post #390.


Cool. Which code did you put in there to have Icash recognize it's the "new window" version of the game and not the normal version?


Charge game price in new window:

Create a new plugin called ibproarcade_play_game_popup

Use Blaine0002 code, just change the amount and your_error message to what you did for the ibproarcade_play_game plugin @ post 392

$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']}'");

Scathmere 05-05-2007 09:16 PM

Quote:

Originally Posted by deezelpope (Post 1242021)
Ok, I found it. When you donate to a member, and afterward, if you go to their postbit/profile page, and click on where it says Donate, the log will come up. Even if you go to your own postbit/profile page, and click on your "Donate" the log will come up.

The only problem is, it only shows the last one. Not a history. ><

deezelpope 05-05-2007 09:22 PM

Hm...yeah, I guess you're right. We don't usually donate cash/points...just gifts. Sorry I couldn't help more.

Black Tiger 05-05-2007 11:20 PM

Quote:

Charge game price in new window:

Create a new plugin called ibproarcade_play_game_popup

Use Blaine0002 code, just change the amount and your_error message to what you did for the ibproarcade_play_game plugin @ post 392
Hmmz... i don't understand yet. Which hook you use then? The new-game hook?

The only thing which I see different then is the amount and the error message. Must the amount be different?

But where is the difference in code that points to a new window game in stead of the normal game?
There should be a lign somewhere that points to the different way of calling the game, isn't there?

In any case thanks very much so far for helping me with this!

kylek 05-05-2007 11:38 PM

Just do the same thing you did to create the first plugin except this plugin use the ibproarcade_play_game_popup hook when adding a new plugin.

The one I made;
Product - ibank (dont think it matters but I put them under IBank)
Hook location - ibproarcade_play_game_popup
title - new window (just my name for it)
Code:
$amount = '1';

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

The only thing I changed from the original code from post 392 is your_error to stars as that is the name of the phrase I used to say you do not have enough stars to play a game.

If a members clicks on play a game the other one from post 392 charges the game cost, if they click on play game in new window this one charges them the cost of the game.

SilverVice 05-06-2007 01:14 AM

Quote:

$amount = '1';
Is it possible to charge 0.25 cent?

I've try:
Quote:

$amount = '0.25';
and
Quote:

$amount = '.25';
and it's not working, any idea?

Black Tiger 05-06-2007 02:02 PM

Kylek:
Quote:

Hook location - ibproarcade_play_game_popup
That was the one I was looking for, thanks a million!!!

@Silvervice:
I don't think it will help, but did you try 0,25?
However I'm afraid it only works with full numbers.

SilverVice 05-06-2007 02:12 PM

Quote:

Originally Posted by Black Tiger (Post 1242461)
but did you try 0,25?

Thanks Black Tiger, but it didn't work also.

It would be so much more realistic to charge 0.25 cents :D

Philipaclayton 05-11-2007 08:16 PM

does this work with vb 3.6.5?

CyberSpatium 05-11-2007 10:34 PM

does this work with 3.6.6?

Black Tiger 05-12-2007 01:39 AM

LoL.:D

Black Tiger 05-12-2007 08:06 PM

Well... just upgraded, 3.6.6 is giving a problem:
Quote:

Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home//mydomain.org/public_html/forums/includes/adminfunctions_template.php(3596) : eval()'d code on line 70
I get this error when editing the postbit and/or postbit legacy template adding this string:
Code:

$vboptions[icashn]: $post[$vboptions[icashf]]
What's causing this?

CyberSpatium 05-12-2007 08:18 PM

Quote:

Originally Posted by Philipaclayton (Post 1245845)
does this work with vb 3.6.5?

just installed it on 3.6.5 and it worked fine.

Black Tiger 05-12-2007 08:26 PM

3.6.5 is no problem that's why I wrote "lol:D" because this was asked in numerous threads already and answered with yes.

There is a little problem in 3.6.6 or at least I've got a problem there.:)

Black Tiger 05-12-2007 09:36 PM

Found the solution to my problem:
The line should be:
Code:

$vboptions[icashn]: $post[money]
Blaine... Maybe you can update your instructions.txt before you forget this one?:)

kennethsia 05-16-2007 09:35 AM

it doesnt work on my 3.6.5 wahh! i duno whats wrong ive installed everything correctly i need a money mod. ive uploaded to all the correct suff. and even added the donate thing

Stephen3 05-16-2007 07:00 PM

3.6.7 is released, does anyone test on it?


All times are GMT. The time now is 08:37 AM.

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.02511 seconds
  • Memory Usage 1,866KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (28)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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