![]() |
Thread Prefix Variable to query
I want to display a certain banner when someone searches for threads with a given prefix.
I have tried a ton of variables and really have no idea and none of my searches have revealed anything. Does anybody know what prefix variable to query in a conditional statement that will show as TRUE when someone searches with a given prefix? |
Can you paste some of the queries you have tried?
My guess is that you need a simple LIKE such as WHERE variable LIKE 'somestring%' That will show all variables that start with somestring. Or are you talking about actual thread prefixes that you can define in the AdminCP? |
In addition to what Dave asked, please post the hook location you are using for the query or the code script/area you are adding it. You may be using a variable that isn't available in the hook/script you are putting it in.
|
Essentially, I would like to trigger this banner when a specific search where all threads with the same prefix are displayed.
I am planning to put the conditional in: ad_navbar_below and trigger it on the search script pages (as mentioned): Ultimately I plan to join these two conditionals. The first is working Code:
<if condition="THIS_SCRIPT == 'search'"></if> Bump |
The search page allows you to select multiple prefixes. So, you are going to need to put code in a hook to take the prefixchoice array and explode it before you can actually use it in a condition.
|
Wow Lynne, thank you!
Can you provide any guidance on how I might be able to accomplish that? Go easy on this amateur! |
If you look at the search.php file and do a search on "prefixchoice", you will see them take the variable and then explode it to get something that is useful.
|
Are you talking about this code?
PHP Code:
|
Well, that is an example of exploding it into an array, yes.
|
Thank you for your input and response.
If I understand correctly, would creating the following in a hook named 'prefix_choice_array_explode' work for my purposes? Code:
if ($prefixchoice) |
All times are GMT. The time now is 06:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|