Please login or register.

Login with username, password and session length
Advanced search  


You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: FIX (double // on links to comments on extra pages)  (Read 9509 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
FIX (double // on links to comments on extra pages)
« on: March 26, 2009, 11:33:22 am »

UPDATE: This Patch is included in the current Official sNews 1.7 Download as of April 15, 2010.

Okidoki... first Popoll, then I experienced a double slash on comments posted onto a new created PAGE. In the new comments function the comments where shown with an extra slash, making it not work. Then a fix making that work produced a odd result to other normal article comments. The newly created PAGE name where added to them links.

How ever in order to get rid of these double slashes, making every thing work a'ok again, please do this:

First, as always, make a copy of existing snews.php. Then inside function new_comments() find:
Code: [Select]
$link = isset($r['xsef']) ? $r['xsef'].'/'.$r['csef'] : $r['csef'];
$link .= '/'.$r['asef'];

Exchange that for (or comment it out):
Code: [Select]
if (isset($r['xsef'])) { $link = $r['xsef'].'/'; }
if (isset($r['csef'])) { $link .= $r['csef'].'/'; }             
$link .= $r['asef'];

All hail to the Matt (mdj) for this as both Popi and I stood blindfoulded ready to get shot ;)

« Last Edit: April 20, 2010, 09:26:14 pm by Keyrocks »
"It's only dead fish that goes with the flow... "