Thread: HTTPS
View Single Post
  #3  
Old 3rd May 2011, 22:32
cherwonk cherwonk is offline
Senior Member
 
Join Date: Mar 2008
Posts: 15
Default
after a little digging and playing , I found that
PHP Code:
 //--img     
    
if (stripos($s'[img') !== false) {      
    
$s preg_replace_callback("/\[img\](http:\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/i""scale"$s);
    
$s preg_replace_callback("/\[img=(http:\/\/[^\s'\"<>]+(\.(gif|jpg|png)))alt=\"\"\]/i""scale"$s);

    } 
in bbcode_functions
If changed to
PHP Code:
 //--img     
    
if (stripos($s'[img') !== false) {      
    
$s preg_replace_callback("/\[img\](https:\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/i""scale"$s);
    
$s preg_replace_callback("/\[img=(https:\/\/[^\s'\"<>]+(\.(gif|jpg|png)))alt=\"\"\]/i""scale"$s);

    } 
brings up the pictures . Now my question is do I add a complete copy ...only with the https or can we incorporate it into the original?

atm moment I do have both with no errors and images are displayed for both


got the answer from
Diablo999 , thanks


Code:
   //--img     
    if (stripos($s, '[img') !== false) {      
    $s = preg_replace_callback("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/i", "scale", $s);
    // [img=http://www/image.gif]
    $s = preg_replace_callback("/\[img=((http|https):\/\/[^\s'\"<>]+(\.(gif|jpg|png)))alt=\"\"\]/i", "scale", $s);
    }

Last edited by cherwonk; 5th May 2011 at 22:25.
Reply With Quote