vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   uCash 1.1.1 (https://vborg.vbsupport.ru/showthread.php?t=90855)

TyleR 01-22-2006 02:06 AM

Quote:

Originally Posted by Montana
I am having trouble with an error. Anyone help me on it?

This is not a uCash problem.

uCash does not support 3rd party addons such as the "Ultra Itemshop".

Please seek support in their release thread.

X-Files 01-24-2006 10:37 AM

Quote:

Originally Posted by bradolson
Heads up for anyone using this: if someone previews their post/thread instead of posting, they'll get the points. So someone could just continue hitting the preview button and rack up points.

This is a major bug in this program and it has not been addressed! This was posted in October. We just found it today after the upgrade to vB 3.5.3. This was not happening in the old version. Could someone please help us out. We need this system to work because the points are used to be able to purchase items.

Thanks.

Ranma2k 01-24-2006 11:52 AM

Quote:

Originally Posted by X-Files
This is a major bug in this program and it has not been addressed! This was posted in October. We just found it today after the upgrade to vB 3.5.3. This was not happening in the old version. Could someone please help us out. We need this system to work because the points are used to be able to purchase items.

Thanks.

acctully there is a lot of ways to get points
with one post only i can get the max number of points for a post with just typing 1 line
it have many bugs

Oddjob 01-24-2006 12:29 PM

Quote:

Originally Posted by xYarub
It's in the works.


Do i know you?


HEHE......small world.

fly 01-24-2006 01:47 PM

Quote:

Originally Posted by X-Files
This is a major bug in this program and it has not been addressed! This was posted in October. We just found it today after the upgrade to vB 3.5.3. This was not happening in the old version. Could someone please help us out. We need this system to work because the points are used to be able to purchase items.

Thanks.

Are you not reading this thread? There is no support. The dude left.

X-Files 01-24-2006 03:26 PM

Quote:

Originally Posted by X-Files
This is a major bug in this program and it has not been addressed! This was posted in October. We just found it today after the upgrade to vB 3.5.3. This was not happening in the old version. Could someone please help us out. We need this system to work because the points are used to be able to purchase items.

Thanks.

Fixed it myself.

functions_newpost.php

Change:
PHP Code:

($hook vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false

To:
PHP Code:

if (! $post['preview']){
        (
$hook vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;
    } 


kall 01-24-2006 03:51 PM

Quote:

Originally Posted by X-Files
Fixed it myself.

functions_newpost.php

Change:
PHP Code:

($hook vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false

To:
PHP Code:

if (! $post['preview']){
        (
$hook vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;
    } 


I think it would be better to wrap the plugin that goes in that hook with the conditional.

Doing it the way you suggest will cause issues down the road with any plugin that requires that hook, and previewing.

X-Files 01-24-2006 04:42 PM

Quote:

Originally Posted by kall
I think it would be better to wrap the plugin that goes in that hook with the conditional.

Doing it the way you suggest will cause issues down the road with any plugin that requires that hook, and previewing.

I do not claim to understand everything about the system so please explain. Is this a generic hook for anyone to use or is this hook specific to uCash? If it is a generic hook how does the program know what code to run here if there are multiple things using the hook?
I also do not know how to change the code for uCash.

Thanks.

kall 01-24-2006 04:48 PM

I'm afraid I am far too unwell to explain the entire vBulletin Hook system at the moment.

Basically, it was introduced with vB 3.5.x (the version that recently came out, replacing 3.0.x), allowing coders to make 'hacks' that did not require code modifications.

Effectively, the php file is run, then when it comes to a 'hook' in the code, it looks in the database to see if anything additional is in that hook.

By doing what you suggest, the php file will not look for that hook if the post is being Previewed. You need to go to the hook in your Plugin Manager and add the conditional you added to the php file in the hook for Ucash.

X-Files 01-24-2006 05:14 PM

Thanks!

Here is what I did. If we are not supposed to post code remove it at will.
If the user is not doing a preview then we want to give them points.
PHP Code:

if (! $post['preview']) 

PHP Code:

// ## <ucash>
if (! $post['preview']){
if (
$vbulletin->options['ucash_enablesystem'] == 1)
// It's enabled! Yay!
    // Points Per Character
    
if ($vbulletin->options['ucash_pointspercharacter'] != 0)
    {
        
// Count the characters.
        
$chars strlen($post['message']);
        
$charbonus = ($vbulletin->options['ucash_pointspercharacter'] * $chars);
    }
    else
    {
        
$charbonus 0;
    }
    if (
$type == 'thread')
    { 
// We're doing a thread, not a reply.
        
if ($charbonus != || ($vbulletin->options['ucash_perthread'] != && $foruminfo['ucash_perthread'] != 0))
        { 
// Both needed values are not 0... good.
            
$givethempoints = (($vbulletin->options['ucash_perthread'] + $charbonus) * $foruminfo['ucash_perthread']);
        }
    }
    else
    { 
// This time we're replying.
        
if ($charbonus != || ($vbulletin->options['ucash_perreply'] != && $foruminfo['ucash_perreply'] != 0))
        { 
// Both needed values are not 0... good.
            
$givethempoints = (($vbulletin->options['ucash_perreply'] + $charbonus) * $foruminfo['ucash_perreply']);
        }
    }
    if (isset(
$givethempoints))
    { 
// If they get money....
        // Send the query and we're done.
        
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX "{$vbulletin->options['ucash_pointtable']} SET {$vbulletin->options['ucash_pointsfield']}={$vbulletin->options['ucash_pointsfield']}+$givethempoints WHERE userid='{$vbulletin->userinfo['userid']}'");

        
// Forum Bank
        
if ($vbulletin->options['ucash_governmentbank'] != 0) {
            
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."datastore SET data=data-$givethempoints WHERE title='ucs_global_bank'");
        }
    }
}
}
// ## </ucash> 


Annie^.^ 01-24-2006 11:17 PM

ok where do I add that code?

X-Files 01-25-2006 12:22 AM

Quote:

Originally Posted by Annie^.^
ok where do I add that code?

In the AdminCP.

Plugin System --> Plugin Manager

Find:

Hook Location : newpost_process
uCash - New Post

Click on it to edit the php code.

Hope this helps.

Annie^.^ 01-25-2006 12:42 AM

Thnaks I will give it a try. Did that solve the problem for you?

X-Files 01-25-2006 12:45 AM

Quote:

Originally Posted by Annie^.^
Thnaks I will give it a try. Did that solve the problem for you?

It seems to work fine for me.

Annie^.^ 01-25-2006 10:41 AM

That did the trick.

I have couple of questions. Is it just on my forum, but when I delete a post it doesn't dedact the point.

Is there a way to deny points to certain forums?

Thanks guys

X-Files 01-25-2006 10:53 AM

Quote:

Originally Posted by Annie^.^
That did the trick.

I have couple of questions. Is it just on my forum, but when I delete a post it doesn't deduct the point.

Is there a way to deny points to certain forums?

Thanks guys

That is another issue we have. I may try and see if I can find and hack the hook for deleting a post. I am not a vBulletin expert by no means. I know enough to get by. Mostly doing simple things.

I think you can deny points but I am not sure off the top of my head.

Annie^.^ 01-25-2006 01:51 PM

This didn't work for me at all. The points doesn't show. Any ideas why? I use 3.5.3

Quote:

Originally Posted by X-Files
I have an interesting question.

Upgraded to vB 3.5.2
Upgrded uCash to 1.1.1

The points are displaying in the user profile correctly. If I try and use this
Code:

$userinfo[points]
method to display the points in the navbar it does not take but if I use
Code:

$userinfo[ucash]
it displays but with the decimal points. Any ideas on how to display the points for a user in the navbar without the decimal points.

example:
Welcome, X-Files. You have 16617.99 chips!
You last visited: Today at 10:11 AM
Private Messages: Unread 0, Total 258.

Code:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>&nbsp;You have $userinfo[ucash] chips!<br />


X-Files 01-25-2006 02:03 PM

Quote:

Originally Posted by Annie^.^
This didn't work for me at all. The points doesn't show. Any ideas why? I use 3.5.3

Here is the navbar I have now.
Code:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>&nbsp;You have $bbuserinfo[points] chips!<br />
Found this:
Code:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
Added this before the <br />;
Code:

&nbsp;You have $bbuserinfo[points] chips!
If you have the default install I think this should work.
Code:

$bbuserinfo[points]
If not you need to find out the field in the user table that holds the points.

Mine looks like this now.
Code:

Welcome, X-Files. You have 32,997 chips!
You last visited: Today at 10:46 AM
Private Messages: Unread 0, Total 328.


Annie^.^ 01-25-2006 02:24 PM

Thanks now it's working good.

I had this:
Quote:

$userinfo[ucash]
I replaced it to this:
Quote:

$bbuserinfo[ucash]
Thanks a lot


Now all I need to find out is how to restrict points to ceratin forum categories.

TamCaVBoy3 01-25-2006 03:01 PM

may be make this mod so that you use the points to buy threads

X-Files 01-25-2006 03:05 PM

Quote:

Originally Posted by Annie^.^
Thanks now it's working good.

I had this:


I replaced it to this:


Thanks a lot


Now all I need to find out is how to restrict points to ceratin forum categories.

Forum Manager
Edit the forum you do not want to give points to. Set all these to 0.

Quote:

uCash Options

Points Per Thread?This setting is multiplied by the default value defined in the 'vBulletin Options' page of the Admin CP. A value of 1 uses the default, 2 doubles it, etc.

0

Points Per Reply?This setting is multiplied by the default value defined in the 'vBulletin Options' page of the Admin CP. A value of 1 uses the default, 2 doubles it, etc.

0

Points Per View?This setting is multiplied by the default value defined in the 'vBulletin Options' page of the Admin CP. A value of 1 uses the default, 2 doubles it, etc.

0

Annie^.^ 01-25-2006 03:16 PM

Quote:

Originally Posted by X-Files
Forum Manager
Edit the forum you do not want to give points to. Set all these to 0.

Great!!! I think all my problem pretty much solved. Thanks a lot, you have been great.

Is the programmer who coded the script ain't working on it anymore??

X-Files 01-25-2006 03:41 PM

Quote:

Originally Posted by Annie^.^
Great!!! I think all my problem pretty much solved. Thanks a lot, you have been great.

Is the programmer who coded the script ain't working on it anymore??

I am not sure. I know some group has taken over uShop so I would think they will control uCash also.

Hornstar 01-29-2006 02:07 AM

hopefully they will work on this a bit more as well, its got several bugs that could be fixed. But for most its working fine. I'm going to do a complete re install of this because several users are getting heaps of points when they have only a few posts.

X-Files 01-29-2006 11:33 AM

Quote:

Originally Posted by hornstar1337
hopefully they will work on this a bit more as well, its got several bugs that could be fixed. But for most its working fine. I'm going to do a complete re install of this because several users are getting heaps of points when they have only a few posts.

Have you looked at the preview bug I fixed?

I would love to have it remove points when a post is deleted.

h_jinx 01-30-2006 10:06 AM

Quote:

Originally Posted by X-Files
Thanks!

Here is what I did. If we are not supposed to post code remove it at will.
If the user is not doing a preview then we want to give them points.
PHP Code:

if (! $post['preview']) 

PHP Code:

// ## <ucash>
if (! $post['preview']){
if (
$vbulletin->options['ucash_enablesystem'] == 1)
// It's enabled! Yay!
    // Points Per Character
    
if ($vbulletin->options['ucash_pointspercharacter'] != 0)
    {
        
// Count the characters.
        
$chars strlen($post['message']);
        
$charbonus = ($vbulletin->options['ucash_pointspercharacter'] * $chars);
    }
    else
    {
        
$charbonus 0;
    }
    if (
$type == 'thread')
    { 
// We're doing a thread, not a reply.
        
if ($charbonus != || ($vbulletin->options['ucash_perthread'] != && $foruminfo['ucash_perthread'] != 0))
        { 
// Both needed values are not 0... good.
            
$givethempoints = (($vbulletin->options['ucash_perthread'] + $charbonus) * $foruminfo['ucash_perthread']);
        }
    }
    else
    { 
// This time we're replying.
        
if ($charbonus != || ($vbulletin->options['ucash_perreply'] != && $foruminfo['ucash_perreply'] != 0))
        { 
// Both needed values are not 0... good.
            
$givethempoints = (($vbulletin->options['ucash_perreply'] + $charbonus) * $foruminfo['ucash_perreply']);
        }
    }
    if (isset(
$givethempoints))
    { 
// If they get money....
        // Send the query and we're done.
        
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX "{$vbulletin->options['ucash_pointtable']} SET {$vbulletin->options['ucash_pointsfield']}={$vbulletin->options['ucash_pointsfield']}+$givethempoints WHERE userid='{$vbulletin->userinfo['userid']}'");

        
// Forum Bank
        
if ($vbulletin->options['ucash_governmentbank'] != 0) {
            
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."datastore SET data=data-$givethempoints WHERE title='ucs_global_bank'");
        }
    }
}
}
// ## </ucash> 


