Hello

September 07, 2010, 05:19:04 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
What sNews Is: - sNews is a simple, basic, customizable CMS tool suitable for developers with beginner-to-advanced PHP skills. It is also useful to have a good working knowledge of how to work with, set up and manage MySQL databases. sNews is not - geared towards the end-user who knows little or nothing about building and developing PHP-MySQL based websites.
News: Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4
  Print  
Author Topic: [MOD] Performance booster - get_id() on steroids (v.1.6, 1.5.31)  (Read 25830 times)
Zucye
Sr. Member
****

Karma: 5
Posts: 354



WWW
« Reply #15 on: May 29, 2007, 07:41:00 AM »

Love this one!  The page had never loaded so fast.  :cool:
Logged

We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). Smiley
Armen
Sr. Member
****

Karma: 41
Posts: 334



WWW
« Reply #16 on: May 30, 2007, 07:24:22 PM »

A MUST, to be included into the sNews pack... A+
Logged

Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.
Ken Dahlin
sNews Dude
Full Member
*****

Karma: 30
Posts: 142



WWW
« Reply #17 on: May 31, 2007, 01:23:07 AM »

Very good. Thank you!
Logged

Patric Ahlqvist
Nobodys perfect, but Im pretty effing close
Administrator
ULTIMATE member
******

Karma: 65
Posts: 4916


“I'm a self-made man and worships my creator.”


WWW
« Reply #18 on: June 04, 2007, 02:51:27 PM »

Whohaaa, Codie... Now I've come around to try this one out, and man... It is some difference. Really awsome. Thanks.
Logged

My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs
Keyrocks
Doug
Administrator
ULTIMATE member
******

Karma: 419
Posts: 5568


Semantically Challenged


WWW
« Reply #19 on: June 04, 2007, 10:10:35 PM »

Just added it to my 1.6.0 vanilla install and wanted to report the same as everyone else - zoom, zoom, zoom! Smiley
Logged

Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pavel
Newbie
*

Karma: 0
Posts: 30


« Reply #20 on: June 05, 2007, 12:28:30 AM »

I have the same problem as Amak..  Sad  
codetwist your mod is super! can you please post working sNews with your mod and with subpages mod?
Logged
Patric Ahlqvist
Nobodys perfect, but Im pretty effing close
Administrator
ULTIMATE member
******

Karma: 65
Posts: 4916


“I'm a self-made man and worships my creator.”


WWW
« Reply #21 on: June 05, 2007, 08:56:07 AM »

I will have to comment upon this yet again, hehe... I'm a speed freak, and now I've updated all "my" sites with this, and it simply rocks... what a different. Even I do have to say that this should go into core Wink
Logged

My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs
codetwist
Hero Member
*****

Karma: 50
Posts: 955


« Reply #22 on: June 05, 2007, 04:21:30 PM »

@ Pavel : I'm not using any special subpages mod; all I know that this works without problems for regular sNews with built-in paginator without problems. After Amaks post I tested this again myself as well as few other fellows here confirmed that there seems no trouble with default sNews nor its paginator. Only potential source of problems might be some fancy subpage symbols used in urls by either some subpage MOD or by configuration of paginator prefix. If that's the case then corresponding validation rules (restrictions described in code I believe) in this get_id() MOD should be reviewed and amended as needed.
Logged
codetwist
Hero Member
*****

Karma: 50
Posts: 955


« Reply #23 on: June 05, 2007, 05:00:50 PM »

@ Pavel and other subpage (subarticle) MOD users

Ok, looked into subpages MOD - it has added one more line into original get_id():
Code:
if (isset($url['2'])) {$get_id['subtitle'] = clean(cleanXSS($url['2']));}
For that one to be supported by performance booster version of get_id() You might need to add following code snippet into function getGetParm( ) (right before code line that says default : ):
Code:
     case 'subtitle' :
         if ( $url[2] ) {
            $parmValue = cleanGetSef( $url[2] );
         }
         break;
Beware, that I haven't tested this one Wink
Logged
Patric Ahlqvist
Nobodys perfect, but Im pretty effing close
Administrator
ULTIMATE member
******

Karma: 65
Posts: 4916


“I'm a self-made man and worships my creator.”


WWW
« Reply #24 on: June 05, 2007, 05:41:09 PM »

I've tested it and it runs smoothly...
Logged

My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs
Pavel
Newbie
*

Karma: 0
Posts: 30


« Reply #25 on: June 05, 2007, 10:41:36 PM »

Works good, thanks!
Logged
Elvino
Newbie
*

Karma: 0
Posts: 45



WWW
« Reply #26 on: June 06, 2007, 09:48:09 PM »

The mod for sitemap xml  http://www.solucija.com/forum/viewtopic.php?id=3492   not work
and not work the error 404 with extension file on the url .

example:
http://snews.vietbee.net/demos/new_getid/bla-bla.php

http://snews.vietbee.net/demos/org_getid/bla-bla.php
Logged

codetwist
Hero Member
*****

Karma: 50
Posts: 955


« Reply #27 on: June 06, 2007, 10:06:15 PM »

Thanx, Elvino Smiley

For sitemap.xml first section that handles case 'category' might be improved like this:
Code:
     case 'category' :
         if ( $url[0] ) {
            $parmValue = ($url[0] == 'sitemap.xml') ? $url[0] : cleanGetSef( $url[0] );
         }
         break;
For voluntary missing file quick fix idea would be to enhance cleanGetSef() a little - like adding option to have a . (dot) in sef  string:
Code:
     // String presumed
      if (! preg_match('/^[a-z0-9\-_#\.]+$/', $inSef) ) {
         // $inSef is malformed - ignored completely
         $sef = false;
      }
      else {
         // $inSef is ok - only lower case ascii, '-', '_', '#' and '.' characters are included
         $sef = $inSef;
      }
Beware, not tested these fixes yet Wink
Logged
quaffapint
Newbie
*

Karma: 0
Posts: 14


« Reply #28 on: June 07, 2007, 03:53:42 AM »

I can validate the sitemap.xml fix works perfectly on 1.6 - thanks, codetwist  Smiley
Logged
piXelatedEmpire
MIA
Thread Moderator
ULTIMATE member
*****

Karma: 37
Posts: 1456


currently MIA


« Reply #29 on: June 12, 2007, 01:38:18 PM »

I've created a pretty heavily modded version of sNews1.6DE version and I have to say, this performance MOD of yours codie is awesome.  The performance difference is great!  Well done mate Wink
Logged

my apologies to the sNews crew, but I will be MIA for the forseeable future
Pages: 1 [2] 3 4
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!