Page 1 of 1

News hack

Posted: Thu Oct 02, 2008 3:20 pm
by arthy
How to fix news $return_url from <a href ... to http://... :

Open file modules/action.detail.php and search for

Code: Select all

$return_url = $this->CreateReturnLink($id, isset($params['origid'])?$params['origid']:$returnid, $this->lang('news_return'));
...replace it with:

Code: Select all

$return_url = $this->CreateReturnLink($id, isset($params['origid'])?$params['origid']:$returnid, $this->lang('news_return'), array(), true);
Now you can use/display return link as you wish. An example:

Code: Select all

<style>
div.newshr {
  margin-top: 5px;
  float: none;
  background: url(images/hr.gif) 0% 55% repeat-x;
}

a.newsback {
  text-decoration: none;
}

span.nbtext {
  background-color: #fff;
}
</style>

<p>
    <a class="newsback" href="{$return_url}">
        <div class="newshr">       <span class="nbtext"> Back </span></div>
    </a>
</p>
hr.gif attached.