Jump to content

Post Icon Column


Michael R

Recommended Posts

Posted

Please consider bringing back the post icon column. Many sites utilize post icons for identifying specific content. For example, we use a "news" icon for denoting news articles and press releases.

Posted

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

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

Posted

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. :(
Posted

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.

  • Management
Posted

Try looking in /applications/forums/extensions/searchDisplay.php

Template bits are in the "Search" group: "topicPostSearchResultAsForum" and "forumSearchResult".

Posted

I tried that- those bits don't look anything like what gets spit out to the browser.

Unless... hmm. The forum I was testing on has IN_DEV enabled. Maybe...

Yup. It looks like that was the problem. Go figure.

Posted

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.

Posted

The "savings" you get by excluding 3 columns from a search are so minimal as to be almost unmeasuarable.

It's the same thing with "echo vs print". Sure, one is more "resource friendly" than the other - if you can measure page loading in nanoseconds. :P

  • 5 weeks later...
Posted

Please consider bringing back the post icon column. Many sites utilize post icons for identifying specific content. For example, we use a "news" icon for denoting news articles and press releases.




You're not alone here, Kalel.
  • Management
Posted

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.
Posted

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.

Archived

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

  • Recently Browsing   0 members

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