Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Jump.inc.php - Using a function to call a function.

Quote Reply
Jump.inc.php - Using a function to call a function.
Hi,

The handle(); function in Jump.inc.php simply calls _plg_jump(); which is the only other function in that script. Why not just move the contents from _plg_jump() into handle(); ?

All that you are doing is making the script run slightly slower -> For the sake of having the function have a different name?


Cheers,
Michael Bray
Quote Reply
Re: [Michael_Bray] Jump.inc.php - Using a function to call a function. In reply to
I suppose we could do that. I did it that way because I created the frontend with the possibility of plugin support in the future.


Adrian
Quote Reply
Re: [brewt] Jump.inc.php - Using a function to call a function. In reply to
How would the plug ins work? I'd like to make plug ins for this, but I don't see how they can install without changing code in all the handle()'s.


Cheers,
Michael Bray
Quote Reply
Re: [Michael_Bray] Jump.inc.php - Using a function to call a function. In reply to
Well, if we do end up implementing plugin support for it, it would probably be like how the current Gossamer Threads plugin system works. But then again, I'm not too sure if it will, since I haven't really looked at how the current system is working (the code anyways), and I haven't written any plugins for any of our other applications yet. One of my todo's in my spare time (which I have none for quite a while Wink).


Adrian
Quote Reply
Re: [brewt] Jump.inc.php - Using a function to call a function. In reply to
I can't read the perl code in Links SQL. Been too long since I did any Perl. I guess it just loops through a list of sub routines or something and runs them.


Cheers,
Michael Bray
Quote Reply
Re: [brewt] Jump.inc.php - Using a function to call a function. In reply to
When you talk about plugin support for the PHP front end, are you talking about the regular Links SQL plugin system or something specific to the templates? I'm hoping its the latter, otherwise getting the plugin functionality would require hacking away at the scripts, which is a rather intimidating prospect with the size of 2.x...

I fear you (and Alex's references to the same) might mean the former, however, as the plugins area of the 2.1 beta version is turned off.

Dan