Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Next Link/Article Plugin/global

Quote Reply
Next Link/Article Plugin/global
Is there any way to have a plugin/global that will allow you to do basically the following:

1. create another (or more if needed) description under the links table.
2. put your link/article in the original description field, and if you are doing a series of articles that are related, you can fill out the second, third, and so on extra description fields.
3. on the bottom/top of your detailed page, you can have a <%nextdescription%> and display the associated/next article...
Any thoughts on this, I think I can do it dynamically, but would need to have them built static, for example:
original detailed page: /Details/1.html
next detailed page: /Details/1_1.html
second next detailed page: /Details/1_2.html
and so on...

</not a clue>
Quote Reply
Re: [Dinky] Next Link/Article Plugin/global In reply to
I'm not exactly sure what you are doing here.

It sounds like a blog concept, or perhaps comments.

There are a number of reasons for *not* doing what I think you are suggesting here.

It would be more "logical" to come up with a more logcial format/process.

For instance, have a link for editors to "add a related article". When they click it, they are presented with the standard add form, but with one difference. The "related_ID" is passed in and through, and stored with the new link information.

There are a few issues with this, in it's simplest form, as in navigating to the "next" link would require a post_hook to store the new ID in the related_ID record.

There are other ways to handle this, using "groups" as I proposed way back.... or converting to a blog-like concept as several are working on now.

I've got a lot of program code being worked on that will probably eventually do this (what you are asking for), but it's not ready for release yet. I am trying to tie together a lot of concepts from the past 3-5 years of musings and half-starts.

A "group" is a special kind of link that contains other links, or data elements.

Within the links framework, a "group" is a Link record that either links to other tables, or to other links with "content" fields filled in. There are two distinct conceptual ways to work on this, within the LinksSQL framework, and I've wavered between both, at different times.

The difficulty, is that Links is set up to use only two organizational tables -- Category and Links -- and trying to add a third level means modifying virtually everything. Adding related tables, requires modifying the search/indexing routines, or you wouldn't ever find what you were looking for. Maintaining upgrade compatibility with this sort of modification would be an effort in futility. Superimposing "groups" on the existing format is possible, but tricky.

*but* adding fields to the Links record, eg: Description1, Description2, etc is *not* the way to go. It's going to lead to major problems later on.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [Dinky] Next Link/Article Plugin/global In reply to
Sure this is easy if you do it using php and pass variables from lsql. i'm working on something similar and I came here to post a question about that Sly

To have a 2nd 'detailed page' :
"next detailed page: /Details/1_1.html "

You can dynamically generate such pages via php by adding a link in your detailed template which will go to the next page and pass all the relevant variables from links.

like this:

<a href="<%build_root_url%>/Detailed/details1_1.php?id=<%ID%>&title=<%Title%>&url=<%build_root_url%>&db_cgi_url=<%db_cgi_url%>">Next Detailed Page</a>

Then on your next detailed page "details1_1.php" you can access the variables:

title, url, db_cgi_url, etc

That works fine and you can access those variables as standard php variables using $title, etc. The problem here is that you probably don't want to pass large blocks of text this way. So what I'm trying to do is query LinksSQL to access that text from the php page. I want to say something like

<?php
$mytextdescription = $db_links somequery(%description%)
echo $mytextdescription;
?>

I don't know how to do that. Do you know what the links query is to get a text field then pass it to php like this?

thanks
Quote Reply
Re: [Dinky] Next Link/Article Plugin/global In reply to
I think this thread that answers my question, also gives the rest of the answer to what you want to do.

www.gossamer-threads.com/perl/gforum/gforum.cgi?post=285494

So you have two options:
- create detail2, detail3, etc templates (best solution because you can build static pages)
OR
- use my php solution, but there is not much reason to do that unless you have a pre-existing page that you want to populate with some links data.