Jump to content
TNG Community

Drupal Theme for TNG


Dan Banach

Recommended Posts

I have a Drupal 6.13 installation with TNG 7.1.1. I've got the Drupal integration module working, but I'm a little lost on applying the Drupal theme to TNG. Does anyone have any tips or tricks on applying the Drupal theme to TNG? Are there any prefered Drupal themes?

Link to comment
Share on other sites

  • 1 month later...

I have a Drupal 6.13 installation with TNG 7.1.1. I've got the Drupal integration module working, but I'm a little lost on applying the Drupal theme to TNG. Does anyone have any tips or tricks on applying the Drupal theme to TNG? Are there any prefered Drupal themes?

I have the site up and working. The trick now will be to test and have things behave. The Drupal ./index.php uses an ./include/bootstrap.php that brings in other components relative to the ./include directory. When I copied the Drupal index.php to a directory named /test, all of the includes that my test file would load through ../include/bootstrap.php failed.

In short, I think I'll have to decide between some other CMS that works better with TNG, or investing effort to have TNG appear more like my website, only without the features I don't have time & skill to hard-code into TNG.

Computers suck. :(

Link to comment
Share on other sites

When I copied the Drupal index.php to a directory named /test, all of the includes that my test file would load through ../include/bootstrap.php failed.

Both Drupal and TNG need to know where they are installed, so copying index.php (or any other file) to another directory will not work because it and all the other files and database entries are looking for it in the original install directory. For testing, you would have to install a second testing environment and use that as your playground.

Link to comment
Share on other sites

Both Drupal and TNG need to know where they are installed, so copying index.php (or any other file) to another directory will not work because it and all the other files and database entries are looking for it in the original install directory. For testing, you would have to install a second testing environment and use that as your playground.

I may go through the process of installing a second test environment, but as a 'quick hack' I wanted to see what there was to be seen. For my 'next amazing test', I want to see to what extent I can create hello_world.php code within a virtual page. Presuming as admin I can enter in PHP, my next step would be to see to what extent I can either use ./includes within the TNG directory or *create* a suite of such includes off the code, and otherwise make portable functions.

I'm just guessing here (the point of testing and verifying) but I wonder if TNG wouldn't simply offer tools to perform functions, and then I could insert those functions as includes and function calls within a Drupal page. If TNG function can be divorced from TNG presentation, and if that function can be called from within a CMS directly as includes and token values, would that be the way to go?

--Romaq

Link to comment
Share on other sites

http://drupal.org/project/customfilter has a custom filter that will allow PHP. I think it should be possible to set up an explicit 'raw-php' filter available to admin only, and then to look at test functions that would return "Hello World" innocuous content from PHP, and perhaps test values such as prove the ability to read the TNG database and display some harmless table from it... maybe the list of branches, so long as it has multiple entries and doesn't reveal anything like passwords. If someone somehow hits that page, they shouldn't get anything exciting.

If that's possible on the Drupal side, the next problem would be isolating actual tools out of TNG. Perhaps we could work with Darrin Lythgoe to make logical abstractions of content functions in the code from formatting and presentation issues. We could then create a custom filter to replace 'includes' with tags and arguements.

Something like this:

<showFact individual="Romaq">

Becomes something like this:

./include $library

showFact( $text[individuals], $row[pcount], "&nbsp;" );

The actual code may not be relevant to my intent... I don't know yet what 'showFact' does, what the data means, or any of that. I'm just making the point of isolating logical abstractions of TNG code that creates content, and possibly having the access of the content be as simple as HTML tags that the filter macros into the more lengthy and tedious but correct PHP code we want to run. If we can manage strict TNG content generation within a Drupal 'filtered' page, we can leave Drupal to do all our presentation.

Even better, this would provide a direct pathway to solve other CMS integration issues. The TNG functions stick with content generation, and any given CMS handles presentation and invokes the TNG function calls that generate the content. Would this seem a reasonable approach?

Link to comment
Share on other sites

I would think, unless you are trying to recreate TNG inside Drupal, we should focus on applying a Drupal theme to the TNG pages. All of the logic and functionality is already there in TNG, I think its just a matter of getting it to display like the rest of the Drupal site.

My $.02

Dan

Link to comment
Share on other sites

I would think, unless you are trying to recreate TNG inside Drupal, we should focus on applying a Drupal theme to the TNG pages. All of the logic and functionality is already there in TNG, I think its just a matter of getting it to display like the rest of the Drupal site.

My $.02

Dan

I can go with that, and I think that is an approach that I would need to take at my current skill level (not much skill). But then it gets back to a question of how much recreation of Drupal wants to do within TNG. :(

Link to comment
Share on other sites

  • 5 weeks later...

Even better, this would provide a direct pathway to solve other CMS integration issues. The TNG functions stick with content generation, and any given CMS handles presentation and invokes the TNG function calls that generate the content. Would this seem a reasonable approach?

Romaq it seems as though you have a decent handle on Drupal, why not consider creating an iframe-less version of the tng-integrate module that creates actual blocks and views for the tng rendered stuff?

Link to comment
Share on other sites

Romaq it seems as though you have a decent handle on Drupal, why not consider creating an iframe-less version of the tng-integrate module that creates actual blocks and views for the tng rendered stuff?

I ought to do something, it's just a matter of how many flaming branding irons I can juggle in the air at one time on other, unrelated projects. I'll look closely at the integration code to see what I can do. It would be really dandy if I could have TNG treated as 'just any ol' Drupal object'. I'd like to keep my Drupal navigation, side panel blocks and so on so you wouldn't notice TNG as anything other than data.

We'll see. :) And, of course, I'm always happy when someone ELSE more competent than I is in a position to do the work. :)

Link to comment
Share on other sites

I ought to do something, it's just a matter of how many flaming branding irons I can juggle in the air at one time on other, unrelated projects. I'll look closely at the integration code to see what I can do. It would be really dandy if I could have TNG treated as 'just any ol' Drupal object'. I'd like to keep my Drupal navigation, side panel blocks and so on so you wouldn't notice TNG as anything other than data.

Potential employers love displays of flaming branding iron prowess. And it's a great party trick at DrupalCons as well.

We'll see. :) And, of course, I'm always happy when someone ELSE more competent than I is in a position to do the work. :)

Which is why I asked you. :) Actually I'm looking at the code myself, to see if there's a way to do it without surrendering the few hours of sleep left in my day.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...