Please login or register.

Login with username, password and session length
Advanced search  

News:

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 8890 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
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]
unset($link);
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 »
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs