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: [BUGFIX] Javascript echo fix.  (Read 7071 times)

George Antoniadis

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 479
[BUGFIX] Javascript echo fix.
« on: March 13, 2006, 05:49:54 PM »

Just to make this clear.
This is not a bug fix/mod or addon! :P

It's just something that there is no reason for it to the there...
and makes the final page 1kb less! :P hehehe

find:
Code: [Select]
function javascript_headers() {and add this as the next line:
Code: [Select]
if ($_SESSION['Logged_In'] == "True" ) {
then about 19 lines down, find the }; and make it }};

thats it! :P
this is just some javascript code for the admin that by mistake appeared when the admin was not logged in... ;)
nothing to be alarmed about.
Logged
How I feel like I'm starless, I'm ready to fade now.
And how I feel like I'm starless, I'm hopeless and greyed out.

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 163
    • domdelimar.com
[BUGFIX] Javascript echo fix.
« Reply #1 on: March 22, 2006, 05:53:21 PM »

Thanks analyzerx!

I wanted to include NOSCRIPT tags in snews.php so I make my site a bit more accessible, but then I stumbled on this post of yours and what you're saying is that Javascript is only used for admin purposes. I didn't know that. So your solution will do it also. And even shrink my pages' sizes!
Logged

albert

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 405
    • http://www.oswt.co.uk/
[BUGFIX] Javascript echo fix.
« Reply #2 on: March 26, 2006, 12:34:16 PM »

Hi Luka

Take note  of this code as this fix helped for CEO and cleaner back end code as well.

added to 360 site and made run little faster...



Albert


Quote from: analyzerx
Just to make this clear.
This is not a bug fix/mod or addon! :P

It's just something that there is no reason for it to the there...
and makes the final page 1kb less! :P hehehe

find:
Code: [Select]
function javascript_headers() {and add this as the next line:
Code: [Select]
if ($_SESSION['Logged_In'] == "True" ) {
then about 19 lines down, find the }; and make it }};

thats it! :P
this is just some javascript code for the admin that by mistake appeared when the admin was not logged in... ;)
nothing to be alarmed about.
Logged
Albert
http://snews.awddesign.co.uk/snews/ site: v1.3
http://snews.awddesign.co.uk/           site: v1.2 http://www.awddesign.co.uk/
“Putting together the largest collection of sNews 1.5 designs. Coming very soon :)

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.”
    • p-ahlqvist.com
[BUGFIX] Javascript echo fix.
« Reply #3 on: March 26, 2006, 12:45:20 PM »

Wohoo, made an hell of a differance at my site. Nice anal job, oups, sorry...nice job analyzerx ;)
Logged
"It's only dead fish that goes with the flow... "
Updated

George Antoniadis

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 479
[BUGFIX] Javascript echo fix.
« Reply #4 on: March 26, 2006, 10:49:35 PM »

Just to clear something up this code being there was my mistake in the first place and not luka's! ;)
so the blame is on me! :P
Logged
How I feel like I'm starless, I'm ready to fade now.
And how I feel like I'm starless, I'm hopeless and greyed out.

albert

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 405
    • http://www.oswt.co.uk/
[BUGFIX] Javascript echo fix.
« Reply #5 on: March 27, 2006, 01:13:49 AM »

OK analyzerx

we blame you!!!!!!!!!! :)

But does that mean that the download at solucija.com
v1.4 Last Update: 16. Feb, 2006 will get updated ?

Albert


Quote from: analyzerx
Just to clear something up this code being there was my mistake in the first place and not luka's! ;)
so the blame is on me! :P
Logged
Albert
http://snews.awddesign.co.uk/snews/ site: v1.3
http://snews.awddesign.co.uk/           site: v1.2 http://www.awddesign.co.uk/
“Putting together the largest collection of sNews 1.5 designs. Coming very soon :)