I feel stupid for posting this, but I haven't been able to find answers on my own. I found a link directory script I want to use on my Drupal-driven site (see the scripts page: http://www.biz-directory.org/directory_script.php ).

I would like to integrate it with the site (i.e. have menus appear on the side, change themes). I use a phptemplate theme. Is it at all possible? Or am I going to have to try to make a module with it? (I would rather not, but I'm tenacious when I have to be.)

Comments

budda’s picture

Without bothering to look at the directory script, I'd say just plonk the PHP code in to a node body and set the "input filter" to PHP code.

That is how you can embed a script in a page. However it could very well get messy, and there's probably better solutions.

Are there no existing drupal modules -- check CVS, there maybe something you can update and use.

--
Custom Drupal templates | More Drupal modules

CrowChick’s picture

Already tried that one to no avail. Unfortunately, the code comes in multiple scripts.

Drupal, for all its functionality and usability, lacks any sort of a links directory module-- contributed or otherwise. Seems like a huge oversight to me. I've read of a few workarounds you can do with flexinode and such, but it's too slipshod.

This script does what I want it to do. I will no be swayed.

budda’s picture

Use flexinode to set up a node of type "link".

Use taxonomy system to categories the link nodes.

Then use the views module to list your links based on categories.

--
Custom Drupal templates | More Drupal modules

CrowChick’s picture

I already said that that is not what I want.

budda’s picture

When did you say you didn't want to use flexinode / views modules???!?!??!!?

--
Custom Drupal templates | More Drupal modules

CrowChick’s picture

See "Hehe..." dated February 8, 2006 - 17:41 above:

"I've read of a few workarounds you can do with flexinode and such, but it's too slipshod."

It's just not a real solution.

coupet’s picture

Thanks for your comments!

How can I accomplish the same using Custom module?

Maybe a advanced how-to create custom module would help?

Thanks, Darly

Apache is bandwidth limited, PHP is CPU limited, and MySQL is memory limited.

spidersilk’s picture

The problem with that approach is that, at least as far as I can see, it wouldn't give you any of the basic functionality that you expect from a links module/script -- being able to validate all the links and remove dead ones, notify people who've submitted links whether or not they're accepted, etc. This is all pretty fundamental to being able to maintain any sort of useful link directory on a site.

Would there be any way to make Flexinode do any of that? Or any other way of accomplishing it, short of waiting ages for the Links module to eventually be done?

Lynna

Business: http://www.spidersilk.net
Personal: http://www.wildideas.net

budda’s picture

CrowChick’s picture

Can you eloabrate on that idea a little more for the sake of a template newb?

hadishon’s picture

I was in a similar situation. I customized the templates to the link script to look like my drupal site.

You can view it here: http://www.go-israel.com/dir/

I then built a custom link to it in drupal's menu block.

I would rather that the directory and links be nodes so that it could be used by drupal modules.

But this gets me what I was needing.

Even if a good links module for drupal came out, I don't think I would switch unless I figured out a migration script to use.

Let me know if you need more help on how to make your link script look like drupal.

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

spidersilk’s picture

That link is 404, unfortunately.

Were you able to somehow embed the Drupal menu into your link directory template?

I'm currently using a script called PHP Link Directory on the site I want to convert to Drupal (Wild Ideas, link in sig), but you can't embed any sort of PHP in the templates. I was only able to get it to match the look of my existing site by making a static HTML version of the PHP navigation the site uses (I know the pages all end in .html, but I used .htaccess to make them execute PHP because I didn't want to have to rename every page on the site when I redesigned it).

It's looking like I'll have to keep my link directory in an external script, at least until such time as the links module is actually finished. That page says it was supposed to be ready in time for Drupal 4.7, but judging from the read me file in the CVS, it's a long, long way from ready. :-( So the only question that remains, I guess, is how to make them at least look integrated even if they can't actually be integrated.

Lynna

Business: http://www.spidersilk.net
Personal: http://www.wildideas.net