OR you can add to the main conditional:
Code:

if ($vbulletin->options['ucash_enablesystem'] == 1)
becomes...

Code:

if ($vbulletin->options['ucash_enablesystem'] == 1 && !$post['preview'] )
I am in the midst of porting a custom made Item Shop hack to 3.5. Since this hack seems to be buggy I am sure I will be fixing these as I go. I am more than competent in php coding and vbulletin.

I'll be starting my own "Ushop" shortly afterwards although the actions will be limited to donate/admindonate/bank/bold/underline/italicise.

I may release it, I may not. Will see how it goes...

h_jinx 01-30-2006 11:12 AM

To fix the above bug, the same conditional needs applied to the following hook:

showthread_start

X-Files 01-30-2006 06:24 PM

Quote:

Originally Posted by h_jinx
To fix the above bug, the same conditional needs applied to the following hook:

showthread_start

Can I ask why?

This has nothing to to with creating and previewing a post.

I would love to have it delete points on thread or post delete.

h_jinx 01-30-2006 08:10 PM

You are quite correct - apologies. I have no idea why I said that. I was in work at the same time as trying to tidy up Ucash ( cleaning the superglobals for one ) and my mind was probably in two places.

I would suggest that your users would not appreciate their points being deducted if their posts are deleted - especially if you are just pruning.

