Fork me on GitHub

Mod Dev Q: Search Integration  Bottom

  • Since we don't really have a developers forum for 3rd Party Questions, it makes it hard to do searches on dev issues, so if this is in here, someone link to it for me.

    I need to write the search plugin for a module I'm developing, I've looked at several of the search functions, and think I know what needs to be done, but since there's no template search, none of them seem to be commented very well. Is there some guide to creating thes earch plug.

    Also, all of them I looked at have actual HTML in the code, is there some reason they can't be done using pnHTML?

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Michael,

    No reason they can't be in pnHTML (or pnRender). The function names are consistent across the board. The searching of modules is one area that needs some serious work as it's not the best implemented solution as it stands at the moment. However the sections module search plugin is written in pnHTML so this maybe a good start.

    I'll make every effort to include a search API (as implemented in .8 ) file for the example module for the .8 release. One current area i'm working on is being able to support existing search module plugins vs .8 search API's.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Okay, I was wondering which one would be the best to go on. Thanks Marky Mark :D

    --
    Home Page | Find on Facebook | Follow on Twitter
  • [code[ if (pnSecAuthAction(0, 'Sections::', "::", ACCESS_READ)) {
    $output->Text("
    <font class="\"pn-normal\"" style=""text-color:$textcolor1""> "._SEARCH_SECTIONS."
    ");
    }[/code]
    What's the logic in this being HTML code and not pnHTML, that's what I was wondering about?

    --
    Home Page | Find on Facebook | Follow on Twitter
  • There's are two ways to approach pnHTML. One use the proper methods, two to set the the input mode to verbatim input and then output the HTML directly as is done in this case. It uses the text method of the pnHTML class to technically it is pnHTML. It doesn't really matter which way you do it so if your more comfortable with the proper pnHTML methods then go with that.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Okay, just wondering since all of them I've looked at do it that way, I was wondering if there was a reason for it.

    --
    Home Page | Find on Facebook | Follow on Twitter

This list is based on users active over the last 60 minutes.