Previous Thread
Next Thread
Print Thread
Rate Thread
#208132 02/06/2001 8:06 PM
Joined: Feb 2000
Posts: 2
User
User
Offline
Joined: Feb 2000
Posts: 2
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.


Sponsored Links
krynn #208133 02/06/2001 8:18 PM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
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

D_Wolfwood #208134 02/08/2001 2:22 PM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
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


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)