Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-08-11 23:37:28

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Related articles for files/images

File with Related Article

Let’s say, for example, you have a list of plugins for download and you also have a list of articles related to that list of downloads, possibly a collection of Textpattern plugins. Perhaps if you could associate a related article field with a file id number, you could call the article about the file from a list of file titles.

So the file downloads form might look like this:

bc..<txp:file_download_link>
<txp:file_download_name />
</txp:file_download_link><br />
<txp:file_download_size format=“auto” decimals=“2” />,
<txp:text item=“downloads” /> (<txp:file_download_downloads />)<br />
<txp:file_download_article text=“plugin info” />

And the page template might look like this:

bc..<h3>Downloads</h3>
<txp:file_download_list form=“file” category=“textpattern” limit=“10” sort=“filename” wraptag=“ul” break=“li” />

Which would output something like this:

bc..bau_article_thumb-0.2.txt
2.15kb, downloads (0)
plugin info // this would be the link to the associated article

The file_download_article function would reference the id number specified in a related article field in the file upload form.

Image with Related Article

If this could be accomplished for files, the same could apply to images. Then creating a gallery using thumbnails that are associated with specific articles would be simplified. Create a list of thumbnails. These thumbnails are automatically linked to associated articles.

In this way, you have true cross-referencing happening instead of only one way:

In addition to general associations with categories, you could have specific associations
  • article associated with image id=“n” (exists in current distribution)
  • article associated with file id=“n” (exists with upm_file_packets plugin)
  • image associated with article id=“n”
  • file associated with article id=“n”
  • image associated with file id=“n”
  • files associated with image id=“n”

Just a thought. On the other hand, maybe this should just be a plugin, the problem being that it would likely require another field in the database table. Or can custom fields be associated with anything other than articles? Or am I opening up a can of worms here. Or this unnecessarily duplicates the associations already available for articles.

Offline

#2 2005-08-11 23:50:42

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Related articles for files/images

As far as the files go Mary has a plug-in that does something like you suggest.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-08-12 00:37:33

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: Related articles for files/images

I’m using mary’s upm_file_packets and it’s a lovely thing. It might be even better if there were an option to make it a pull-down menu rather than a popup. At any rate, mary’s plugin is what prompted this idea about developing a network of cross-references within Textpattern’s database: a more linear sort of “one thing leads to another” kind of thing.

Offline

#4 2005-08-12 00:54:05

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Related articles for files/images

Got ya. Maybe by version 2.0?? I think there are one or two things already started that need to be brought to fruition first but you’ll have to find out about those for yourself. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-08-12 04:40:39

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: Related articles for files/images

Ah yes, version 1.0 is only the beginning. Can’t wait to see what’s next.

Edit: I suppose what you mean is I should have read mamash’s article TXP 2.0 and beyond but I was thinking some of these ideas were possible by adding a few things here and there in the present state of development rather than a complete overhaul (which may only point out my ignorance of php coding).

Last edited by bauhouse (2005-08-12 05:12:02)

Offline

#6 2005-08-12 13:06:02

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Related articles for files/images

I wasn’t thinking of Mamash’s thread but more about just keeping your eyes open. Take this thread for example. There are odd little things in the current revisions that don’t do anything at the moment but are markers for future development. Whilst ideas for what you would like to see in the future are good, having little bits of code already in there are more positive. You see odd things like that thread around the place but it’s the only one I can put my cursor on at the moment.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2005-08-31 12:14:56

loid
Member
Registered: 2005-03-09
Posts: 38

Re: Related articles for files/images

Bauhaus, check out this thread:

http://forum.textpattern.com/viewtopic.php?id=10856

This plugin may be useful for you.

Offline

#8 2005-11-11 18:40:06

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: Related articles for files/images

It would be really cool if there was a way to make this happen.

Offline

Board footer

Powered by FluxBB