vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   search_results_postbit (https://vborg.vbsupport.ru/showthread.php?t=164900)

TheMilkCarton 12-11-2007 12:55 PM

search_results_postbit
 
I've been trying to customize the templates to my liking, to remove that "vBulletin" feel (sorry vB.. :)) so I've been trying to clean up the search results pages, among others.

I've been trying to hide certain parts of search_results_postbit depending on the search, but I'm not doing it right.

I want to hide the following code when you've searched for a particular user's posts. (It already shows at the top of the Search Results, why have it repeated inside every postbit??)
Code:

        <div class="smallfont">
            $vbphrase[posted_by]
            <if condition="$post[userid]"><a href="member.php?$session[sessionurl]u=$post[userid]">$post[username]</a><else />$post[username]</if>
        </div>

I believed I could just use a combination of the conditionals for $starteronly and $showposts, but it seems that the search_results_postbit template can't process those variables correctly. I've tried adding code from search.php into a plugin at the hook of the same name, but I'm still not getting it right.

What am I doing wrong?

----

Also, I can't seem to replicate this, but it seems like the code in search.php allows for "Posts by:" for multiple users... where can you actually use this? I've tried a semicolon and comma separated list in the Advanced Search but that doesn't work..

So if you can actually search for multiple users at once, I guess I'd also need to code to only hide it when you're searching for one user as well.

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

Ugh. Well the ugly thing I did for now is to edit search.php to move everything between "if (do $show['results']){}" (paraphrasing there... too lazy to write it out correctly) to the very bottom of search.php so that it can make use of those variables I need.

If I can figure that out, why on earth can't I figure out how to do it with a plugin? :(


All times are GMT. The time now is 05:03 PM.

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.00956 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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