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: Still time for a few enhancements ?  (Read 6922 times)

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Still time for a few enhancements ?
« on: April 07, 2008, 01:56:17 PM »

Update : status about these change as of 1.7 final
Hello

Great work!

I know sn17 is already an rc but maybe it is not too late to ask for a few enhancements?

Here is what I'd like to see in final 1.7 :

  • remove references to "index.php" in snews.php, eg replace urls like _SITE."index.php?action=xxx" by _SITE."?action=xxx
    The reason for that is to dissociate the configuration in htacces from the code in snews.php.
    Done in RC2+
  • revome that ugly error_reporting(0); at top of snews.php - I hnow it's not an easy job but it would greatly help developing mods ; in RC2, error_reporting(E_ALL ^ E_NOTICE) is available (does not produce php message), which is much better...
  • rename js function "toggle" to something like "snews_toggle" to avoid name collision with another js toolkit
  • replace isset($_SESSION[_SITE.'Logged_In']) && $_SESSION[_SITE.'Logged_In'] == token() with a new function isadmin() ; Done in RC2
  • provide a sql file to set the database up instead of a readme ; Done in RC2

And, finally, a question: do you plan to provide some guidance to migrate existing sites from sn16 to sn17 (migration is not a trivial task) ? ; Done in RC2

Thanks
« Last Edit: October 31, 2008, 08:57:00 PM by skian »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Still time for a few enhancements ?
« Reply #1 on: April 07, 2008, 02:08:22 PM »

Regarding migration, that is a likely possibility since 1.6 table structure was added to, plus extra table, plus afew other bits, so a migration script should be possible - I think...

re: isadmin()
That exact sequence of code only occurs 3 times, but is still a valid thought - there are more places that just test for $_SESSION[_SITE.'Logged_In'] == token(). having something like  if (isadmin()==true){blah blah} may be good.

re: error_reporting(0)
I always comment that out, and replace with
error_reporting(E_ALL ^ E_NOTICE);
for mod development

Logged
Of all the things I have lost, it is my mind that I miss the most.

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: Still time for a few enhancements ?
« Reply #2 on: April 07, 2008, 02:17:35 PM »

re: isadmin()
That exact sequence of code only occurs 3 times, but is still a valid thought

well, I don't want to enter an endless debate on this minor issue but
Code: [Select]
grep -c Logged_In snews.php
18

and on my modified version :
Code: [Select]
grep -c Logged_In snews_mod.php
2
Logged

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
Re: Still time for a few enhancements ?
« Reply #3 on: April 07, 2008, 02:19:44 PM »

Hehe, not knowing crap what you're talking about, but going from 18 (whatever) to 2 (whatever) seems like something has been enhanced ;) Only wish I understood what, hehe
Logged
"It's only dead fish that goes with the flow... "
Updated

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Still time for a few enhancements ?
« Reply #4 on: April 07, 2008, 02:53:32 PM »


well, I don't want to enter an endless debate on this minor issue but

no debate...
the exact code you quoted earlier occurs only 3 times.
but as you noted, logged_in occurs many more times than that... but in my way, I said much the same ;)
... which is why I continued to blather on in that section of my post  ;)

I know that others are watching these posts, and will act one way or other.
I happen to like the suggestion.
Logged
Of all the things I have lost, it is my mind that I miss the most.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Still time for a few enhancements ?
« Reply #5 on: October 31, 2008, 08:27:37 PM »

Update : status about these change as of RC2
Hello

Great work!

I know sn17 is already an rc but maybe it is not too late to ask for a few enhancements?

Here is what I'd like to see in final 1.7 :

  • remove references to "index.php" in snews.php, eg replace urls like _SITE."index.php?action=xxx" by _SITE."?action=xxx
    The reason for that is to dissociate the configuration in htacces from the code in snews.php.
  • revome that ugly error_reporting(0); at top of snews.php - I hnow it's not an easy job but it would greatly help developing mods ; in RC2, the line is now error_reporting(E_ALL ^ E_NOTICE) which is much better...
  • rename js function "toggle" to something like "snews_toggle" to avoid name collision with another js toolkit
  • replace isset($_SESSION[_SITE.'Logged_In']) && $_SESSION[_SITE.'Logged_In'] == token() with a new function isadmin() ; Done in RC2
  • provide a sql file to set the database up instead of a readme ; Done in RC2

And, finally, a question: do you plan to provide some guidance to migrate existing sites from sn16 to sn17 (migration is not a trivial task) ? ; Done in RC2

Thanks

both versions of error_reporting is in final release, commented...
This is to allow any minor errors to be 'masked' until owner can get them fixed.
(obviously, if there is a major f@%^up on the site, the site won't operate)
I believe we have also managed to remove reference to index.php.
js toggle slipped by -- valid request -- sorry :(
Logged
Of all the things I have lost, it is my mind that I miss the most.