Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 29th March 2016, 00:25
codreanuionut codreanuionut is offline
Senior Member
 
Join Date: Sep 2015
Posts: 15
Default 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><br />{$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><br />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..
Reply With Quote
  #2  
Old 29th March 2016, 00:40
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
did ya edit takeprofedit.php file with the proper code?
did ya added the proper code into the sql ?
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
The Following User Says Thank You to DND For This Useful Post:
codreanuionut (29th March 2016)
  #3  
Old 29th March 2016, 01:01
codreanuionut codreanuionut is offline
Senior Member
 
Join Date: Sep 2015
Posts: 15
Default
Quote:
Originally Posted by DND View Post
did ya edit takeprofedit.php file with the proper code?
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..?

Last edited by codreanuionut; 29th March 2016 at 01:19. Reason: Because i can.
Reply With Quote
Reply

Tags
aplly , field , profile

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 10:51. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.