Welcome, Guest
Username Password: Remember me

external links plugin (automatic redirect after a few seconds)
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: external links plugin (automatic redirect after a few seconds)

external links plugin (automatic redirect after a few seconds) 7 months, 1 week ago #19471

Hi,

I would like to know if is possible to redirect automaticly to the external page after showing the article.

I like the redirect to the article where it is possible to show a short message and I am sure going to use it. But I would be happy when showing the page for like 3 seconds and the visitor would be redirected to the external website after those 3 seconds.

Could you please help me with this?

Many thanks!!

Lesley

Re: external links plugin (automatic redirect after a few seconds) 7 months, 1 week ago #19495

Hi.

In external_links.php replace
		if (isset($article->id) && $article->id == $id && JRequest::getVar('url'))
$article->text .= '<p align="center"><a href="'. JRequest::getVar('url').'" rel="nofollow">'.$this->params->def("add").'</a></p>';
 
// by
 
if (isset($article->id) && $article->id == $id && JRequest::getVar('url')) {
$article->text .= '<p align="center"><a href="'. JRequest::getVar('url').'" rel="nofollow">'.$this->params->def("add").'</a></p>';
$article->text .= '<script type="text/javascript">setTimeout(function(){location="'.JRequest::getVar('url').'"}, 3000);</script>';
}
  • JoniJnm
  • OFFLINE
  • Administrador
  • Posts: 4297
  • Karma: 148
The following user(s) said Thank You: LesleyAaij

Re: external links plugin (automatic redirect after a few seconds) 7 months, 1 week ago #19499

Hola JoniJnm,

Muchisimas gracias!
  • Page:
  • 1
Time to create page: 0.28 seconds