News hack

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
arthy

News hack

Post 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.
Attachments
hr.gif
hr.gif (36 Bytes) Viewed 1367 times
Last edited by arthy on Thu Oct 02, 2008 3:40 pm, edited 1 time in total.
Post Reply

Return to “Tips and Tricks”