Difference between revisions of "Extension talk:CurrentPages"

From Organic Design wiki
(The PayPal extension has example code for adding and using a new table)
(Another efficiency gain would be to store article ID's rather than text)
Line 1: Line 1:
The main functionality is all in the function called by ExtensionSetup. It's not very efficient because the file is read and written for every request and due to the large number of articles read over a 24 hour period, the file can get up to a 1 megabyte or so. The best way would be to create an additional database table to store the entries by. The [[Extension:PayPal.php|PayPal extension]] has example code for adding and using a new table.
+
The main functionality is all in the function called by ExtensionSetup. It's not very efficient because the file is read and written for every request and due to the large number of articles read over a 24 hour period, the file can get up to a 1 megabyte or so. The best way would be to create an additional database table to store the entries by. The [[Extension:PayPal.php|PayPal extension]] has example code for adding and using a new table. Another efficiency gain would be to store article ID's rather than text.
 
{{code|<php>
 
{{code|<php>
 
# Read the $egCurrentPagesData array from file
 
# Read the $egCurrentPagesData array from file

Revision as of 02:42, 25 May 2008

The main functionality is all in the function called by ExtensionSetup. It's not very efficient because the file is read and written for every request and due to the large number of articles read over a 24 hour period, the file can get up to a 1 megabyte or so. The best way would be to create an additional database table to store the entries by. The PayPal extension has example code for adding and using a new table. Another efficiency gain would be to store article ID's rather than text.