Need someone to lead product management at your software company? I create software for people that create software and I'm looking for my next opportunity. Check out my resume and get in touch.

Comments

Comments for Related Entries Plugin

Excerpt: A Movable Type plugin that inserts entries that are in the same category as the current entry. Now version 1.1. Read the whole article…

Michael
July 26, 2002 8:35 PM

Very, very nice. Exactly what I needed. Thanks.

Christine
August 1, 2002 11:03 AM

Awesome! Thanks! I posted about it at scriptygoddess.com - hope you don't mind!

andersja
August 6, 2002 1:48 AM

Thanks for the Plugin! It works like a charm! Tip for MT newbies (like myself): make sure the "Licence" file stays out of the "plugins"-folder - otherwise super-easy to install and use thanks to the instructions above :-)

Adam Kalsey
August 6, 2002 8:05 AM

Yes, Movable Type 2.21 tries to use all files in the plugins directory as a plugin. That will be fixed in a future version of MT.

tajuddin
August 21, 2002 3:17 AM

Hi Thanks for the plugin of Related Entries. But can u guide me on how to find related entries based on the words given in the Excerpt. Thanks and Regards Bharde Tajuddin Software Engineer Netcore Solutions Pvt . Ltd

Adam Kalsey
August 21, 2002 8:59 AM

I'm planning a new release of the plugin that would support that.

tajuddin
August 21, 2002 10:29 PM

Hello I had installed the plugin for Related Entries but it seems that the program RelatedEntries.pl does not work at my end nor does it give me any error. Can u help me out. Regards BHarde Tajuddin

tajuddin
August 21, 2002 10:31 PM

Hi Adam Can I know when the new plugin for RelatedEntries which will look for teh keywords in the Excerpt will be available. Regards Tajuddin

Adam Kalsey
August 21, 2002 11:02 PM

There's a wide variety of things that could cause the plugin to fail. You could be using the wrong version of MT. To use most plugins you'll need MT 2.21 or later. You could have the plugins directory set up wrong. It needs to be in the directory where MT is installed and needs to be all lower case. You might have extra files in the plugins directory. Remove any file that doesn't end in .pl You might need to set permissions. The minimum permissions for the file is 644. You might be using the plugin outside of an entry. You'll need to use this on your individual archives in order for it to work. You can't use this inside of an MTEntries container. (Well you can with a funky MTInclude template hack, but it's best not to.) There are lots of other reasons why it wouldn't work. Perhaps you could explain more what you are trying to do and how you are trying to do it. A URL can often help as well.

Adam Kalsey
August 21, 2002 11:08 PM

I don't have a particular release date in mind for the next revision of the plugin. The syntax will be similar to the related syntax of MTAmazon.

tajuddin
August 22, 2002 1:05 AM

Hello Thanks for the suggestion on where I had gone wrong in the installation of Related Entries. I found out that it was my mistake. Now the Related Entries is working fine Regards Bharde Tajuddin

Justin Hall
September 6, 2002 2:42 PM

Thanks for the plug-in, I installed it on http://joi.ito.com/ . One question - if an entry has multiple categories, does this plug-in choose from among all of them the most recent? Or only for the first category associated with that entry?

Adam Kalsey
September 6, 2002 2:49 PM

The plugin only uses the primary category.

Donna
September 11, 2002 12:22 PM

Adam, installation went smoothly, and I am using your example code to pull in the last three entries on my individual entries template - would there be an obvious reason why it's pulling in the three latest entries regardless of category? Thank you!

Adam Kalsey
September 11, 2002 12:37 PM

Looking at your HTML source, the closing MTRelatedEntries tag is showing up there. That means that there was an error while running the plugin. Could you take a look at your server's error logs and let me know what that error was?

Donna
September 11, 2002 1:21 PM

Adam - This is the error message: plugins/RelatedEntries.pl did not return a true value at /home/nammer/public_html/mt/lib/MT.pm line 79.

Adam Kalsey
September 11, 2002 5:36 PM

After a private email exchange with Donna, we figured out that the plugin had not been uploaded in ASCII mode. Uploading it as an ASCII file fixed the problem.

Bob Day
September 13, 2002 1:10 AM

