ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Help integrating external PHP scripts into ExpressionEngine

April 26, 2008 8:23am

Subscribe [3]
  • #1 / Apr 26, 2008 8:23am

    Giles Thurston

    34 posts

    Hi,

    I am in the process of converting an existing PHP site to run in Expression Engine.  The existing site is made up of a combination of static content and dynamic content generated from a MySQL database.

    The static content has now been converted and I am turning my attention to the database driven content.  I thought the easiest option would be to amend the existing php scripts to use the new look and feel, however as the scripts are running outside of EE, I don’t have access to the stylesheet and path functions/variables you have within EE. 

    I can use the include php command in replace of the EE embed function but seem unable to pass any parameters through.  I can hardcode the stylesheet links but as they include version numbers, if I was to update them in EE I would also need to update them in the php scripts

    Has anybody taken a similar approach to this before and if so can you provide help with the problems I am having?  Or am I completely barking up the wrong tree, and is there a much simpler approach I should be taking?

    cheers

    Giles

  • #2 / Apr 26, 2008 9:39am

    e-man

    1816 posts

    Not sure this is what you want to hear but wouldn’t it be more logical to somehow import your data into EE’s database so you can actually use all of EE’s functionality?
    You may want to consider hopping over to the CodeIgniter forums as well, some extremely knowledgeable php coders reside there 😊

  • #3 / Apr 26, 2008 10:02am

    Giles Thurston

    34 posts

    That was my fall back option and to be honest preferred option, I just trying to be lazy and look for a quick win 😉

    Does anybody know of any utilities that can help with importing structured MySQL data into expression engine, or will I need to write some routines from scratch?

    Any advice or guidance on this available, I can’t seem to see much in the documentation?  Details of the underlying db structure for EE would also be useful.

  • #4 / Apr 26, 2008 10:23am

    e-man

    1816 posts

    Have a look at the EE-developer docs: database class.
    A search of the forums might turn up some good pointers as well.

  • #5 / Apr 27, 2008 9:05am

    Sue Crocker

    26054 posts

    Giles, another option is to install EE into the same MySQL database you’re using for your original site. EE can co-exist with other database tables, since you can set a prefix for the table names. (The default is exp_.)

    You can then use the query module within EE to interact with your existing tables.

    Make sense?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases