The code-snippet stuff is only in 1.4 and later, but the idea is similar to
having directories (codesnippetdirs) and files (codesnippets)
basically we have done quite a bit of import work with midgard, the program
should not be too difficult, but It's a matter of finding time to write it.
function
a) readdir
makes the equivilant mgd_create_snippetdir("name") if the dir does not exist
loops through a folder,
calling it's self when it finds a subdir
calling readfile when it finds a php3 file.
b) readfile
opens the files,
does an ereg_replace on include to mgd_include_snippet
does a mgd_snippet_update if it the equiviant file exists
does a mgd_snippet_create if it is a new file.
c) the main part
calls read dir with the base directory to be imported.
we have some code which is similar which was used to parse html files into
content using either dreamweaver tags <!-- StartEditable "XXXX" --> .... <!--
EndEditable --> or manually generated ones like <!--STARTCONTENT-->.....
<!--ENDCONTENT-->
regards
alan
Erwin LEUBAZ <[EMAIL PROTECTED]> said:
> Hi Alan,
>
> Can you explain this procedure in details.
> If I have good understand, I must write a script that read all files from
> the
> TWIG directory and convert them into code snippets ( with the conversion
> "includes" -> "mgd_include_snippet").
> Is that right !!!
> But I don't know how to place the code directly in the Midgard database, and
> I don't use until now the basis of the "code snippets"
>
> Can you help me a little, Thank's
>
> Erwin
>
> > -----Original Message-----
> > From: Alan Knowles [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 18, 2000 8:48 AM
> > To: midgard
> > Subject: RE: [midgard] Implementation of web products
> >
> >
> > I was looking at putting TWIG into midgard
> > - the basic concept was to use code snippets and write an
> > import script that
> > ereg_replace'd all the includes to mgd_include_snippet (or
> > whatever the
> > function wass called.)
> >
> >
>
>
> --
> This is The Midgard Project's mailing list. For more information,
> please visit the project's web site at http://www.midgard-project.org
>
> To unsubscribe the list, send an empty email message to address
> [EMAIL PROTECTED]
>
>
>
--
Technical Director
Linux Center (HK) Ltd.
www.hklc.com
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]