Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

[Release] MyPlaza [code] Thanks 1.0
#11

Well, if you put "return;" it won't return much I think O.o
I'd make that return true; or false;
It's cool that you're coding this btw Smile.
#12

Thx. This help Smile

Now I'm must clear code, and recode to Myplaza Plugin.
I'm Try Relase this plugin until week.
#13

PHP Code:
$puid=intval($post['uid']);
$uuid=intval($mybb->user['uid']);
$costed=1;
user_change_money($uuid, -$costed);
$costed=0.1;
user_change_money($puid$costed); 

I don't know why this functions don't change money.
Don't return any error

Can I must specyfic additional globals?

PHP Code:
global $db,$mybb,$post
#14

So what you're trying to do is remove 1 from the user that's viewing the post and give 0.1 to the user that has posted. Right? Can I see your whole function?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#15

PHP Code:
//thanks function

function myplazacode_do_thank($pid$tid$puid)
{


    global 
$db,$mybb,$post;
    
$check_query $db->simple_select("myplazanocodethx","*" ,"adduid='{$mybb->user['uid']}' AND pid='$pid' AND tid='$tid'");
    if(
$db->num_rows($check_query))
        return;
    
$check_query $db->simple_select("posts","uid","pid='$pid'");
    if(
$db->num_rows($check_query)==1)//  post exsits
    
{
    
$uuid=intval($mybb->user['uid']);
    
$costed=1;
    
user_change_money($uuid, -$costed);
    
$costed=0.1;
    
user_change_money($puid$costed);
    
    
    
$tmp=$db->fetch_array($check_query);    
        
$database = array (
            
"txid" => NULL
            
"adduid" => $uuid,
            
"pid" => $pid,
            
"tid" => $tid
        
);
        
$db->insert_query("myplazanocodethx"$database); //add thank to thx table
        
    
}

#16

is the part thats not working the user_change_money?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#17

Yes
#18

are you sure? try placing "die();" before that and tell me if you get a blank page
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#19

Blank Page.


Add thanks part Is ok
PHP Code:
$tmp=$db->fetch_array($check_query);    
        
$database = array (
            
"txid" => NULL
            
"adduid" => $uuid,
            
"pid" => $pid,
            
"tid" => $tid
        
);
        
$db->insert_query("myplazanocodethx"$database); //add thank to thx table 



But problem is in:
PHP Code:
$uuid=intval($mybb->user['uid']);
    
$costed=intval($mybb->settings['unhide_cost']);
    die();
    
user_change_money($uuid, -$costed);
    
$costed=intval($mybb->settings['unhiden_bonus']);
    
user_change_money($puid$costed); 


All function
PHP Code:
function myplazacode_do_thank($pid$tid$puid)
{


    global 
$db,$mybb,$post;
    
$check_query $db->simple_select("myplazanocodethx","*" ,"adduid='{$mybb->user['uid']}' AND pid='$pid' AND tid='$tid'");
    if(
$db->num_rows($check_query))
        return;
    
$check_query $db->simple_select("posts","uid","pid='$pid'");
    if(
$db->num_rows($check_query)==1)//  post exsits
    
{
    
$uuid=intval($mybb->user['uid']);
    
$costed=intval($mybb->settings['unhide_cost']);
    die();
    
user_change_money($uuid, -$costed);
    
$costed=intval($mybb->settings['unhiden_bonus']);
    
user_change_money($puid$costed);
    
    
    
$tmp=$db->fetch_array($check_query);    
        
$database = array (
            
"txid" => NULL
            
"adduid" => $uuid,
            
"pid" => $pid,
            
"tid" => $tid
        
);
        
$db->insert_query("myplazanocodethx"$database); //add thank to thx table
        
    
}

#20

PHP Code:
user_change_money($uuid, -$costed); 

Does the user lose money here?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.




Users browsing this thread: 1 Guest(s)