Notice

This old forum is now only available for consultation/read. User accounts on this old website are blocked.
Please create a new account on seblod.com and use the new forum http://www.seblod.com/community/forums.
Apologies for this perturbation and thank you for your understanding!
Welcome, Guest
Username Password: Remember me

Remove domain from url?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Remove domain from url?

Remove domain from url? 2 years, 9 months ago #1

  • extension
  • ( Banned )
  • OFFLINE
  • Banned
  • Posts: 280
Hi,

I have constructed this Mouse-over -zoom link. It works perfect, but the last part (the destination when clicking) also include our own domain name like this: www.minfest.dk/www.kokken-jomfruen.dk
The "Mouse-over -zoom" plugin use this for the image path, therefore it also appears in the URL link.

And now to my problem. How get i rid of our domain name in the URL (teh red part): http://www.minfest.dk/www.kokken-jomfruen.dk

Here is the part of my template:

<?php for ( $i = 0, $n = sizeof( $jSeblod->indst_sponsorer )-1; $i < $n; $i++ ) { ?>
<div class="ED5-<?php echo $n ?>">
<?php echo JText::_('<img class="mouseoverzoom" src="/images/stories/sponsor/');?>
<?php echo $jSeblod->indst_sponsorer[$i]['sponsor_billede']->value; ?>
<?php echo JText::_(',');?><?php echo $jSeblod->indst_sponsorer[$i]['link_sponsor']->value; ?>
<?php echo JText::_(',_blank" />');?>
</div>
<?php } ?></div>

I found a similar question to mine but i can't figure out how to place it in my template.
The answer:
$string = 'www.example.com/username?refid=22';

$url = parse_url($string);

// Ditch the query.
unset($url['query']);

echo array_shift($url) . '://' . implode($url);

I can't figure out how to construct it and place it correct in my template.

Best regards
Boris
I really need help here.
  • Page:
  • 1
Time to create page: 0.12 seconds