Adam, Congratulations of such a nice job with Related Entries. I have a question for you though. I'm curious if alphabetization or ordering of the related entries is now, or perhaps someday will be, an option with the this plugin.

Adam Kalsey
September 13, 2002 5:38 PM

At the moment, the entries are shown in reverse chronological order. But there's going to be some changes coming when MT 2.5 is released, so I can look into including that as well.

Dylan Tweney
September 27, 2002 2:18 PM

This plugin is a great idea! Only, I'm having the same problem as Donna did, above: The plugin seems to work, but shows the 3 most recent entries of any kind, instead of filtering by category. I tried re-uploading the plugin in ASCII mode but that didn't seem to fix it. Am I missing something?

Jian Shuo Wang
November 4, 2002 10:29 PM

Yes. It seems I am the third one to encounter the problem Dylan Tweney described. Can anyone give us a sample template that works. Thanks

Jian Shuo Wang
November 5, 2002 12:02 AM

I found tag is still in my HTML, but no starting tag . I don't have access to my server log. There is what I did: 1. Create a folder named plugins (all in lower case, and with "s" in the name) under mt folder, where the mt.cgi resides. 2. Upload "RelatedEntries.pl" (1.82K) to the folder. It is the only file in that folder and I tried to upload in ASCII mode. 3. Put the you gave to the Individual archive template. 4. Here is the result page: http://home.wangjianshuo.com/archives/20021012_where_is_daocheng.htm#000043 Can anyone help me to figur out the reason? I am posting the detail repro steps since I believe I am not the first one in the world to encounter this problem. Thanks.

Jason
November 5, 2002 7:29 AM

Looks like the Related Entries only pickup on the Primary Category. Is there any way to make it look at the Additional Multiple Categories?

Adam Kalsey
November 5, 2002 8:51 AM

Donna's problem was fixed by uploading the plugin in ASCII mode. The template is not the problem. Having the final related entries tag appear in the code indicates that the plugin didn't finish running. That could be for a variety of reasons, and not having access the error log will make this very difficult to troubleshoot. If I don't know what's going wrong, how can I fix it? I looked at your sample page, but I don't see the closing tag appearing in your HTML. That would indicate to me that the plugin is now working.

Adam Kalsey
November 5, 2002 8:53 AM

Changing the plugin to work with categories beyond the primary one would cause the rebuild process to be very very slow.

Raymond
November 9, 2002 2:05 PM

That was my first "Plugin" for MT. Thank you so much. I feel very accomplished now.

Jacques Distler
November 21, 2002 2:44 PM

When I first create an Entry, this plugin produces a list of the N previous entries in the same category. But, if I ever rebuild my blog, this is replaced by a list of the CURRENT N most recent entries in that category. how do I prevent this? There must be a way to set the context so that <MTEntryID> is the starting point of the list produced by this plugin.

Jacques Distler
November 22, 2002 12:43 PM

Well, I ended up looking at the sourcecode for the plugin, and found that it was a fairly easy hack to get it to do what I want. Details at: http://www.movabletype.org/cgi-bin/ikonboard/ikonboard.cgi?s=3dde95054f54ffff;act=ST;f=14;t=10827

Adam Kalsey
November 23, 2002 8:50 PM

That was a popular request recently. Thanks for the patch.

Erik
November 27, 2002 4:07 AM

Bit of a problem... when I include the date with the listing as follows: ">» : The very last entry doesnt display a date. I've even tried shuffling the entry dates on items around to see if it was a specific entry, but whatever item I move to the last slot doesnt get a date.

Erik
November 27, 2002 4:10 AM

Ignore my last post.. not only did the code go away but I realized I was just doing something stupid anyway... so sorry .

mini-d
December 21, 2002 11:23 AM

