Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
- jk_neighbour v0.46 download
Another semi dashed off plugin. This one is just a rewrite of link_to_next and link_to_prev, with a few new attributes. As such, it works pretty much the same with all of the related functions and properties. New attributes include cat and sortby. The cat attribute allows results to be restricted to a specific category (use “current” for results within the same category as the current article). This restriction is off by default. The sortby determines the order of what article is next and previous, and can be any article field, although probably only “posted” and “title” would really make sense. Sortby defaults to “title”.
Change Log
- 0.2 fixed issues with the title of jk_link_to_prev
- 0.3 fixed issues with caching and jk_link_to_prev
- 0.35 fixed minor bugs when specifying a category
- 0.4 added support for articles with posted dates in the future
- 0.45 bug fix for sortby = “posted”
- 0.46 fixed for sortby = “custom_field”
Last edited by Jeff_K (2007-08-24 18:25:33)
Offline
#2 2007-02-13 16:32:59
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
- How: Create a prev/next link with alternate sort criteria ?
- Alphabetical article lists and Next, Previous navigation
- Add a sortby attribute to link_to_next / link_to_prev
- …
Last edited by Niconemo (2007-02-13 16:34:54)
Nico
Offline
#3 2007-02-14 15:31:15
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
No suggestion for the moment :
It works exactly the way the buit-in txp:link_to_next
should, considering that Txp is much more than a blog-like CMS (only based on publishing date).
Thanks a lot !
Nico
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Hey no problem!
There is not much too it. It could be rolled into future releases very easily…
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
would it be possible to use tags as criteria? or in other words: i’m using tru_tags for an image gallery. when i select a specific tag it takes me to /tag/foobar i then see a list of all images tagged with foobar, when i select one the previous/next navigation isn’t context/tag-sensitive any longer… could this be a job for your plugin?!
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Do you mean that you select a keyword, get a list of articles, then select one. Then when viewing a single article, link_to_next would take you to the next article with the same tag? I am not sure how that would work. How would it know what tag you are browsing by after you leave the list generated by /tag/foobar?
Offline
#7 2007-03-15 19:37:58
- bulinski
- New Member
- Registered: 2007-03-15
- Posts: 1
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
As a very new user to textpattern (just two days ago) I was glad about your plugin!
I discovered a little bug in your code:
jk_link_to_prev does link to the previous article but displays a different title.
Please change in function jk_link_to_prev global $next_title =>global $prev_title
Best regards und weiter so!
Bulinski
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Bulinski, thanks for the fix! I have adjusted the plugin and posted an updated link at the top of this page.
Cheers.
Offline
#9 2007-04-12 03:13:30
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Jeff:
First, thanks for this much needed plug in. Unfortunately, I am having a slight problem, the previous tag does not work, but the next tag does. I am not sure if this has anything to do with your last fix or if I have done something wrong.
Here is the code I am using:
<txp:article allowoverride=“0” form=“listing_details” pgonly=“0” searchall=“0” searchsticky=“0” />
<txp:jk_link_to_prev sortby=“Title” showalways=“1”>Previous</txp:jk_link_to_prev><txp:jk_link_to_next sortby=“Title” showalways=“1”>Next</txp:jk_link_to_next></code>
Any assistance would be greatly appreciated and thanks again for the great work.
progre55
Last edited by progre55 (2007-04-12 03:16:28)
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Which version of the plugin are you using. v0.2 fixed a bug with link_to_prev, so lets make sure you are up to date before proceeding any further. Thanks, Jeff
Offline
#11 2007-04-12 03:45:39
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Jeff:
I am using Version: 0.2.
progre55
Offline
#12 2007-04-12 03:48:29
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Jeff:
Also, if it helps you. I do see the text, but it does not “function”
progre55
Offline