|
|
#1 |
|
Senior Member
Join Date: Jan 2008
Posts: 124
Rep Power: 8 ![]() |
Greetings all,
Have 68C up and running... Have an advertiser that placed an ad....but his URL link is NOT clickable. How do we do this? I am under Listing Packages, where it says to "Allow External URL"....that is checked off. But it is NOT showing an external URL, just the URL without the clickable link. Thanks.
__________________
~~ Lorren Any advice is always appreciated. ![]() v 3.1.10 Developer; v 4 Developer Last edited by Soleiltan; 02-08-2008 at 05:15 PM. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jan 2008
Posts: 124
Rep Power: 8 ![]() |
__________________
~~ Lorren Any advice is always appreciated. ![]() v 3.1.10 Developer; v 4 Developer |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2006
Posts: 129
Rep Power: 14 ![]() |
I edited to "url" portion in the viewlisting.tpl page to the code below and it made the user's entry a working hyperlink without having them type in the 'http://" part:
<a href="http://{$url|linkurl:45}">{$url|linkurl:45} |
|
|
|
|
|
#4 |
|
PHP Mechanic
Join Date: Nov 2007
Posts: 118
Rep Power: 9 ![]() |
You should probably put in a test to see if the url already starts with http://, otherwise you'll have the same problem if someone does prepend their url with that.
Something like: Code:
{if preg_match('#^http://#',$url) }
<a href="{$url|linkurl:45}">{$url|linkurl:45}</a>
{else}
<a href="http://{$url|linkurl:45}">{$url|linkurl:45}</a>
{/if}
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2007
Posts: 123
Rep Power: 12 ![]() |
Hi Hugh,
That's close, but the first one ended up with a nested url. Here's the code I used based on yours: Code:
{if preg_match('#^http://#',$url) }
{$url|linkurl:45}
{else}
<a href="http://{$url|linkurl:45}">http://{$url|linkurl:45}</a>
{/if}
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Purchase A Membership link | Kelly Olsen | v3.1 Questions & Support | 1 | 09-28-2007 03:14 PM |
| Anchor text link in viewlisting.tpl | SkGold | v3.1 Modules & Modifications | 4 | 04-10-2007 11:05 PM |
| Display link in only 2 cats | midi510 | v3.1 Modules & Modifications | 8 | 04-09-2007 05:20 PM |
| ad is about to expire link | garysmith | v3.1 Questions & Support | 3 | 06-14-2006 06:27 PM |
| Newsletter unsubscribe link does not work V3.0.15 | newone | v3.0 Questions & Support | 5 | 05-01-2006 01:39 PM |