proxx 01-31-2006 03:56 AM

at this point, i don't really care about the uShop... but i do need the donate feature. Does anyone have this? ..i'd pay 10$ usd paypal for this

h_jinx 01-31-2006 08:07 AM

I should have something by the end of this week Proxx.

X-Files 01-31-2006 03:13 PM

Quote:

Originally Posted by h_jinx
You are quite correct - apologies. I have no idea why I said that. I was in work at the same time as trying to tidy up Ucash ( cleaning the superglobals for one ) and my mind was probably in two places.

I would suggest that your users would not appreciate their points being deducted if their posts are deleted - especially if you are just pruning.

We are charging people to post in a certain forum. if they do not have enough points we have to delete the post and then manually add the points back. If a post gets deleted it is for a reason. We have never pruned. Wouldn't pruning be a different process also?

proxx 02-01-2006 04:45 AM

Quote:

Originally Posted by h_jinx
I should have something by the end of this week Proxx.

Ok thx, just let me know when you make a small bug-free plugin which will attach into ucash, so that I can allow my users to send "cash" to each other. .. i'll send you paypal $10 for the trouble.

h_jinx 02-06-2006 08:40 AM

still working on the port of my Itemshop, bout 95% done... will let you know when I start my own version of UShop... am hoping within the next couple of days.

nini 02-06-2006 11:22 AM

ushop & ucash 2.0.0 released!

Jay... 02-08-2006 07:39 PM

anyone know how to stop ucash going into minus?

leakmob 02-16-2006 02:32 PM

Could I pay someone to install this for me?

email: joel.kendall@leakmob.com / aim: thecrownjoel

fly 02-16-2006 03:31 PM

Quote:

Originally Posted by leakmob
Could I pay someone to install this for me?

email: joel.kendall@leakmob.com / aim: thecrownjoel

install uCash2.0 or eStore, not this. If you still need someone to do it, PM me.

xtreme-mobile 02-28-2006 05:08 PM

how do i change the currency on ucash

instead of it being called points can i change it to £ ???

rewardhits 03-04-2006 04:17 PM

HI I need help.

1) How do i see total ucash being given on my website?

2) I need a guru to help me out with inputing ucash and ushop functionalities and make sure they work.

please email me at "teknorhino@yahoo.com" and tell me how much $ you want. please keep bids low to make this project a reality.

Thanks,
Frank


All times are GMT. The time now is 01:32 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.01815 seconds
  • Memory Usage 1,904KB
  • 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
  • (10)bbcode_code_printable
  • (8)bbcode_php_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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