It's a nice plug-ins but there's an error when i try to rebuild my individual entries, like this ones... who appear in the rebuild window: MT::App::CMS=HASH(0x81511c0) Use of uninitialized value in length at /var/sites/minid.net/cgi-bin/mt/plugins/RelatedEntries.pl line 19. MT::App::CMS=HASH(0x81511c0) Use of uninitialized value in length at /var/sites/minid.net/cgi-bin/mt/plugins/RelatedEntries.pl line 19. MT::App::CMS=HASH(0x81511c0) Use of uninitialized value in length at /var/sites/minid.net/cgi-bin/mt/plugins/RelatedEntries.pl line 19. MT::App::CMS=HASH(0x81511c0) Use of uninitialized value in length at /var/sites/minid.net/cgi-bin/mt/plugins/RelatedEntries.pl line 19. MT::App::CMS=HASH(0x81511c0) splice() offset past end of array at /var/sites/minid.net/cgi-bin/mt/plugins/RelatedEntries.pl line 77. I try to discover what's happen or what i did wrong i've uploaded the plug-in to my plugin folder and set 755 permissions but it seems it's not ok... i've copy/paste exactly like you wrote the examples and it seems i'm not so wrong at now...

Dean
December 28, 2002 10:49 AM

Apparently, mini-d you are not the only one, me too noticed the 'error' message each time I rebuilt the site. Nontheless, everything seems to be working fine. Puzzled!

Eduardo Arcos
December 29, 2002 10:27 PM

Hello, i've installed your plugin, which is great. But I have the same problem as Diego (mini-d) Posts relacionados Use of uninitialized value in length at /home/alt1040/public_html/cgi-bin/mt/plugins/RelatedEntries.pl ...etc etc etc Uploaded in ASCII, no strange files in the plugin directory, 755 permissions, etc, etc, etc and I am using Movable Type 2.51 Still the plugin works. It shows up the related entries with the correct category filtering, but i removed it fearing of a database corruption. Hope you can help me :-)

Rick Cogley
January 16, 2003 4:29 AM

I am getting a hash error on rebuild - lots of them, actually, and it does not seem fatal or stop the build. The message is - MT::App::CMS=HASH(0x83313a8) Use of uninitialized value in length at /virtual/rcogley/public_html/mt/plugins/RelatedEntries.pl line 19. And it is repeated many time. I suspect it might be related to my entries with no category assigned, but can you please explain what it means? Thank you. Kind regards Rick Cogley

Jonathon Delacour
February 1, 2003 8:35 PM

I've also encountered the error message mentioned by the last few commenters. However, I'm also experiencing a problem not reported by anyone else. At first I thought the plugin was skipping the 10 most recent related entries and displaying the next 10 entries after those. But, checking other individual entry pages, it appears that an arbitrary set of 10 consecutive related entries is being displayed rather than the 10 most recent related entries. There is no related entries tag in the HTML nor are there any suspicious messages in the error log. Thanks...

Adam Kalsey
February 3, 2003 9:44 PM

The "Use of uninitialized value in length" error is a known bug. I'll fix it when I get a chance. It doesn't have any negative side effects, other than that warning message. The plugin still does what it's supposed to and readers of your blog won't encounter any problems. The other problem with the 10 random entries is odd. I've never seen anything like it and can't think of why it may be happening. I'll email you privately and see if we can't figure it out.

philipp
February 17, 2003 1:47 AM

I want to thank you for this tag, it's *extremely* useful. I was wondering if it could be made to list related entries by month? I need the ability to display entries that are in the same month as the current entry. I do have monthly archives, but I have no idea how to get MT to show the titles of those related monthly entries on each Individual Archive page. Any help or advice would be much appreciated.

Adam Kalsey
February 17, 2003 10:14 AM

The plugin doesn't currently have that feature, and I can't think of any way to do it using existing MT template tags.

philipp
February 17, 2003 11:42 AM

I couldn't think of one either! The only option that seems promising is doing a direct database query using MTSQL, but I don't yet know the proper syntax for checking the year-month part of the entry_created_on date string. I posted the problem to the MT boards; let's see if anyone has the answer. In the meantime, would you please consider adding that functionality to this plugin? I think it's a natural extension of Related Extries.

Philip Parodayco
February 17, 2003 2:15 PM

Got it working using the mtsql plugin. I'll post the code on MT once their boards are back up and running.

Trackback from kiesows.de
February 19, 2003 11:05 AM

related entries

