Elsewhere...
Another excellent piece by Andy Rutledge, an admonition/checklist for being a professional designer/developer.
Both the BBC and Fox news web sites have recently been redesigned, with the BBC losing its looks and Fox getting neat and serious.
jQuery diagramming with jsPlumb — cool.
Another wonderful blog post by Walter Russell Mead, this time hoping that the blogosphere find a not-so-distant mirror in 18th-century London.
Google argues that its mobile YouTube site is better than its YouTube iPhone app.
Jakob Nielsen tests reading usability on the iPad and Kindle and reports that they’re almost as good as reading on paper. People didn’t like reading on PCs — it reminded them of work.
Falling out of love with the iPad. None of this surprises me.
Wow, icons made entirely in CSS3 (currently Safari, Chrome only).
-
Version
1.4.2 -
Download
Register and/or log in to download -
Type
Plugins -
Documentation
-
Elsewhere
EE Forums thread
Devot-ee page -
Buy now via PayPal
Sometimes a site needs more access to next and previous entries than ExpressionEngine’s built-in next/previous tags provide.
With the Nearby Entries plugin, you can display not just one but any number of next and previous links. Order them not only chronologically by entry date but by any column in the exp_weblog_titles table, such as edit date, expiration date, entry id or title. Filter them using standard weblog:entries parameters such as status, category, author and custom fields. And display their custom fields.
For more information, see the docs.
The price per ExpressionEngine installation is $15, it works for both EE v1 and v2, and it’s free to try before you buy.
ExpressionEngine Forums threads where Nearby Entries is mentioned as a solution:
How to construct a URL to the entry before most recent?
Mon 18 Jan ’10
4:15pm
Adam Khan
Yes, there’s an author_id parameter, documenting it now.
Mon 18 Jan ’10
4:39pm
Terry Evans
Awesome. This solves a major hurdle for me. Sending $$ to you today.
Mon 18 Jan ’10
4:53pm
Adam Khan
Excellent, post here if any problems. Remember the debug=“y” parameter can be helpful if you’re not getting the results you expect.
Mon 18 Jan ’10
5:51pm
Adam Khan
My mistake, the reason the author_id parameter wasn’t documented is because it wasn’t there. Now added in v1.0.3.
Thu 21 Jan ’10
2:53am
Steve Hurst
It figures, I just solved this issue with custom query tags… where were you a month ago? :)
Fri 29 Jan ’10
9:45am
shine
Hi Adam,
Using the above example returns:
Notice: Undefined variable: output in /home/club/public_html/admin/plugins/pi.nearby_entries.php on line 364
Notice: Undefined variable: output in /home/club/public_html/admin/plugins/pi.nearby_entries.php on line 364
I have enabled php for the template. I am basically trying to use the plugin to mimic something textpattern or wordpress does out of the box whereby you can link to next and previous entries in the same weblog.
e.g. http://www.opensourcecms.com/demo/1/85/Textpattern demo showing linking to next and previous at the bottom.
Any help would be great. Cheers!
Shine
Fri 29 Jan ’10
3:01pm
Adam Khan
Shine,
I’ve updated to v1.0.4 so that there won’t be a PHP notice from if the $output variable never gets defined.
A couple of things: are you sure you even need this plugin? If you just need a simple single next and previous from the same weblog, EE’s own built-in next and previous tags should be fine.
If you’re not getting any output at all, try the debug=“yes” parameter and see what it tells you.
Fri 29 Jan ’10
3:40pm
shine
Adam thanks for you quick response and fix.
I have looked at the built-in ee next and previous tags over at http://expressionengine.com/docs/modules/weblog/entry_linking.html
I was unaware I could do what I wanted with the built-in tags because I was not getting any output.
For example I have a weblog called spring collection. I then have for example 10 entries called tops, jeans, shoes etc etc.
I simply want the user to land on the page and view the latest entry and then have a button to have a link to the next and previous entries within the same weblog.
I assumed that your plugin was necessary to get this working.
Just will have to play about with both options to see if I can execute what I want.
Thanks once again.
Shine
Tue 23 Feb ’10
8:01pm
Tyler
I have just set the this_weblog (text) and this_urltitle (segment var) but still get no output. I have set debug to “yes” and I get this
Method: prev
This entry ID:
Prelim query:
Raw results: Array
Fields SQL:
Nearby Entries errors:
If there’s no entry_id there must be both a url_title and a weblog_name.
It looks like its not pulling the url_title / weblog to determine which entry it should be. Please help. Thanks!
Tue 23 Feb ’10
11:33pm
Adam Khan
Tyler, you’re right, it’s a bug introduced with v1.1, making the plugin compatible with both EE v1 and v2. Try the new version, v1.1.1, that should address the problem. (Good to see the debug option in use!)
Tue 23 Feb ’10
11:43pm
Tyler
Now were talking! Does exactly what I want. Brilliant plug-in!
Tue 23 Feb ’10
11:50pm
Adam Khan
Thanks, Tyler, pleased to hear it.
Tue 23 Feb ’10
11:58pm
Tyler
Using it with Low Seg2Cat to completely free up the URL structure in EE.
Wed 24 Feb ’10
9:37am
Adam Khan
> Using it with Low Seg2Cat to completely free up the URL structure in EE.
Crazy sh*t. Would be interesting to see an article on this.
Sun 28 Feb ’10
11:55pm
trif3cta
Fantastic plugin idea, although I’m having the same issue that Tyler was. I’m using 1.1.1.
I’m providing this_urltitle=’{segment_x}’ and this_weblog=‘channel_name’ in debug mode and getting back:
If there’s no entry_id there must be both a url_title and a weblog_name.
Thanks for the help.
@Tyler - pls do share, that sounds wicked.
Mon 1 Mar ’10
9:22am
Adam Khan
trif3cta, are you using Multiple Site Manager?
Mon 1 Mar ’10
3:16pm
trif3cta
Nope. My setup is like so:
/staff/profile/name
Name (segment 3) is what I want to key off, and I have a channel called staff. So this_urltitle=”{segment_3}” this_weblog=“staff” gives me the error.
The entry ID method returns the right data, however it’s not what I need in this particular case.
Thanks so much for the help.
Mon 1 Mar ’10
5:59pm
Adam Khan
trif3cta, it wasn’t working in EEv2. Try downloading v1.1.2.
Mon 1 Mar ’10
7:59pm
trif3cta
Thanks Adam, that seemed to fix it.
For some reason I can’t run both functions in the same template, whichever one listed first outputs the results of the query and the other one is blank (or in debug mode, it gives the (If there’s no entry….).
Forgive me if I’m being dense.
Mon 1 Mar ’10
8:58pm
Adam Khan
trif3cta, the density is all mine. Fixed in v1.1.3…
Tue 2 Mar ’10
2:42am
trif3cta
Works like a charm. Gracias.
Thu 1 Apr ’10
6:03am
vinay
I am not able to sort the entries in
{exp:nearby_entries:next this_urltitle=”{segment_3}” this_weblog=“photos” debug=“n” limit=“5” orderby=“entry_id” sort=“desc”}
The output entries always gets sorted in “ASC” rather than what i specified. Anyway to solve this?
Thu 1 Apr ’10
6:06am
vinay
Actually when i use sort=“asc” in next loop, i get very weird results… very random entries…
Thu 1 Apr ’10
10:23am
Adam Khan
Thanks for trying the plugin, vinay. I’m taking a look now at the problem…
Thu 1 Apr ’10
11:09am
Adam Khan
Vinay, I’m seeing that when using orderby=“entry_id” and sort=“asc” for the next function, it ends up producing the same thing as the previous function. Working on it.
Thu 1 Apr ’10
4:39pm
Adam Khan
Vinya, there was a step missing in the logic, which I’m trying to fix, but the plugin won’t take two instances of a weblog (well, it does, but the second one ignores important parameters).
I’ve got to give up on this today—I’ll resume working on the fix tomorrow or Sunday.
Mon 5 Apr ’10
5:20am
vinay
Hi Adam,
Thanks for the info. Let me know if you fix this.
Mon 5 Apr ’10
11:41am
Adam Khan
Vinay, you can now download v1.2.3, and the problem should be fixed.
Because the fix required another level of complexity, the plugin now also has another level of control. See the this_orderby and this_sort parameters.
Tue 6 Apr ’10
1:49am
vikhel
Hi Adam, I am trying to download v1.2.3, but there is an error that says
“Oops, there is no file at this URL. Hopefully you can find what you’re looking for in the adjacent lists.”
Tue 6 Apr ’10
2:12am
Adam Khan
Vikhel, thanks for the heads-up. Try now.
Tue 6 Apr ’10
2:41am
vikhel
Hi Adam,
Getting this error when there are no prev entries
Notice: Trying to get property of non-object in /data/home/app/www/system/plugins/pi.nearby_entries.php on line 100
Warning: Invalid argument supplied for foreach() in /data/home/app/www/system/plugins/pi.nearby_entries.php on line 108
Tue 6 Apr ’10
2:46am
Adam Khan
Will fix that tomorrow (late here, need to be fully awake…).
Tue 6 Apr ’10
9:42am
Adam Khan
Vikhel, I can’t replicate this problem. Can you switch the debug paramter to “yes” and either post the results here or email me them?
Meanwhile I’ve updated the plugin to v1.2.4.
Wed 7 Apr ’10
2:43am
vikhel
Hi Adam,
I am using next loop inside weblog:entries
{exp:weblog:entries weblog=“contest_photos” limit=“1” disable=“trackbacks|comments” status=“Open|Featured”}
{exp:nearby_entries:next this_entryid=”{entry_id}” debug=“n” limit=“5”}
{embed=“seaawards/photocarousel” curEntryID=”{nearby:entry_id}”}
{/exp:nearby_entries:next}
{/exp:weblog:entries}
The error appears only when you are viewing the latest entry. As there is no next entries, it displays the error. When i set debug=“y”, i get
Notice: Undefined variable: fields_sql in /data/home/app/www/system/plugins/pi.nearby_entries.php on line 642
Notice: Undefined variable: final_sql in /data/home/app/www/system/plugins/pi.nearby_entries.php on line 643
Wed 7 Apr ’10
6:33pm
Adam Khan
Vikhel, those are errors generated by EE. The plugin itself should generate some info instead of the actual output when its debug paramter is set to “y”.
I tried on the latest entry myself and didn’t get those errors, that’s why I’m thinking maybe there’s a clue in the plugin’s own debug notes in your scenario.
Sat 10 Apr ’10
10:21pm
mgr88
Hi Adam,
I’m just trying it out and using the code snippet for year/month/date links, with appropriate changes for EE2. It all works well except that the php code doesn’t parse when it is inside the nearby tags.
I’ve got php enabled for the template and when I put the equivalent php date code outside the tags it gives the date with correct formatting. But when the code is inside the tags the output is a literal repeat of the code.
Michael
p.s. thanks for the great “How I Built Subtraction” article.
Sun 11 Apr ’10
9:49am
Adam Khan
Michael,
Thanks for trying the plugin. Did you try the parse=“inward” parameter?
Sun 11 Apr ’10
10:53am
mgr88
Hi Adam, I just added the parse=“inward’ parameter. It hasn’t made a difference. I’m using EE 2.0.1 on MAMP 1.8.4 and MasOSX 10.6.3.
This segment of input with the same 2 calls, one inside and one outside:
{exp:nearby_entries:next ......
....
<?php echo date(“Y/m/d”, “{entry_date}”); ?>
{/exp:nearby_entries:next}
<?php echo date(“Y/m/d”, “{entry_date}”); ?>
Gives this output
<?php echo date(“Y/m/d”, “1213886097”); ?>
2008/06/19
Michael
Sun 11 Apr ’10
5:40pm
Adam Khan
Michael, one other thing—is PHP set to the output rather than input stage in template settings? It won’t work with PHP set as input—no plugin will I don’t think, due to EE’s template parsing order.
Sun 11 Apr ’10
7:30pm
mgr88
Hi Adam, yes, PHP is set to output.
As a check to see if it was a general issue with plugins, I put the same php code inside twitter timeline tags on the same page. That rendered the dates correctly.
I also checked the logs inside MAMP and couldn’t find any error messages.
Michael
Mon 12 Apr ’10
7:39am
Adam Khan
Michael, the problem was due to introducing EE’s xss_cleaning functionality in v1.3.
I’ve added a parameter to v1.3.1 of the plugin, allow_php, which if set to “yes”, makes the plugin not use xss_cleaning, thereby allowing PHP within the plugin.
Thanks for the heads up, I’ll add this parameter to other plugins.
Mon 12 Apr ’10
10:33am
mgr88
That fixed it. Thanks so much for your prompt help.
Michael
Mon 26 Apr ’10
5:13pm
mgr88
Hi Adam, sorry to bother you again. I just upgraded EE to version 2.0.2 and something seems to have changed. The plugin now gives the following error.
Cheers,
Michael
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Channel::$query
Filename: nearby_entries/pi.nearby_entries.php
Line Number: 586
Wed 28 Apr ’10
2:28pm
Adam Khan
Sorry about the delay Michael, I’ve been travelling this last day. Will get to the fix as soon as I can.
Wed 5 May ’10
7:11am
Adam Khan
Michael, I had to take an unscheduled trip and am now back and catching up. My apologies again for letting this problem sit so long. I’ll be addressing it today, Wednesday.
Fri 7 May ’10
6:30am
Adam Khan
Michael, change made to adapt to changes in EEv2.0.2. Should work now.
Tue 11 May ’10
9:05am
mgr88
Hi Adam,
thanks again for this.
Fri 21 May ’10
4:37pm
Kyle Batson
Hi Adam,
The plugin is working properly except for getting to an entry that has no previous entry. When that happens it outputs the following error:
Notice: Trying to get property of non-object in /plugins/pi.nearby_entries.php on line 103
Warning: Invalid argument supplied for foreach() in /plugins/pi.nearby_entries.php on line 111
This is my code:
{exp:weblog:entries weblog=“comics” limit=“1”}
{comic_image}
{exp:nearby_entries:prev this_entryid=”{entry_id}” this_weblog=“comics” author_id=”{author_id}” limit=“1”}{nearby:entry_id}{/exp:nearby_entries:prev}
{/exp:weblog:entries}
Fri 21 May ’10
5:43pm
Adam Khan
Kyle, I’m not able to replicate that problem. Can you plugin in the debug=“y” parameter and report the results here? You’re on EE v1.x, right?
Fri 21 May ’10
8:08pm
Kyle Batson
Turning on debug added the following errors:
Notice: Undefined variable: fields_sql in /plugins/pi.nearby_entries.php on line 650
Notice: Undefined variable: final_sql in /plugins/pi.nearby_entries.php on line 651
Parse error: syntax error, unexpected T_LNUMBER in /core/core.functions.php(653) : eval()‘d code on line 5
Method: prev
This entry ID: 2
Prelim SQL: SELECT entry_id FROM exp_weblog_titles WHERE weblog_id = ‘1’ ORDER BY entry_date desc
Raw results: 1
Limited results:
Fields SQL:
Final SQL:
Fri 21 May ’10
8:09pm
Kyle Batson
And yes. EE 1.6.9, latest build.
Tue 8 Jun ’10
8:06pm
Kyle Batson
Any thoughts Adam? Thanks.
Thu 10 Jun ’10
6:43am
Adam Khan
Sorry Kyle, I forgot all about this one. Will get on it this afternoon (UK time) and try again to discover the problem.
Thu 10 Jun ’10
8:08pm
Kyle Batson
No worries.
Let me know if there’s anything I can do to help.
Fri 11 Jun ’10
8:07am
Adam Khan
Kyle, how many entries do you have in the Comics weblog?
Fri 11 Jun ’10
9:17pm
Adam Khan
Thanks for staying on this, Kyle. Problem now fixed in v1.4.2.
Mon 18 Jan ’10
4:11pm
Terry Evans
This extension loolks really great.
Say I have a weblog and I want to show the next previous entries of only the currently viewed weblog entry’s author. Is it possible to filter entries by author?