Show actual URL in phpMyDirectory

Just making a quick note of this here for future reference. If you use phpMyDirectory (v1.x) and want advertisers to benefit from a direct / plain link to their web site (rather than a redirect through the script) then you need to do the following (at your own risk, etc. etc).

In listing.php add the lines in red

} else {
if (MOD_REWRITE) {
$template_content->set('www_url',BASE_URL.'/out-'.$listing['id'].'.html');
$template_content->set('www_url_full',$listing['www']);
} else {
$template_content->set('www_url',BASE_URL.'/listing_out.php?id='.$listing['id']);
$template_content->set('www_url_full',$listing['www']);
}
}

And then place in listing_default.tpl

< ?php echo $www_url_full;?> (remove space before ?, did that to show in blogger)

Thanks to 'Anneliese-PMD' on their forums for sharing that.

Comments

Ant said…
Thank you for this!...was looking around the forums and couldn't find anything about adding the full URL.
Cheers!

Popular

PayPal UK telephone number

YUM - Repository base is listed more than once

"PC Not Listed" XBox 360 - Solution

Including random number (timestamp) in vBulletin

Hiding Thunderbird "Sending Messages" dialogue