vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Style and Graphics Requests (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=226)
-   -   [vB 4.2.2] Show post icon in "search result" (https://vborg.vbsupport.ru/showthread.php?t=307608)

psychonikeo 01-28-2014 12:03 PM

[vB 4.2.2] Show post icon in "search result"
 
Hi guys and gals,

I have a question, which shouldn't be too hard I guess since we managed to do it in vb3, but can't get it to work in vb4.

We have link "active topics" which shows you the most recent topics with activity. Basically it's a search query.
This is the link:
http://www.wijzijnvoetbal.nl/forum/s...e=vBForum_Post

The problem is, the output (or the search results) does not show the post icon that the first post in the thread has as you can see here:
https://vborg.vbsupport.ru/external/2014/01/6.png
It only shows the "go to last post" icon.


BUT!! Now here's what gives me hope!! In the subforum overview, you do see the posticon. As you can see here:
https://vborg.vbsupport.ru/external/2014/01/7.png
So somewhere, some code makes them appear before the thread title!!

Could anyone tell me what code I need to add to which CSS in order to get the post icon to show in the search result overview?

Many thanks in advance.

psychonikeo 01-31-2014 08:29 AM

A little bump. I'm willing to pay a small fee for this. :P.

japezoa 10-27-2014 03:10 AM

Hi!
I have the same problem.

Thanks!

japezoa 11-09-2014 03:49 PM

Hi again!
Any solution?

Thanks

--------------- Added [DATE]1415594587[/DATE] at [TIME]1415594587[/TIME] ---------------

OK, this is my solution

in search_threadbit

Replace:
Code:

<a class="threadstatus" rel="vB::AJAX" <vb:if condition="$show['threadcount']">title="{vb:rawphrase have_x_posts_in_thread_last_y, {vb:raw thread.dot_count}, {vb:raw thread.dot_lastpost}}"</vb:if>></a>
with:
Code:

<img class="search_inline_left" src="{vb:raw thread.threadiconpath}" alt="{vb:raw thread.threadicontitle}"/>
in search.css add this line:

Code:

.search_inline_left {
        margin: 5px 2px 2px 5px;
        padding: 0px;
        float:{vb:stylevar left};
        vertical-align: center;
}

The result:

https://vborg.vbsupport.ru/external/2014/11/16.jpg

ozzy47 11-15-2014 10:15 PM

Thanks for posting your solution. :)

boggseric 10-06-2015 10:26 PM

There is an easier way that requires no CSS modification.


in search_threadbit

Find:
Code:

<vb:if condition="$thread['sticky']">
                                                <img src="{vb:stylevar imgdir_misc}/sticky.gif" alt="{vb:rawphrase sticky_thread}" />
                                        </vb:if>



Paste this code in above it. If there isn't a blank line there make one.
Code:

                    <vb:if condition="$show['threadicon']">
                            <img src="{vb:raw thread.threadiconpath}" alt="{vb:raw thread.threadicontitle}" border="0" />
                    </vb:if>



so the end result should look like this:
Code:

......
<vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a>
                                        </vb:if>
                                                            <vb:if condition="$show['threadicon']">
                            <img src="{vb:raw thread.threadiconpath}" alt="{vb:raw thread.threadicontitle}" border="0" />
                    </vb:if>       
                                        <vb:if condition="$thread['sticky']">
                                                <img src="{vb:stylevar imgdir_misc}/sticky.gif" alt="{vb:rawphrase sticky_thread}" />
                                        </vb:if>
..........

Results, looks just like the threadbit:
https://vborg.vbsupport.ru/external/2015/10/12.jpg


All times are GMT. The time now is 02:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01050 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete