Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[UPDATE] Detail_Page for GLinks3

Quote Reply
[UPDATE] Detail_Page for GLinks3
I've updated this plugin, and it works a bit differently than the 2.x version.

The later versions of 2.x and 3.0 have installed much of the functionality (and thus the purpose) of the original detail_page.cgi

But, in doing so, and trying to do other things, there are some places where the same concept of functionality is needed.

What this plugin does:

1) it runs as a plugin to page.cgi
2) it hooks into the handle_page and generate_detailed hooks/routines
3) it allows you to use the option in the Admin to build pages with FullCategoryName/Title_ID format DYNAMIC, not just static.
4) it allows you to call page.cgi with page.cgi?ID=nnn or page.cgi?p=detailed&ID=nnn to display a detail page from *anywhere* such as the Top, Cool, or Search pages, where <%detailed_URL%> doesn't work.
5) Gets rid of my frustration and broken sites every time the Page.pm was updated and this functionality still hasn't been built into the Page.pm module as distributed.

That's pretty much *all* it does.

At some point, I might add in a routine to check for the link existing in only one category (eg: count from the CatLinks table where Link_ID=<%ID%>). That would allow it to generate a detailed page for that category, as well. Right now, the detail page is just the basic detail page, under the category "Detailed"

Helps if I actually attach the plugin.....

There are no options, nothing to edit, and you can install/unistall without affecting anything, or should. If you want to disable the ID= feature (the handle_page hook on the edit option in the main window), you'll probably increase performance a tad, if you only want to use the extended/enhanced detail pages (and still link via jump.cgi to the Top, Cool, etc pages). It won't have to check on each call if you are asking for a detail page or not. (This is one reason why adding this feature into the Page.pm module was my first choice, and why GT should really add this in.)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.

Last edited by:

pugdog: Mar 18, 2006, 10:16 PM
Quote Reply
Re: [pugdog] [UPDATE] Detail_Page for GLinks3 In reply to
Does it work with the Build_Detailed 1.5 plugin?
Quote Reply
Re: [Alba] [UPDATE] Detail_Page for GLinks3 In reply to
Hi,

I don't have that plugin, but this is *not* a plugin to the build system.

This is a plugin to page.cgi.

I don't run static sites any more, so I don't know how it works with them.

You can check, since the two routines it overrides are:

handle_page (PRE) generate_detailed (PRE)

The hook in nph-build is "create_detailed."

The reason for this plugin is that the nph-build will build the extended detail page names, but page.cgi wouldn't (for lack of one line of code). This is not needed for static build, in other words.

The other reason, is so that you can link to the detail pages from other parts of the site.

*if* you are asking will that part work with the static build, no, and I'm not sure how/why you'd want to, as it could increase build time significantly, with duplicate pages, and such. This plugin was really designed for dynamic sites, to add in some functionality that was missing.

That said, if there is a reason for trying to generate the detail pages staticly from the ID, create_detailed could probably be overriden to look for ID= and/or p=detailed to output the page. There are other issues here.... which is why I've gone to all dynamic sites. This is just another means of trying to get your dynamic site to look more static, and to over come some short comings in the way things work.

The way detail pages are "built" in the static system, depends on the how you set the flags in build options. So, every time you try to link, you'll have to generate another page, and store it on disk. The dynamic system over comes this, by not having to physically build the pages, so the path to the page doesn't matter, the same page will get built each time (more or less, the bread crumbs might be different).

*BUT* you get back to the original reason I wrote the detail_page plug in back in 1x. It was to allow you to link dynamically to pages within a static site, and generate them _STATICLY_ (eg: d=0). You'd probably be just as good to use the plug in and link to them via page.cgi?d=0&ID=nnn (but I have no way to check), and bypass all the problems. The output should be the static page w/ static links.

Long reply to an apparantly simple question ;)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] [UPDATE] Detail_Page for GLinks3 In reply to
Hi

Thanks.

I'm just changing over to using dynamic sites and hadn't considered the fact that didn't need to use the Build Detailed plugin any longer! the pages don't actually exist.