UBB.Dev
Posted By: Eric Kempter HTTPS: - 02/07/2001 3:06 AM
Folks,

I need to place a link in a post that must start with https://.
The link needs to be in the post with a description like:
<A HREF="https://www.dot.com">description</A>

The description doesn't work because it always appends the link with http: and I have to have https:. Some one must have done this. Please help. Thanks.

Posted By: MTO Re: HTTPS: - 02/07/2001 3:18 AM
Try inserting this into main.inc.php:
    // ---------------------------
// Convert ssl markup -> html
$Body = eregi_replace("\[ssl\]www([^\[]*)\[/ssl\]","<a href="https://\\1" target="_new">https://\\1</a>",$Body);
$Body = eregi_replace("\[ssl\]([^\[]*)\[/ssl\]","<a href="\\1" target="_new">\\1</a>",$Body);
$Body = preg_replace("/\[ssl=https:\/\/(.*)\]([^\[]*)\[\/ssl\]/","<a href="https://\\1" target="_new">\\2</a>",$Body);
$Body = preg_replace("/\[ssl=(.*)\]([^\[]*)\[\/ssl\]/","<a href="https://\\1" target="_new">\\2</a>",$Body);

// ---------------------------
// Convert ssl markup -> html
$Body = preg_replace("/<a href="https:\/\/(.*?)" target="_new">(.*?)<\/a>/","[ssl=\\1]\\2[/ssl]",$Body);


Then just use "ssl" instead of "url" for secure links . [ssl=https://...] and so on...

This is untested.


Mateo Byler
CruceDeCaminos.com
Posted By: MTO Re: HTTPS: - 02/08/2001 9:22 PM
Uh, you dont need that, it works without it... didnt look at the code to carefully. You can already do it without hacking it, its part of the program.

Mateo Byler
CruceDeCaminos.com
© UBB.Developers