Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   HTTPS (http://www.bvlist.com/showthread.php?t=6394)

cherwonk 30th April 2011 14:54

HTTPS
 
working on our next tracker , newer 09 source. I've got a lot of addons from Bigjoos sources.

I went and add the https option in the usercp , its working real well with one exception....
when you upload to the bitbucket , the links return as https( of course) , well site doesnt like to display the images this way.

I can view the directly and they show up when I click 'View My Images'.
They just dont show in the forums or shouts???

Any ideas?

Thanks in advance

Bigjoos 30th April 2011 15:54

Aye cherwonk seen this bugger happening so i'll do some testing today and will post back : )

cherwonk 3rd May 2011 22:32

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);
    }



All times are GMT +2. The time now is 02:25.

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