Edited by spear, 28 March 2006 - 06:19 PM.
Last 10 Referers Snippet
#1
Posted 27 March 2006 - 01:32 PM
#2
Posted 27 March 2006 - 02:56 PM
spear, on Mar 27 2006, 02:32 PM, said:
Please help
#3
Posted 27 March 2006 - 05:45 PM
#4
Posted 27 March 2006 - 06:40 PM
#5
Posted 27 March 2006 - 06:43 PM
1.) Whenever possible, take advantage of functions included in the Etomite API... This will not only serve to reduce the amount of code that you need to write but it will also allow such benefits as helpful debugging error code and "standardization"...
2.) Etomite scripts cannot include echo or print statements, nor any other unbuffered output functions... All outout must be concatenated onto an output variable, $output seems to be the standard, which is then returned to the caller for later insertion into the rendered page by the parser... Check existing snippets for more information on this method...
Example
$output = ""; $output .= "Etomite "; $output .= "Rocks...!!!"; return $output;
3.) Pay close attention to the use of both globals and superglobals as due to the fact that Etomite is a parser engine some of the logic that may work in stand-alone PHP scripts will not work within Etomite...
4.) When in doubt, ask...
#6
Posted 27 March 2006 - 06:47 PM
spear, on Mar 27 2006, 06:45 PM, said:
Currently, the documentation is available in several formats from this forum thread
There is a section on writing snippets that would have told you not to use echo, and how to generate output.
#7
Posted 27 March 2006 - 08:43 PM
Ok, forget this. If nobody need it, no problem.
#8
Posted 27 March 2006 - 11:13 PM
spear, on Mar 27 2006, 05:43 PM, said:
Ok, forget this. If nobody need it, no problem.
NUFF SAID...
#9
Posted 28 March 2006 - 08:05 AM
The file which has to be modified, referers.php, is only 15-20 lines big. Probably 10 minutes work. If you all here very busy, I am sorry, forget it and close this topic. If you have 10 minutes free time, please rewrite this file.
#10
Posted 28 March 2006 - 02:36 PM
spear, on Mar 28 2006, 05:05 AM, said:
The file which has to be modified, referers.php, is only 15-20 lines big. Probably 10 minutes work. If you all here very busy, I am sorry, forget it and close this topic. If you have 10 minutes free time, please rewrite this file.
$referers = $etomite->dbQuery("SELECT * FROM ".$etomite->db."log_referers ORDER BY id DESC LIMIT 10;");
$i = 0;
while($row = $etomite->fetchRow($referers)) {
$i++;
$output .= $i.".) ".$row['data']."<br />";
}
return $output;
#11
Posted 28 March 2006 - 06:17 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users










