Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Can't aplly changes to a new profile field. (http://www.bvlist.com/showthread.php?t=10791)

codreanuionut 29th March 2016 00:25

Can't aplly changes to a new profile field.
 
Hi,


I'm trying to make a new profile field on my.php and i can't find out what im not
doing right... im not the most expert person when it comes to php..

So.

I saw a signature field in mysql, si i changeit, and it acually display's on
the forum, so i figured out to put it into my.php...



i copyed:

PHP Code:

    <fieldset><legend><strong>{$lang['my_info']}</strong></legend>
    <
textarea name='info' cols='50' rows='4'>" . htmlsafechars($CURUSER["info"]) . "</textarea>{$lang['my_tags']}</fieldset

and i change it to:

PHP Code:


    
<fieldset><legend><strong>Signature</strong></legend>
    <
textarea name='signature' cols='50' rows='1'>" . htmlsafechars($CURUSER["signature"]) . "</textarea>Forum and Comment's signature. (VIP+)</fieldset> 

When i go to my.php it acually works, i can see my actual signature in that
text area, but if i change it, and press submit, after the reload it's unchanged..

I figured out that i must specify somewhere to apply that field.. but i cant find
where info does.. so i don't know where to put it..

DND 29th March 2016 00:40

did ya edit takeprofedit.php file with the proper code? :coffee:
did ya added the proper code into the sql ?

codreanuionut 29th March 2016 01:01

Quote:

Originally Posted by DND (Post 48662)
did ya edit takeprofedit.php file with the proper code? :coffee:
did ya added the proper code into the sql ?


yeah, thank's for pointing that out. imma change takedit..

about the sql.. there already is the signature field there..
do i need to do something else there?



///////////


In takeedit.php there is this..

PHP Code:

   //== Signature stuffs
        
elseif ($action == "signature") {
        
$signatures = (isset($_POST['signatures']) && $_POST["signatures"] != "" "yes" "no");
        
$signature trimurldecode$_POST["signature"] ) );
        if ( 
preg_match"/^http:\/\/$/i"$signature 
        or 
preg_match"/[?&;]/"$signature 
        or 
preg_match("#javascript:#is"$signature 
        or !
preg_match("#^https?://(?:[^<>*\"]+|[a-z0-9/\._\-!]+)$#iU"$signature ))
        {
        
$signature='';
        } 
        if( !empty(
$signature) ) 
        {
        
$img_size = @GetImageSize$signature );
        if(
$img_size == FALSE || !in_array($img_size['mime'], $TBDEV['allowed_ext']))
        
stderr('USER ERROR''Not an image or unsupported image!');
        if(
$img_size[0] < || $img_size[1] < 5)
        
stderr('USER ERROR''Image is too small');
        if ( ( 
$img_size[0] > $TBDEV['sig_img_width'] ) OR ( $img_size[1] > $TBDEV['sig_img_height'] ) )
        { 
        
$image resize_image( array(
        
'max_width'  => $TBDEV['sig_img_width'],
        
'max_height' => $TBDEV['sig_img_height'],
        
'cur_width'  => $img_size[0],
        
'cur_height' => $img_size[1]));
        }
        else
        {
        
$image['img_width'] = $img_size[0];
        
$image['img_height'] = $img_size[1];
        }  
        
$updateset[] = "sig_w = " $image['img_width'];
        
$updateset[] = "sig_h = " $image['img_height']; 
        
$updateset[] = "signature = " sqlesc("[img]".$signature."[/img]\n");
        }
        
$updateset[] = "signatures = '$signatures'";
        if (isset(
$_POST["info"]) && (($info $_POST["info"]) != $CURUSER["info"])){
        
$updateset[] = "info = " sqlesc($info);
        }
        
$action "signature";
        } 

so.. why it's not working..?


All times are GMT +2. The time now is 12:05.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.