The MU forums have moved to WordPress.org

Help! Need a customized search (14 posts)

  1. crsneilhedley
    Member
    Posted 14 years ago #

    Okay, in this thread I said I was considering adding a field to wp_blogs to streamline a query. But I've apparently taken the knowledge that was so thoughtfully provided to me and used it as a springboard to an entire day spent tearing my hair out.

    Here's what I'm trying to do... and forgive me, because it's going to sound ridiculously simple - but it's apparently not.

    All I want is to be able to have a page marked "Search By Name" that shows the user an empty search box and a button. When they click it, all I want to do is search all the blogs on my WPMU/Multi-DB install - BY BLOG NAME *ONLY* - and return a paginated result.

    The default search doesn't include the blog name in the search query. And while the Site Wide Search plugin from the Premium.WPMUDEV guys is a great plugin, it destroys SimplePress forum installs and the authors of each are pointing at the other and saying, "I don't know, ask HIM..."

    I can't use Google Custom Search, because with the nature of my content it would be in the worst taste imaginable to run Google ads with my search results.

    Can SOMEBODY point me in the right direction? It occurred to me after eight hours of frustration that I'm not even 100% sure how to customize the search itself, much less tweak the DB query to get the result I need.

    Thanks in advance,
    -- Neil

  2. andrea_r
    Moderator
    Posted 14 years ago #

    The default search only searches content.

    You could use blog topics, which categorizes the blogs, but it DOES have a search by blog name option already built in.

    http://wordpress.org/extend/plugins/blog-topics/

    (unless I'm misremembering and thinking of a mod we did to it...)

  3. DeannaS
    Member
    Posted 14 years ago #

    I think you're thinking of a mod you did, Andrea. :) Mine will list blogs by topic, but doesn't provide a search by name.

  4. DeannaS
    Member
    Posted 14 years ago #

    I should say, though, that there's talk in trac of adding blogname to the main blogs table, which would greatly simplify stuff like this. It won't happen in 2.9, but I'm guessing it'll be on the docket for the merge.

  5. andrea_r
    Moderator
    Posted 14 years ago #

    My magic 8 ball says most likely.

  6. jmunn
    Member
    Posted 14 years ago #

    If you find a solution for this crsneilhedley please post up. I would love to make use of it as well.

  7. andrea_r
    Moderator
    Posted 14 years ago #

    "I think you're thinking of a mod you did, Andrea. :) Mine will list blogs by topic, but doesn't provide a search by name. "

    I think you may be correct. :D

    Actually, I went & checked and our mod only listed the blogs on the search page. Hrm.

    you know - the code for this *is* already in the backend... on the Site Admin -> Blogs page and on the Site Admin index page.

    Snag the code from there.

  8. DeannaS
    Member
    Posted 14 years ago #

    Actually, it's not. If you click "search blogs by name" it really only searches the path. It assumes path and name are synonymous. Annoying, eh?

  9. andrea_r
    Moderator
    Posted 14 years ago #

    I smell a future trac ticket.

  10. DeannaS
    Member
    Posted 14 years ago #

    Yah, but then I'd feel all obligated to actually write a patch and all.... ;)

  11. andrea_r
    Moderator
    Posted 14 years ago #

    well, jane is trying to up the number of female contributors. :D

  12. DeannaS
    Member
    Posted 14 years ago #

    Yah, I saw that. I already told Donncha I'd work on the core updates to add the name to the main table, but he wants to wait until 2.9 goes live. Once that's done, the search by name will be easy peasy.

  13. andrea_r
    Moderator
    Posted 14 years ago #

    SWEET.

  14. jmunn
    Member
    Posted 14 years ago #

    The search on the Umass blog directory is super swanky I think.
    Just sayin.

About this Topic

  • Started 14 years ago by crsneilhedley
  • Latest reply from jmunn