Excerpt: ich habe heute mal das Related Entries Plugin installiert. den effekt sieht man auf den individuellen seiten der beitrage (die

Dean Peters
February 24, 2003 7:00 AM

I installed your plug in and got some noisy warnings: MT::App::CMS=HASH(0x8356070) Use of uninitialized value in length at plugins/RelatedEntries.pl line 19. Here's a work-around I put in to quiet it down: my $arglen = ($args->{field$}) ? length($args->{field} : 0; my $method = ($arglen) ? $args->{field} : "primary_category"; I suspect this may have to do with the way Perl is installed on my system, but the above work around wouldn't be harmful current implementations.

Dean Peters
February 24, 2003 7:08 AM

You know that last code change I suggested? Forget it. It stops the error but enumerates all entries in all categories. Instead, I've tested the following, a bit kludgier, but it works: my $method = "primary_category"; $method = (length($args->{field}) > 0) ? $args->{field} : "primary_category" if($args->{field}); Sorry about that other one.

Rich Z
February 24, 2003 8:04 PM

That fix by Mr. Peters (feb 24, 2003) worked great for me. My web site is on a Microsoft-IIS/5.0 with perl version 5.006001 (perl compile version MSWin32). Great plugin, thanks. -Rich

Trackback from my idiolect
March 21, 2003 1:54 PM

First Plugin Installed

Excerpt: Installation of a plugin leaving a link–trail to related posts (by category).

Paul O
March 26, 2003 4:34 PM

Thanks for a v.useful plugin. I too am getting the noisy warnings which it would be nice to get rid of. Any news on a fix?

Asparagirl
March 30, 2003 5:40 PM

Is there a way to do this for *secondary* categories as well? For example, let's say I have an entry up about eating an apple. This has the main category of "Fruit" and the secondary category of "Things I Did Today". Right now, this plugin will let me display other entries in the main category, Fruit. Can I also display a separate section for other entries from Things I Did Today? How about a section that lists all entries that are in both Fruit and Things I Did Today, just as this entry is?

Adam Kalsey
April 1, 2003 2:32 PM

The plugin doesn't do that. It only works with the primary category or the keywords field. I'd love to do it, but I've got a variety of projects going right now that have me pretty booked up. Realistically, it will be June before I have the time to devote to this. Although, if someone wants to contribute a patch, I'd be glad to fold it into a release.

zmustapha
April 21, 2003 10:14 AM

Hi, I downloaded and installed plug-in as instructed. But, when I published, MT gave me this notice: MT::App::CMS=HASH(0x8352170) Use of uninitialized value in length at /....blablabla/RelatedEntries.pl line 19. It worked though, gave me all the related entris I had. But whatever does that error message mean?

ColdForged
April 30, 2003 12:30 PM

Thanks for the plugin. I'll be the second with Philip's type of problem. If you look at this page http://coldforged.org/archives/2003/04/08/a_chorus_line.html the related entries are quite far in the past, even though I've rebuilt the pages as recently as 10 minutes ago. And, curiously, it starts 10 entries from the entry it should (going by the "humor" index). Did you and Philip come to any decision regarding the cause of this?

ColdForged
April 30, 2003 12:33 PM

As a follow-up, the "Humor" category appears to be the only one with this malady. Okay, that's odd.

Trackback from yowkee essential
May 4, 2003 3:35 AM

Link Fest: May 4th 2003

Excerpt: Slow day, traditional Sunday to spend on shopping. I got some links-n-read: Jeremy Zawodny: Revisiting FreeBSD vs. Linux for MySQL MySQL doc: FreeBSD Notes Kalsey: Related Entries Plugin Kalsey: Related Entries Revisited Simon Willison: Experimental fe...

Dunc
May 8, 2003 6:29 AM

Thanks for the pluggin. It's great, and I had it up and running in no time. Dunc

Trackback from LANGUAGEMAVEN
May 23, 2003 11:45 PM

Back Online

Excerpt: I have rebuilt the design from the ground up...again. I used a couple plugins for some of the features I...

KO
June 19, 2003 10:51 PM

I posted a more detailed message yesterday in the MT forums.. basically the related entries plugin throws an error on rebuilding but seems to rebuild fine, although slowly. Will you be doing any further work an this plugin? It is very usefull indeed. Here is the link to the MT forum thread: http://www.movabletype.org/support/index.php?s=854c578a4e4928964f0fb7af97a91b08&act=ST&f=20&t=5652&st=15

KO
June 20, 2003 2:22 PM

Well I added the fix suggested above in the comments, and MT is now silent. It still rebuilds a lot slower with this plugin than without, and I have only about 60 entries. Would the MTSQL version you have elsewhere be faster? I understand it is quite a bit better, but even this plugin is good enough for me, and saves the hassle of deailing the the sql/php whatnot.

John Hoke
June 20, 2003 6:12 PM

Thank you for a *great* tool, I got it installed and running in under 5 minutes and workes beautifully! Example running @ my site is http://john.hoke.org/archives/2003/06/saving_private_jessica.php The only issue I have is the over reported issue with line 19.. no biggie still flies, but if I get sometime to tweak it I will see if I can squash it ;) THanks again! -John

Jayant Kumar
July 1, 2003 3:33 PM

Thanks for the plug-in. Until today we had it up and running just fine. I re-categorized my articles to have 1 of 5 primary categories and then different secondary categories. After making this change, Related Entries does not show the latest 5 entries for 2 of my primary categories, instead choosing 5 starting some random day in the past. This works for the other 3. This problem is similar to ones described earlier by ColdForged and Philip. Was there any resolution to this? Thanks.

Jaime Pirnie
July 11, 2003 2:45 PM

I have separated my navbar into its own template so that I can have it loaded with other index files on the fly. This way I only have to update the navbar in one place and it shows up everywhere else. The Recent Entries section shows entries from all the different categories, not just the one category that you are looking at. How do I get this to work in this fashion? The navbar is being put into the main index files with the MTInclude command. Any help would be appreciated. -Jaime

Fil
July 16, 2003 7:45 AM

The plugin seems to be working fine, but on rebuild I get this: MT::App::CMS=HASH(0x835971c) Use of uninitialized value in length at plugins/RelatedEntries.pl line 19. Any ideas?

Lee
July 17, 2003 2:41 AM

Hi, Great plugin, just what i need. However i am having a small problem in that it displays all entries for all categories rather than the related entries from one category. I think otherpeople had the same problem, which thinking related to uplaoding in ASCII, which i have done. but it still displays all entries.

John Hoke
July 22, 2003 1:59 PM

I am noticing some strange behavior. The plugin is grabbing the OLDEST articles in the category, not the newest. Example: http://john.hoke.org/archives/2003/07/erza_pray_for_biden.php There are many more recent entries that are in the same category Ideas?

John Hoke
July 22, 2003 3:23 PM

Sorry, I really had to remove the plugin until I could figgure out why it was returning such old entries even after a full rebuild so the link above wont show the issue anymore -john

Dave
July 28, 2003 9:34 PM

Thanks so much for your hard work. I used Dean peter's work around and it is awesome. Please keep up the good work.

Trackback from Bomber0@NeT
August 6, 2003 12:48 AM

Related Entries

Excerpt: This Blog equipped the Kalsey's Related Entries.. http://www.kalsey.com/2002/07/related_entries_plugin/...

Barbara Lynn
September 8, 2003 3:43 PM

I would like to add a bullet such as: → before each link, remove the date and have a line break at the end of each entry ala recent posts. I get cms hash undefined error message which happens when I alter the code in the ind. archives template. All I did was remove the date and accompaning 1 and p tag. add a br to the end of the a href tag and enclosed in bold tags → before the a href tag. Sice this post doesnt accept html I cant post the actual code sample. bkynn blynn

Adam Kalsey
September 8, 2003 3:46 PM

You are probably getting the "line 19" message. Look through the comments for a fix.

Ronaldo
October 19, 2003 5:57 PM

Firstly, thanks for the plugin. It's a very nice piece of work. I've been using it since I installed MT and it has served me well. Just a question... Has the problem reported in the comments above about a splice offset past the end of array in line 77 been solved? I ask because I just upgraded to MT 2.64 while moving to a new hosting provider, and I'm consistently getting this error on some entries. The error effectively prevents the entry from being rebuilt, and it seems to happen when the entry has fewer related entried than specified in the plugin parameters.

Alan
November 12, 2003 12:14 PM

There are two bugs in the Perl script: a. use of uninitialized value in line 19; b. splice extending past the end of the array. Here are the diffs to fix the script: --- /home/aks/RelatedEntries.pl Tue Dec 17 11:12:44 2002 +++ RelatedEntries.pl Wed Nov 12 12:10:24 2003 @@ -16,7 +16,10 @@ my($ctx, $args) = @_; use MT::Entry; use MT::Placement; - my $method = (length($args->{field}) > 0) ? $args->{field} : "primary_category"; + my $method = (%args + && exists($args->{field}) + && length($args->{field}) > 0) + ? $args->{field} : "primary_category"; my $blog_id = $ctx->stash('blog_id'); defined(my $ctx_entry = $ctx->stash('entry')) or return $ctx->error("No entry found. Perhaps you used outside your ind ividual archive?"); @@ -74,7 +77,7 @@ }) or return ''; push(@entries, @entriesNew); - splice(@entries, $lastn); + splice(@entries, $lastn) if $lastn id == $id; # it's own Related list @@ -107,4 +110,4 @@ } } return "25"; -} +}

