Please login or register.

Login with username, password and session length
Advanced search  


Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: PATCHES - Admin's Extra VIEW links for 'ALL' and 'Page Only'  (Read 5271 times)


  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
PATCHES - Admin's Extra VIEW links for 'ALL' and 'Page Only'
« on: April 13, 2010, 10:01:43 pm »

UPDATE: The patches published here on April 13, 2010 caused more complications than they were worth so they have been replaced with a simpler solution. This simpler patch has been included in the current Official sNews 1.7 Download as since the end of May, 2010.

The Problem:

We recently discovered a bug in the Administration panel for the default sNews 1.7 package.
When we click the VIEW link for an Extra assigned to 'ALL' or 'PAGES' groups, we get an "Error 404" page - because the link is missing a category sef title in the URL. This does not occur with Extras assigned to 'Uncategorized' or those assigned to other categories and sub-categories.

The quickest way to fix this is to remove the VIEW link altogether for extras listed within the 'ALL' or 'PAGES' groups.

Search your snews.php file - deep down in the // ARTICLES - ADMIN LIST function - for these strings:
Code: [Select]

echo '<p>'.$order_input.'<strong title="'.date(s('date_format'), strtotime($r['date'])).'">
.$r['title'].'</strong> '.l('divider').'
<a href="'
._SITE.$row['seftitle'].'/'.$r['seftitle'].'/">'.l('view').'</a> ';


and replace them with the following (excluding the php-tags):
Code: [Select]

echo '<p>'.$order_input.'<strong title="'.date(s('date_format'), strtotime($r['date'])).'">
.$r['title'].'</strong> ';


Why did we remove the VIEW link for these 2 extras groups?
I did manage to make them work properly but doing so required far too many modifications to make it work.
It also required some changes to the way extras were handled in drop-down choices.
During the testing period, those changes were found to cause greater confusion for those users who were already used to handling the way they are now.
« Last Edit: October 15, 2010, 06:40:42 pm by Keyrocks »
Do it now... later may not come.
sNews 1.6 MESU | sNews 1.6 MEMU