On Fri, 31 August 2001, Paul Gillingwater wrote:
> I don't really knpw much about snippets -- how should we go about making
> a "snippetized library?"   Do you have a URL you can point to?

There's the docs, but really it's pretty simple.  Snippets are just a way
to create a library of functions.  Create a snippet dir and a snippet using
the admin interface (the PHP code still has to be surrounded by "<?" and "?>").

Then put:

mgd_include_snippet( "/the/path/to/your/snippet" );

at the beginning of your code (where you would normally put a PHP "include"
or "require").

Now you can use the classes or functions defined in your snippet.  Really it's
identical to including a PHP file, but this way it's all nice and integrated
with the database, so you can distribute it using repligard.

... Ami.

.. .  .   .    .     .      .       .        
Nemein Solutions                        www.nemein.com
Midgard Developer             www.midgard-project.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to