Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

detail on the fly

Quote Reply
detail on the fly
Hi:

Widgetz was very kind, and helped me with a mod in 2.0 that I needed, and now that I am in SQL, I was hoping someone could helpo me with an SQL version!

The mod is this. Rather than build all the detail pages on Build all- since I have 4000 detail pages, and anticipatre going up to 10,000 detail pages- I would like to build detail pages on the fly. We did it in 2.0 by creating detail.cgi, and calling it with a query of the <%ID%>. What it also did was bump the HITS field by one when the detail page was hit.

I have tried playing around, but I am pretty useless in perl, and totally worthless in this new SQL stuff. Anyone want to give it a crack?

Also, I am still exploreing Links SQL, so this may be a stupid question (forgive me). Is it possible to also make sure only registered users can view detail pages?

I know I am asking a lot, and I appreciate all the help you give!

Dave
Quote Reply
Re: detail on the fly In reply to
Widgetz:

OK, I am lost.... what is the commant line to pass to build a dynamic detail page? When I try, I end up getting the home page rebuild and sent there, rather than to a detail page.

Thanks!

Dave
Quote Reply
Re: detail on the fly In reply to
page.cgi does this..

jerry
Quote Reply
Re: detail on the fly In reply to
Jerry,

How does page.cgi do that? I haven't played much with the registered users features, but how do you restrict page.cgi?

For now, page.cgi's biggest use to me is previewing template changes before I rebuild.

Quote Reply
Re: detail on the fly In reply to
Widgetz:

Sorry for being such a newbie! Thanks for the point in the right direction- as always, I am idebted to you! Hope you (and everyone esle!) had a great Turkey Day!

Dave
Quote Reply
Re: detail on the fly In reply to
Try adding to your templates:

<%if Detailed%>
<a href="<%db_cgi_url%>/page.cgi?g=/Detailed/<%ID%>.html">Review</a>
<%endif%>

Hope this helps,

Alex
Quote Reply
Re: detail on the fly In reply to
Alex:

It's is a beautiful thing! Thanks!

Dave
Quote Reply
Re: detail on the fly In reply to
Hi,

does anyone know how I can get the dynamic Links on pages created by page.cgi to refer to the static .html pages. Now I Link to a detailed page.cgi and If I click on a category for example all pages are called through page.cgi

Cheers

NIko

http://www.master-productions.com
Quote Reply
Re: detail on the fly In reply to
Try hardcoding the URL of the detailed page... such as

<A HREF=/path/to/my/Detailed/<%ID%>.html>Detailed Info</A>

Into the templates. That way the page.cgi program won't attempt to translate the URL's any futher.


http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: detail on the fly In reply to
Yes you are right, but then the Browser does not find a page because there is no page at my/path/to/detailed/5324.html for example.

Cheers

Niko

http://www.master-productions.com
Quote Reply
Re: detail on the fly In reply to
Sorry, but I am confused as well. I have two questions:

1) I have included the <%ifdetailed>, etc. statement Alex suggested on my "links.html" template. However, it is not printing the "detailed Info" link. Is there something additional I need to do?

2) I am having the same problem as el noe, where I get a "Oops, we don't seem to have a category by the name of 'whatever'" error.. Is there something that needs to be done to page.cgi that I missed?

I have dynamic pages turned on in Links.pm. Build detailed pages is off.

I appreciate any help you can offer. Thanks, and have a good weekend! :)

Katina

Quote Reply
Re: detail on the fly In reply to
Ok, start over on this, from the begining, because what I'm reading now, isn't what I read before.

>> I have dynamic pages turned on in Links.pm. Build detailed pages is off.

What I read before was trying to link to the detaild pages, staticly, but dynamically build the site.



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: detail on the fly In reply to
Hi Pugdog,

I was wondering if there was a way to have "dynamic" detail pages instead of static ones. For instance, instead of having a "Detailed/" directory filled with thousands of static pages, is there a way to generate these pages dynamically from the database using the ID or something similar? It would truly save a HUGE amount of space..

When a user browsed the directory, a link saying something like "Detailed Info" could appear next to each listing (where it says "votes", etc..).. When the link was clicked, a dynamic page would be created to view the listing's details..

Hopefully this makes sense.. ;))

Thanks!
Katina

Quote Reply
Re: detail on the fly In reply to
Detail pages can be generated dynamically just like any other page. You just need to make sure the templates have the right links.

check out:

http://www.postcards.com/...QL/Detailed/135.html



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: detail on the fly In reply to
Hi Katina,

if you insert the following tag in link.html the user can view the detailed page of the link:

<a href="<Û_cgi_url%>/page.cgi?g=/Detailed/<%ID%>.html"><%Title%></a>

It displays the title of the link and builds the detailed page via page.cgi if clicked on. Of course you can change it to

<a href="<Û_cgi_url%>/page.cgi?g=/Detailed/<%ID%>.html">more...</a>

?somehow "% db" (without the space) is changed to "Û"?

regards, alexander

Quote Reply
Re: detail on the fly In reply to
You need to check out the thread I mentioned, since early installs of the Links program had a bug in the code that had to be changed as well. It was an inconsistency from a beta release to the final release.

So if the easy link isn't working, you might have to change a line or two of code in the source.


http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/