Colin
November 21, 2003 8:32 AM

Great plugin. Thanks. Being picky, could you help me to stop it inserting a line space between each of the related entries? Its taking up a lot of room.

eouia
December 4, 2003 11:42 AM

It's odd. It works well in some categories, doesn't in others. what's the problem? i can't figure out. in bad cases, this plugin shows some related entries in their category. but, they are not recent. some "related" entries are too old-dated, not recent.

Nick
July 29, 2004 1:53 PM

Righteous Plugin... but I can't get that patch to work, when I run it I get - Patching file RelatedEntries.pl using Plan A... patch: **** malformed patch at line 4: my($ctx, $args) = @_; Anyone else suffer this fate? I wouldn't care about those line 19 errors, but this is for a client who will get nervous if he sees 'em

Moloko
August 30, 2004 2:36 AM

Hello. Great plug-in! But: there is a way to show the current post in the "related post" and have it not clickable? I need it for a list of products, the list should be the same, but i don't wont the link to the product i'm looking. thanks M

Trackback from お知らせ
October 26, 2004 1:06 AM

Related Entries Plugin を導入

Excerpt: Related Entries Pluginより。 ニュースサイトのように関連記事を表示したかったので導入してみました。...

Trackback from マガジーンズ・技術フォーラム
October 29, 2004 12:43 AM

