PDA

View Full Version : Integration with NetObjects Fusion or Dreamweaver


tuxcode
02-18-2004, 12:00 PM
I have created a tutorial on integrating PhpDig with NetObjects Fusion-based websites. This tutorial should work for Dreamweaver as well. Let me know what you think. See: Integrating A Search Engine With Your NetObjects Fusion Web Site (http://www.tuxcode.com/html/fusion_dig.html)

David J Harmon
02-18-2004, 06:14 PM
If you could go over to The Geek Style site and place a download plus a description of you program. I have looked over it and you must have drank lots of coffee for this one.

Oh yes the site is at http://cyberkopia.net/geekport/

se ya

Charter
02-19-2004, 11:06 AM
Hi. Nice tutorial. Thanks! Just a couple of things I noticed...

Because we placed PHPDig in a different directory than the root of the server, you will need to modify the line in /spider/includes/config.php as follows...

The "../spider" (back one and return to spider dir) is the same as the "." (remain in spider dir) if everything is in the spider directory. You can place PhpDig in any directory. It's only when you want to change the directory structure that comes with PhpDig would you need to add && ($relative_script_path != "../spider") to the config.php and modify the $relative_script_path variable.

Note "search.template" in the "phpdigSearch" function call. If you didn't call your template "search.template" or you placed the file in a different location, you will need to change "search.template" to reflect your change.

In the config.php file is the following:

$template = "$relative_script_path/templates/phpdig.html";

This variable can be set to the location of the search.template and $template can be left in the phpdigSearch function call, but maybe that's what you meant.

When I click a link in the search results, the page opens in a new window. How do I fix this?
I can only assume that the purpose of this makes more sense if you are providing search results for multiple sites. If you don't like it when clicking on a search result opens in a new window, you can change the word "target" on line# 648 of "libs/search_function.php" to "xtarget" or simply remove the "target" attribute.

In the config.php file is the following:

define('LINK_TARGET','_blank'); //Target for result links

The options are basically as follows:

_blank : open in a new window
_top : open in the same window
_self : open in the same frame
_parent : open in the frameset
name : open in name frame/window

Again, nice tutorial! I only point these things out because if using a fresh install, same directory structure, there shouldn't be a need to edit the core PhpDig code, unless of course, the OS isn't happy with certain things or mods are wanted.

tuxcode
02-19-2004, 05:26 PM
Charter,
Thank you for your kind comments!!!

Your first point indicates to me that I may need to watch where I make assumptions in my future tutorials and where comments are necessary. By default, NetObjects Fusion places all but the index page in a /html/ directory. This is where NetObjects Fusion would place our search.php that is created in the tutorial. The reason that I used "../spider" is because the search.php exists in a sibling directory to spider: /html. This is something of a hack on my part, but I was trying to keep the implementation as clean, simple, and timely as possible for both tools.

I will update the tutorial to reflect the points you mentioned. PhpDig is a fine application, and I believe that the NetObjects community will benefit greatly from it's use.

Many NetObjects deployments are small businesses who may not know that there are alternatives to commercial 3rd party services. I want to make sure that I do my part to help empower and expose the masses to the Open Source community. :D

Thank you again for your kind comments.