Please login or register.

Login with username, password and session length
Advanced search  

News:

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

Author Topic: [Patch] the $text variable in sNews  (Read 1682 times)

henrich

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 381
  • Passion for quality and excellence!
    • My personal blog and portofolio
[Patch] the $text variable in sNews
« on: February 08, 2008, 07:31:24 am »

Hi,

I have observed that in sNews the $text variable is not used correctly in all functions. This can be very important expecially in cases when the sNews site owner is using other characters than english, and even if he has installed codetwist's "generate readable non-english titles" he can have some problems also.

So let's clean our code, find and change the:

Code: [Select]
$text = $r['text'];
into:

Quote
$text = stripslashes($r['text']);

in the following functions:

center()
search_keywords($word)
rss_contents($rss_item, $artSEF='')


Also, find in function rss_contents($rss_item, $artSEF='') the next line:

Code: [Select]
$text = $r['comment'];
and change into:

Quote
$text = stripslashes($r['comment']);

Find and change:

Code: [Select]
$title = $r['title'];
into:

Quote
$title = stripslashes($r['title']);

in the functions:

pages()
center()
archive()
search_keywords($word)
rss_contents($rss_item, $artSEF='')


NOTE: Some of this lines are already changed, but some of them not for sure, good luck!  :)
Logged
By(e) Henrich :)
------------------------------
IT related blog