自サイト内の関連記事を拾うプラグイン

Excerpt: 自ブログ内の関連する記事を 自動で拾う方法はないかと、考えていました。 カテゴリで区切ってある程度は うまくいきますが 忘れている記事や、同じようなタイトル、また連載の...

Trackback from BlogFirefox
January 3, 2005 1:41 AM

Related Entries Plugin

Excerpt: 利用Keyword来进行MT的「关联文章」的表示方法已经有介绍了。今天又看到了一...

surfer
January 11, 2005 7:40 AM

I just install your plugin (MT3.14), but I get this error: Use of uninitialized value in length at /Library/WebServer/CGI-Executables/plugins/RelatedEntries.pl line 19. splice() offset past end of array at /Library/WebServer/CGI-Executables/plugins/RelatedEntries.pl line 77. What must I do? Thanks.

This discussion has been closed.

Recently Written

Too Big To Fail (Apr 9)
When a company piles resources on a new product idea, it doesn't have room to fail. That keeps it from succeeding.
Go small (Apr 4)
The strengths of a large organization are the opposite of what makes innovation work. Starting something new requires that you start with a small team.
Start with a Belief (Apr 1)
You can't use data to build products unless you start with a hypothesis.
Mastery doesn’t come from perfect planning (Dec 21)
In a ceramics class, one group focused on a single perfect dish, while another made many with no quality focus. The result? A lesson in the value of practice over perfection.
The Dark Side of Input Metrics (Nov 27)
Using input metrics in the wrong way can cause unexpected behaviors, stifled creativity, and micromanagement.
Reframe How You Think About Users of your Internal Platform (Nov 13)
Changing from "Customers" to "Partners" will give you a better perspective on internal product development.
Measuring Feature success (Oct 17)
You're building features to solve problems. If you don't know what success looks like, how did you decide on that feature at all?
How I use OKRs (Oct 13)
A description of how I use OKRs to guide a team, written so I can send to future teams.

Older...

What I'm Reading

Contact

Adam Kalsey

+1 916 600 2497

Resume

Public Key

© 1999-2024 Adam Kalsey.