HELP: post content from drupal on another site/area

seiran - June 6, 2008 - 18:20

I'm REALLY REALLY sorry if this was answered somewhere else, or if I'm just a complete idiot for not figuring it out.. I'm somewhat new to PHP..

Here's the scenario:

I have a site already setup and live in the root.. in a folder called "admin," i have Drupal setup.. I mainly want to use drupal as a backend cms for someone to login and update a "News" and "Events" section on the current live site on the root..

So, I'm trying to figure out if if there's a way to output content entered through drupal onto the current live site.. make any sense?

So i'm not sure if there's a way I can call in content entered via drupal..

again, sorry if this question is really dumb.. and if this can't be done - any suggestions?

thanks for your time everyone...

Just call the database

Alan D. - June 7, 2008 - 06:24

I assume that you are coding custom pages for the output?!

If so, just copy the database settings from the sites/default/settings.php file, and do custom querries to pull out the data. It's fairly clean structure if you do not use CCK. Eg: node - node_revisions, etc

You can fully theme Drupal so that it doesn't look like Drupal, so why do the extra work?

Or are you looking for RSS feeds, etc?

Alan Davison
www.caignwebs.com.au

What did you end up doing?

dzrobarge - June 10, 2009 - 13:41

What did you end up doing? This is what I need - no way to theme our site since the layout is different on every single page...

An easy way in your case is

Alan D. - June 10, 2009 - 15:04

An easy way in your case is to create a blank theme, and add the theming HTML into the content. Knock out all your blocks by defining just the content block in your theme .info file. All the power of Drupal with a blank slate.

We often deal with multiple different styles using a single body class. I would really recommend a common header / footer region or your users will get lost really easily!!

Alan Davison
www.caignwebs.com.au

Ok, great... I have a few

dzrobarge - June 10, 2009 - 18:26

Ok, great... I have a few questions....

1. I'm not sure I understand "add the theming HTML into the content" - can you explain that?

2.When you say "common header / footer region" are you speaking of using the blank template within another drupal site? I guess I don't understand that either :) I am trying to include items into just regular php files.

3. I found this http://drupal.org/project/blank - it's for 5.x - looking at below is there something easy I can do to change it over to drupal 6?

the project/blank contains only 2 files:

page.tpl.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language; ?>" xml:lang="<?php print $language; ?>">

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
</head>

<body>
  <div id="content-area"><?php print $content; ?></div>
</body>
</html>

template.php

<?php
/* A blank theme has no regions. */
function blank_regions() {
  return array();
}
?>

The footer/header into the

Alan D. - June 10, 2009 - 23:14

The footer/header into the above theme, and do a quick search for "info files" on Drupal 6 - these will explain how to define regions (or lack of)

Try to copy all non-visual html variables if you start from scratch, especially the footer, header ones.

Alan Davison
www.caignwebs.com.au

 
 

Drupal is a registered trademark of Dries Buytaert.