Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Oct 2016, 23:28
siliconfinance siliconfinance is offline
 
Join Date: Mar 2007
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?
Reply With Quote
  #2  
Old 05 Oct 2016, 23:35
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
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?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 06 Oct 2016, 02:27
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #4  
Old 06 Oct 2016, 03:47
siliconfinance siliconfinance is offline
 
Join Date: Mar 2007
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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

--------------- Added 06 Oct 2016 at 20:52 ---------------

Bump
Reply With Quote
  #5  
Old 06 Oct 2016, 21:19
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #6  
Old 06 Oct 2016, 22:19
siliconfinance siliconfinance is offline
 
Join Date: Mar 2007
Wow Lynne, thank you!

Can you provide any guidance on how I might be able to accomplish that?

Go easy on this amateur!
Reply With Quote
  #7  
Old 07 Oct 2016, 01:36
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 07 Oct 2016, 23:06
siliconfinance siliconfinance is offline
 
Join Date: Mar 2007
Are you talking about this code?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #9  
Old 08 Oct 2016, 16:48
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Well, that is an example of exploding it into an array, yes.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #10  
Old 18 Oct 2016, 17:54
siliconfinance siliconfinance is offline
 
Join Date: Mar 2007
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?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:29.

Layout Options | Width: Wide Color: