Jump to content

Post Icon Column


Michael R

Recommended Posts


I am using an article modification from [url="http://community.invisionpower.com/resources/articles.html?record=449"]http://community.inv...html?record=449[/url]



I need to test it to see if it works in view new content and other searches




I just tried it. I doesn't show up in searches. :(
Link to comment
Share on other sites

I dug for about an hour through the code for search, and to be honest I can't even find where it generates the HTML output, let alone make changes to it. The skin bit simply references "$results['html']" which appears to contain the entire freaking HTML table row. Too much hardcoding in the search function for me sorry.

Link to comment
Share on other sites

  • 5 weeks later...
  • Management

I've updated the linked article with the change to add post icons to search results. We're so lucky IPB doesn't follow that "SELECT only what you use" paradigm in development - it's only IPS' tendancy to "SELECT *" everything that allows us to drop this stuff back in.




You are correct that you *should* only select what you need. However, as most of our systems are abstracted or allow abstraction such as hooks, mods, applications, etc, we often found ourselves adding more columns back in until it seemed more logical to just select * unless you are after something very specific (an ID, for example).

In most cases where we use SELECT *, we really want to return most of the data. We may not be interested in a few columns but we select them anyway so that other processes can make use of them if they are needed.

When you develop extensible mass deployable software, you soon learn to throw the theory books out of the window and go with what works.
Link to comment
Share on other sites


I've updated the linked article with the change to add post icons to search results.



Mat (FDNZ), great article. Just want to add this optional tweak. When you're in forumindexTemplate, if you put your code right after

{$data['prefix']}

And right before this

<if test="topicreported:|: isset( $this->memberData['_cache']['report_temp']['post_marker'] etc.


Then the Post Icon will appear to the left of the "go to first unread post" icon. Just a matter of personal preference. Figured I'd mention it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...