• I’m not sure how to go about this, but currently I’m hand-linking related items.
    I don’t want to randomize or show from the same category, I would like to be able to have a multi-select box (on the same write/edit page or a popup), where I can choose “related posts”.
    Not sure if this is a plugin type thing, but I would love to have it.
    BTW, I have already read this post so don’t recommend it, it’s not what I’m talking about.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter stephenv

    (@stephenv)

    One more thing that would make it extremely useful… If I select an older post as “related” then it also updates the old post and links the new as related.

    I have implemented something similar on my site, but I also am basically hand-coding post IDs into a similar-posts table. I thought about the popup, but once you pass a few dozen posts, showing a popup isn’t really useful.
    What you really want is something like:
    1. for admin, a link shows up to start the process, “relate to post”, when on a single-post page. stashes the post ID value into the session (hmmm… how to do that…)
    2. buttons then show up which say “related post” and “done”. related post button adds the original post ID and related Post ID pair to the table, done button clears the original post ID field so the buttons all vanish.
    Hmmm. Now I want to go write this… 😉
    -d
    http://www.chait.net

    Well, I implemented it. It’s not ready for public consumption yet (I haven’t extracted it from CHAITGEAR custom stuff), but I actually have it working as I specified. Button to enter/exit ‘relating’ mode, and button to relate current post to the one you marked/entered from.
    Pretty cool, if I do say so myself. 😉 Learned a bit about cookies and using posts to pass stuff around. I should go rewrite chunks of CG-Amazon to use posts instead. 😉
    -d

    Definitely. Will do.
    The most painful part at the moment is that I think I want buttons you can click in normal lists/views, maybe next to each post title. That way, you pick a post to link to, use your Search function to match on a keyword, and quickly link the posts you want. Hmmmm….
    I also need a better ‘output’ function. Right now it dumps everything, and I’m guessing I need an option like my categorized-posts thing that allows a max count and random count….
    -d
    http://www.chait.net

    Alex

    (@bald_technologist)

    Hi, has this functionality been released anywhere? I too would like the ability to choose which posts are related as opposed to relying on automated methods.
    Thanks!
    Alex

    Hey BT-
    I’ve had it running on my site for the last month, but was a little hacked in. I’m still not sure it’s ready for primetime, but if people would like this sooner than later, I can pull something together over the weekend. Actually, I spent many, many hours this week working on this further towards that goal.
    This is a uni-directional, one-to-many table. I.E., you don’t say A and B are related, you specifically say A is related to B, B is related to A, if you want it bi-directional. This is somewhat purposeful (to control the related counts).
    Basic functionality is as follows:
    – Add one script call to your sidebar/menu, shows only to admins.
    – Add one script call to your posts loop and set a global at the top of index OR let the automatic code hook into the date display (requires you display date for every post).
    – When looking at a single post, a button will show up in the sidebar that says ‘Start Relating’. Clicking it sets a cookie setting the current post as the target.
    – Then, go to ANY view (homepage, cat, search, etc.). In those views, there will be a [+] button next to each (either following the date in auto mode, or wherever you put the call in manual mode).
    – Clicking the + button adds that post to the related-posts list for the ‘target’.
    – Clicking the + button also just refreshed the current page, and you’ll see the + is now a – instead. Clicking the – will take that post off the target post’s related list.
    – In the sidebar, the master button now says ‘Done Related’. Clicking it clears the cookie, turns off all the ‘editing’ buttons.
    – One function call then retrieves/shows the related posts list for a given post — I use it in the sidebar for single posts.
    Missing functionality:
    – no many-to-many mapping, or otherwise automatic bi-directional. You manually map all connections between posts.
    – Currently no view of ‘show me all the articles currently mapped to the target’ for easier deletion. That’ll have to wait a little bit.
    – My site has ‘post_type’ fields for segmenting the list. Segmenting by category might not be too too difficult, but isn’t on my top-10 list of things to do (CG-Amazon needs a lot of work!).
    -d
    CHAITGEAR

    Alex

    (@bald_technologist)

    Thanks for the detailed response! I would love to try out your code and am happy to be a guinea pig if you are ready for feedback on it. 🙂 Your functionality description sounds like a good match for my needs.
    alex

    Definitely, I’ll give you a ping. Also will see if you have thoughts on improving CG-Amazon too. 😉
    -d

    New PowerPack 1.0b8 now has some documentation for CG-Related. It’s barebones, but the basics are there…
    Now if only CHAITGEAR would be accessible so I can upload it. 😉
    -d

    That sounds pretty good so far, especially if you are getting your echo from setup_related_buttons in the sidebar…
    If you want to drop me a line, I can try to debug your site directly — I’ve done this with about two dozen folks over the course of the year. Sometimes I just can’t figure it out without being >in< the site in question. All I need is a temp admin account, and have all the cg stuff writeable so I can poke around with debug statements in the templates.
    Lemme know.
    -d

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Related Posts (user selectable)’ is closed to new replies.