TheMilkCarton
12-11-2007, 12:55 PM
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??)
<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 1197394009 at 1197394009 ---------------
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? :(
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??)
<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 1197394009 at 1197394009 ---------------
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? :(