Support Forums

Old 02-08-2008, 05:10 PM   #1
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Lightbulb URL link in AD

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.
Soleiltan is offline   Reply With Quote
Old 02-08-2008, 05:17 PM   #2
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Default Answered my own question

The key here is that the advertiser has to enter the WHOLE URL....ie.

http://blahblah.com

__________________
~~ Lorren

Any advice is always appreciated.

v 3.1.10 Developer; v 4 Developer
Soleiltan is offline   Reply With Quote
Old 02-09-2008, 12:22 AM   #3
Senior Member
 
Join Date: Aug 2006
Posts: 129
Rep Power: 14
spaceboy is on a distinguished road
Default

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}
__________________
Lindsay

developer v3.1.5 and v4
abletrader.com
spaceboy is offline   Reply With Quote
Old 02-09-2008, 03:14 PM   #4
PHP Mechanic
 
 
Join Date: Nov 2007
Posts: 118
Rep Power: 9
cheesegrits has a spectacular aura about
Default

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}
-- hugh
cheesegrits is offline   Reply With Quote
Old 02-10-2008, 05:13 PM   #5
Senior Member
 
Join Date: Jan 2007
Posts: 123
Rep Power: 12
HotAir is on a distinguished road
Default

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
HotAir is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:02 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0