![]() |
Search This Thread box
1 Attachment(s)
Hi All,
I am looking for a "Search this thread box" that I can physically put at the top and bottom of my forum. The drop down menu one is getting overlooked by my users. I am looking at putting a table? around the box and for me to be able to add some text (Title and a little write up about it) and then Place the "Search (this THREAD) box along with a 'Go' or Search button at the side of it. I am new to it all and would be grateful if some one would tell me what code I need and where to put it please? I would only like this on one or two selected Threads/forums - So would this be possible too please? Many Thanks. PS. I have attached screen shots of where I would like them positioned. I would be happy with the standard vB table, Title in the Blue border, with a little desciption below. (Please bear in mind that I only want these to show in Select threads. Is it possible to do them based on a thread ID for example, please? |
Do you know what I mean? :)
|
Search threads?
What does this accomplish that Ctrl + F doesn't? :confused: |
Not all my members are familiar with short cuts like that and it would look more professional to have it as I have described. Even though there is one via the drop down menu (That always gets over looked).
--------------- Added [DATE]1253133912[/DATE] at [TIME]1253133912[/TIME] --------------- Forgot to add that CTRL & F only searches the page that you are looking at - I need it to search the whole of a given thread. :) |
Forgot to mention that I am running vB 3.8.1 PL1
|
Have you tried just copying the form for the Search this Thread that is currently displayed on the page? (Give the other forms a unique id, of course.)
|
I haven't a clue on how to do what you suggest, Lynne.
If you have the patients and time to explain on here (So everyone can benefit) then I would be grateful. :) Thank You. --------------- Added [DATE]1253363250[/DATE] at [TIME]1253363250[/TIME] --------------- Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> I believe that is what I need, Yes? I would like it to search and show individual posts please. What would I need to do and where do I place this code please? Would it be possible to add this just to search the whole thread that I need it for? To search thread ID34212 for example. --------------- Added [DATE]1253363846[/DATE] at [TIME]1253363846[/TIME] --------------- I have scaled it down to this: Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> Would this work Lynne? I can't see to actually enter the unique ThreadID of the only thread that I would like this to work on? Is the above code correct to search a thread and show the actual posts, Please? Many Thanks. --------------- Added [DATE]1253365168[/DATE] at [TIME]1253365168[/TIME] --------------- Scrap the above codes... What do you think of the following... Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> Where would I place this, just to search the threadID that I will correct, to the one that I need (The one now '5' is an example). I need it to show on all the current pages and any future pages too. (top and bottom). Where would I place the code please? Many Thanks. |
Your code is a bit different from mine. This is from my SHOWTHREAD template. This is the part you see in the top bar - it's just basic javascript to create the dropdown (in the same manner dropdowns are made in the navbar):
HTML Code:
<if condition="$show['search']"> HTML Code:
<if condition="$show['search']"> |
Thanks Lynne.
How would I actually find the Template (If that is the correct word) of the forum that I need to add it to, And where would I need to place that code in order to have it in the correct positions as my two Attachments in my OP Please? Many Thanks. |
Admin CP -> vBulletin Options -> General Settings -> Add Template Name in HTML Comments -> Yes
|
Thanks James, Just tried that and there are so many templates in the "View Source" - I haven't clue which one it is.
Out of curiosity, I tried my last code, above - and when I clicked on go - it said token Expired. When I removed the token part - it didn't work either. How would I correct that please? (I tried the second of Lynne's codes too - but it didn't work). I tried mine in the footer - as I knew where that was. |
I think you want it in the SHOWTHREAD template. That's what you said at first anyway.
|
Quote:
Sorted that part - I added "$bbuserinfo[securitytoken]". All I need to do now is suss out the right template and place to add it. |
Don't go using the form code from your source code, you need to have the vbulletin variables in there like in the form code I posted or this isn't going to work.
|
Quote:
If I do it that way, The search box will show in all Threads of every forum. I would like it to show in a certain forum Only. Is that possible please? Many Thanks. |
Put a condition around it to say if in forum x show this....
|
I am new to all this Lynne, I really haven't a clue as to do all that. :(
I tried my code last night and it worked. All I have to do is work out where to place it, to get it in the one thread, but on the top and bottom of every page within that thread. If you have the time and patience, I would appreciate your help with the code of which you speak. Thanks, Once again. |
I did have a crack at this just now but found that I was getting "you did not select any posts to which the specified action can be applied" which suggests it's muddling up the "go" button with the one from the moderation dropdown.
I think this has has to do with forms. Not sure if there's a way round that to place it where you want. All the variables seem to be passed correctly as the thread ID was in the source code. |
Afternoon Mark.
Thank You for trying - I appreciate it. I have the code Working. And it searches too. Both my code and that, that Lynne kindly supplied (I tweaked it a little to work.). I just wanted a border around it with the rounded off edges. I acheived this but dark backgrounds appear around the title and description, like that of the vBulletin standard. I have to sytles - 1 where the style is 'Live' and a default style too. I haven't a clue how to or what I need to type into the address bar for the default style, as this is the one that I want to test my code(s) on without actually touching the 'Live' forum. Any ideas as to what I need to type to view the default one? ie: http://www.myforum.com/default sytle? Many Thanks. PS. I had a go at positioning it at various points throught the "SHOWTHREAD" - But it just messed the layout of it up. (Again this is why I should do it on a practice forum such as my Default one - If only I knew the address or how to actually view the default one to actually view the forum as if it were live). --------------- Added [DATE]1253446087[/DATE] at [TIME]1253446087[/TIME] --------------- ** EDIT ** PS Mark, On the one that I did - I actually used the correct threadID, in order to be searched. It did work too. :) |
I've worked out the problem...I can make it work for ordinary members, but for anyone with moderating permissions in that thread, the FORM for the search is nested within the FORM for the moderator actions (if you put it next to the postbit controls).
|
1 Attachment(s)
The code below is the code that I did/used.
The "Red" is the Threadid (example) and the "Green" is the Title and Description. (Again, an example). I have also added a screenshot of what they look like in my HTML Practice and of what they actually look like on the forum. (ATTACHMENTS). Code:
<tr> And this is the code that I used of Lynnes. (BOTH work). Code:
<tr> By having a further bit of trial and error I got rid of on of the tales and one of the horrid blue backgrounds. I have the one left to do around the searchbox and go button. (See attachment) Any Idea how I remove that Please? Code:
<tr> |
** EDIT **
After all that - I am receiving the "Token" message again. Strange. |
|
|
|
|
|
|
Post what you've done. Post your code with about five lines of the default code above and below what you added. Let us know what template you added this to also.
|
|
1 Attachment(s)
|
|
|
|
I've got to admit, I've slightly lost track of what you're trying to do now. I was under the impression you'd got the search box to work using the code I put in earlier, which is basically Lynne's without the formatting.
If that's the case, then you need to start with that as a core and work your way through styling it how you want, just as with normal code. If you're putting it to the right of the postbit controls (the Post Reply button nasically) then it'll probably need to sit in <td> tags. The <form> tags, I think, will have to go outside of that. You may then find you need to make the <td> that the Post Reply button sits in have a width, otherwise it will spread across the page and push your search box over. If on the other hand you want the search box on a different line to the postbit controls, none of that is needed. The blue background must be coming from the background class it is sitting in, if you put it in <td> tags try adding a class such as alt1 or even page. This is probably going to boil down to you posting a screenshot of your page, highlighting where you want the box, and then posting that part of your SHOWTHREAD template so we can give some pointers as to where to put it. |
|
|
|
|
|
All times are GMT. The time now is 09:20 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:
|