Hi all,

I've written custom code (PHP) which queries a database and brings results up in tabular format. It also generates a googlemap on the 2ndary page with heavy(ish) CSS layout and some AJAX/Web2.0 or whatever you wanna call it.

Being new to Drupal and CMS in general - is there any way I can surround this in the Drupal theme I have already - like how content is placed inside Drupal?

Thank you very much in advance,

Comments

Samat Jain’s picture

You can create a new node, and use the "PHP code" filter. This lets you create a custom page that still uses Drupal's theming system.

Depending on the complexity of your page, however, it can sometimes be a nightmare to integrate... Especially if you use a MySQL database different than the one Drupal uses.
__
Personal home page | Rhombic Networks: Drupal-friendly web hosting

kae’s picture

this didn't work for me but did work for someone else.

Heine’s picture

It didn't work?
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

kae’s picture

there may be something wrong with my site

claus2080’s picture

you may want to create a module from scratch.

pamphile’s picture

what error message did you get ?
why didn't it work ?

You can use POST and GET variables.

Marcel
http://01wholesale.com
http://businessletters.com

vanyel’s picture

Are there any guides on how to write modules? =)

It's essentially going to be a search engine held within Drupal, and I'll have extra fields that people can search on specifically - which then brings up stuff like proximity mapping :p

Thanks again =)

sepeck’s picture

The module developers guide in the handbook has most of what you will need.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

sepeck’s picture

Not coding php myself, but here's two links for your consideration
How to connect to multiple databases within Drupal

The other area to browse through are the php page snippets and see how others used php code intheir site.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Kimeros’s picture

I find creating a block to be a good way to include PHP code.

I started off trying to use the input type : php in a standard node page but I had trouble using it especially as I was wanting to access another database.

With the blocks it just worked.

Administer->Blocks->Add Blocks

Make sure you select input type php

muthaliganesh77’s picture

Have you tried using the insert headers and footers plugin?

Insert headers and footers

Thanks!

Muthali 

Aozata