You are not logged in! If you have not registered yet then click here to join the community!

TOLRA Community Forums


Go Back   TOLRA Community Forums > TOLRA Products (PHP Scripts) > Web Directory Script > Directory Script Mods

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 08-07-2009, 11:35 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
Code:
<?php
if(empty($data['url'])) {
$myurl = '';
} else {
$u = parse_url($data['url']);
$myurl = '<a href="' . $data['url'] . '">' . $u['host'] . '</a>';
}
echo $myurl;
?>
Give the above a shot and see how it goes.

Last edited by Paul; 09-07-2009 at 08:59 PM.
Reply With Quote
Sponsored Links
  #12  
Old 09-07-2009, 12:24 PM
John John is offline
Senior Member
 
Join Date: Jul 2006
Location: Brisbane, Australia
Posts: 125
Blank screen (bit like my mind when trying to figure out what is missing).
Something missing somewhere but not sure what, played around a bit, but no go.

(Hope the rain has stopped)
Reply With Quote
  #13  
Old 09-07-2009, 09:03 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
I've updated the code, think that should be better.

The rain has stopped just now it's iffy internet connection, mobile working
Reply With Quote
  #14  
Old 10-07-2009, 12:34 PM
John John is offline
Senior Member
 
Join Date: Jul 2006
Location: Brisbane, Australia
Posts: 125
Paul, you're such a clever dude!
Works perfect: see 2CV forums for example.

That's a ray of sunshine, at least for me!

Implementing that code means you can easily have long URLs and you can still show them on the page (Could be useful for affililiate links for some people ... )
Reply With Quote
  #15  
Old 22-08-2009, 10:38 AM
Pnop Pnop is offline
Junior Member
 
Join Date: Aug 2009
Posts: 13
Not quite following this one? I understand the removal of http:// but.

Will this allow clients to add their listing without a domain name? I need a mod that allows listings with or witout a domain name as I want to run a web directory and business finder directory together.

Getting there now though!
Reply With Quote
  #16  
Old 22-08-2009, 10:44 AM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
No this mod does not allow adding without a URL see http://forums.tolranet.com/showthrea...t=optional+url for how to make URLs optional on listings.

This one just outputs the domain without the http:// bit.
Reply With Quote
Reply

Bookmarks

Tags
domain, tag

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

Forum Jump


All times are GMT +1. The time now is 07:24 AM.