[geeklog-devel] plugin_autoinstall - two more issues

Joe Mucchiello joe at ThrowingDice.com
Wed Oct 7 02:00:03 EDT 2009


At 10:11 AM 10/6/2009, Randy Kolenko wrote:
>Oh, I didn't miss that point... I'm just curious as to how returning 1
>line of sql for each step will alleviate deleting data a plugin dumps
>into another plugin's tables?

Plugins should not modify tables they don't own. I don't know of any 
plugins that do. You want to add info to a story or a forum post you 
create a table with a sid or (whatever the forum primary key is) as a 
foreign key and you maintain that table outside the main table.

>Forget groups, features etc.. I'm talking
>about relational data that can take numerous (read tens or hundreds) of
>lines of sql code to create related data.

All that related data should be in your plugin's tables that get 
wiped out in a single SQL call: DROP TABLE foo.

>Define "middle".  It could fail at the last step, or the first step --
>after numerous database queries, file system manouvers etc. have been
>done.

All of those places are the "middle". Middle is anywhere that is not 
before or after. What are you getting at?

>Well, perhaps its just me, but I think that functions.inc should not
>contain any DB calls outside of a function.

How about Bad Behavior? GUS? There are plenty of reasons for a DB 
call outside of a function on every single page load.

>That just plainly does not
>scale.

Who said it did? Fact is it happens. And if you really care about 
slimming down the page load profile then you should also be appalled 
that there are plugin_search functions and plugin_stats functions 
defined and wasting memory on every page hit whether or not the page 
is the search page or the stats page. Shouldn't functions.inc be 
minimal and only include stuff needed for the current page? It 
wouldn't be hard to do. But that's a tangent. I was saying the 
uninstall function should only exist when you are on the plugins page 
and could possibly press "uninstall".

>Perhaps the most straightforward approach would be to pull the
>autouninstall out to its own uninstall_defaults.php file and include
>that from functions.inc and the auto-install routine.  Now THAT is much
>safer all around.

Now you want to add another file that is always included from the 
functions.inc page rather than putting it in existing autoinstall 
file. Does this scale?

Wait, why am I talking about scale? What are we talking about? Oh, 
yeah, I wrote a different autoinstaller for plugins that's been in 
use in glFusion for a while. Use it. Don't use it. Look at it for 
ideas. Ignore it. Whatever. I have nothing else to really say about 
it. The code speaks for itself and it's GPL2.


----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com 




More information about the geeklog-devel mailing list