Is there a documented set of bare minimum Drupal APIs that I would need to migrate my existing site to Drupal? For example, can I just add in all my pages under the document root and then modify each page to make the appropriate Drupal calls? (This would be only for the end users, I want the drupal admin pages to exist as is ).

For example, in the main page,
1. I would first check if the user is logged in and is not admin (how do I do this on a page?)
2. If admin then follow drupal's existing flow else continue
3. Get user profile information (is this stored in a session variable?)
4. I would still use certain modules so check if the user has access to module X, if so display a link

Regards

Sameer

Comments

wpd’s picture

I think you want to work from the other direction. How can I make Drupal display my existing site?
Otherwise, you are effectively dupplicating huge amounts of drupal code for evey page.

What sort of content do your want to convert?

White Paper Designs

sameersingh’s picture

Thanks for your reply. The difficulty is that a lot of the content is AJAXified and has been written in cold fusion. So, if I had similar functions in Drupal I could just do a global replace and I'd be done (for now). I intend to use modules in the future, however, for right now, all I need is a framework to display my existing site.

The $conf & $user globals contain the data I need, however, ideally there could be hooks at the page level or maybe there already are?
I'm modifying page.tpl.php right now.

wpd’s picture

You might try this.
mkdir legacy
Put all your old stuff in there. (you will probably have to strip the html and body tags)
Then you can use drupal to point to your content. This will 'start' drupal, and then run your php.

create content > page
Make sure the input filter is php or html.
Then you can simply write:

<?php include="legacy/page1.txt"; ?>

You can use the url aliasing feature to place the node correctly. (i.e. node/24 -> whatever.php)

This technique is also mentioned here: http://drupal.org/node/57756

White Paper Designs