This old forum is now only available for consultation/read. User accounts on this old website are blocked.
Please create a new account on and use the new forum
Apologies for this perturbation and thank you for your understanding!
Welcome, Guest

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

TOPIC: Remove domain from url?

Remove domain from url? 4 years, 11 months ago #1

  • extension
  • ( Banned )
  • Banned
  • Posts: 280

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:
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):

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" />');?>
<?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 = '';

$url = parse_url($string);

// Ditch the 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
I really need help here.
  • Page:
  • 1
Time to create page: 0.13 seconds