294111
Anonymous
Hacked the REF Hack :o)
  • 2002/2/27 10:17

  • Anonymous

  • Posts: 0

  • Since:


Liked the idea of the ref hack to make the article into keywords for the meta tags, but hated the way it actually made the keywords... so i hacked it at my turn

No more words with more than 3chars, no more html entities in the keywords, and most importantly: no keyword doubles... and all keywords are made uppercase 1st letter

/* article page output */
global $bodytext;
$htmlless strip_tags($metatitle.",".$bodytext);
$search = array(
        
"/>/i",
        
"/</i",
        
"/&/i",
        
"/"/i",
        
"/'/i",
        
"/[^-w']/i",
        
"/s+/",
        
"/ (.{1,3}),/i",
        
"/(, )$/"
        
);
$replace = array(
        
">",
        
"<",
        
"&",
        
""",
        "'",
        " ",
        ", ",
        "",
        ""
        );
$metatags = preg_replace($search, $replace, $htmlless);
$metatags = explode(", ",$metatags);
$metatags = array_unique($metatags);
$metatags = implode(", ",$metatags);
echo "n";
}
else
{
echo "n";
}
echo "slogan']."">n";
echo "version']."">nnn";
echo "n";
// Fin - Hack référencement


Feel free to integrate it into the actual ref hack

[ Edited by Half-Dead on 2002/2/27 11:26:00 ]



294112
ZPC
Re: This page loaded in x seconds
  • 2002/2/20 19:01

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


yes..it's not about the transfer of the page from the server to your browser, it's the time that took the server to parse all the php and sql command and print-out the output...

the time depends on things like server hardware (CPU, memory), operating system, apache+php+sql setup etc...



294113
nocjock
Re: This page loaded in x seconds
  • 2002/2/20 18:49

  • nocjock

  • Just popping in

  • Posts: 19

  • Since: 2002/1/3 1


What kind of times are you all coming up with? Mine are always less than 1 second. This must be an internal server calculation, not necessarily time for actual page display, which is misleading to someone looking for response times to display, unless you work in the marketing department.



294114
AndyC
Re: This page loaded in x seconds
  • 2002/2/20 17:59

  • AndyC

  • Just popping in

  • Posts: 16

  • Since: 2002/1/10


My Bad...

It works now. Thanks.



294115
ZPC
Re: This page loaded in x seconds
  • 2002/2/20 17:47

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


are you sure, that you uncommented the line in header.php ??? it's the first line of the real code (below the standard file header)...



294116
AndyC
Re: This page loaded in x seconds
  • 2002/2/20 17:34

  • AndyC

  • Just popping in

  • Posts: 16

  • Since: 2002/1/10


it always takes 0 seconds on my site.



294117
ZPC
Re: This page loaded in x seconds
  • 2002/2/20 16:37

  • ZPC

  • Official Support Member

  • Posts: 76

  • Since: 2002/1/16


yeah...the function is hidden in include/functions.php (line 589) and as well as in footer.php it has to be uncommented in header.php which are both in root directory.

Then you will se what it takes to produce one page.

I would like to point out, that this text is not translated in regular language files !!!




294118
lykoszine
Re: This page loaded in x seconds
  • 2002/2/20 14:36

  • lykoszine

  • Module Developer

  • Posts: 244

  • Since: 2002/1/2 2


The code you mentioned is in footer.php, around line 40 I think... It just needs uncommenting...

I have no idea how it is set up though, whether it is initialised in the header or what...

Does give me a general idea though...





294119
Amgine
Re: This page loaded in x seconds
  • 2002/2/20 4:26

  • Amgine

  • Just popping in

  • Posts: 3

  • Since: 2002/1/5 1


This would need ss_timing_start() earlier - like in the header, or even in a script that was called earliest - before db queries etc.

And you would have to find the actual functions - I am not sure that these are PHP 'builtins'.

But it is a start - and the sort of thing embedded in XOOPS for debugging, as I referred to earlier.



294120
bob
Re: This page loaded in x seconds
  • 2002/2/20 1:46

  • bob

  • Just popping in

  • Posts: 8

  • Since: 2002/1/9 1


here's the little script in the footer of many myphpnuke sites. i'm just a crude hacker, not a php programmer, so I can't tell if this gives you enough to work with...

echo "
\n";
ss_timing_stop();
$help = sprintf(translate("Page took %s seconds to load."),ss_timing_current());
echo "$help";
echo "
\n";
echo "
\n";







Login

Who's Online

640 user(s) are online (319 user(s) are browsing Support Forums)


Members: 0


Guests: 640


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits