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)

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


All times are GMT. The time now is 03:06 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.01406 seconds
  • Memory Usage 1,767KB
  • 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
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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