Is there a way to add text to the search bar to read something like "Search Forum"?
My forum, http://www.garysgaragemahal.com, is embedded on a Weebly site. In the header I have a Freefind search bar that reads "Search Garagemahal", and it searches the whole website including the forum.
But the Nabble search bar doesn't tell the user what it searches, which is of course the Nabble forum.
So, would there be a way to edit a macro to add "Search Forum" or somesuch?
Thanks in advance!
This post was updated on .
This is somewhat crude but may be sufficient for you. Find the "search_form" macro and add a new line two as follows:
<override_macro name="search_form" dot_parameter="do" parameters="style,query,author,days" requires="node"> <t>Search Forum</t> <form style="[n.style/]" action="/template/NamlServlet.jtp"> <input type="hidden" name="macro" value="search_page" /> <input type="hidden" name="node" value="[n.id/]" /> <n.hidden_field name="query" value="[n.query/]" /> <n.hidden_field name="author" value="[n.author/]" /> <n.hidden_field name="days" value="[n.days/]" /> <n.do/> </form> </override_macro>Mind you, if you already have a search facility that includes the forum, why not get rid of the second search facility?
You can do that by surrounding the original search form in HTML Comment tags:
<override_macro name="search_form" dot_parameter="do" parameters="style,query,author,days" requires="node"> <!-- <form style="[n.style/]" action="/template/NamlServlet.jtp"> <input type="hidden" name="macro" value="search_page" /> <input type="hidden" name="node" value="[n.id/]" /> <n.hidden_field name="query" value="[n.query/]" /> <n.hidden_field name="author" value="[n.author/]" /> <n.hidden_field name="days" value="[n.days/]" /> <n.do/> </form> --> </override_macro>EDIT: Oops! Just spotted a bug in Nabble Support's "quote code" feature!
Make sure you use the "view plain" link before copying the second code snippet. That final line should start with a "less than" symbol. It seems the closing comment tag in the code upsets things in the line number view!
In reply to this post by Gary Lewis
Incidentally, and you may already be doing this, when I added the lines below to the "Exclude Pages" section on one of my Freefind searches it got rid of hundreds of irrelevant near duplicate "topic listing pages" from their results:
http://seahawk-forum.968426.n3.nabble.com/template/NamlServlet.jtp* *seahawk-forum.968426.n3.nabble.com/*-tc???????.html *seahawk-forum.968426.n3.nabble.com/*-tt???????.htmlIn my case the monthly spidering reports reduced the page count spidered from around 560 to a more realistic 140, making the results pages many times more useful.
Greg - Thanks a bunch! I'll check it out - tomorrow night or later as we have company now.
Greg - I want to address the idea of having one search option on the page, and the exclusions.
First, I would like to have only one search option on the page. But, Freefind is not currently finding things on the forum, in spite of having put the forum on as an extension - I think. I've shown a bit of the latest log results to show what I have in. Is that correct? Why isn't Freefind finding the forum?
Second, I do have exclusions, as shown. But you are saying I should add the following? There sure is a lot of extraneous stuff in Freefind.
I'm answering this on my tablet without the time to do proper research but I think you may be over using the * wild card operator and thereby excluding things that aren't intended to be excluded.
All I can say is I started with the forum home page in the Freefind entry points screen with no exclusions. My approach was to look at search result screens and find pages that I didn't want included and looked at their URLs.
At this stage I can't recall why I added the full address starting with http and ending with jtp* for the first line but for the other two lines started with a *, but I suspect there would have been a reason. But it was clear that any result that got as far as jtp in the address was unwanted. There was no need to specify anything more, such as the "?macro" as you do.
I am also pretty sure that I used the ? single character wildcard for the other two lines because having seen the URLs of some of the results I knew wanted results would have been excluded had I used the multi character * wild card.
Without the time to work out which of your many lines of exclusions is causing the problem, I'd throw away all your exclusion lines, use mine instead and then check to see if you need others.
I saved my exclusions and then deleted them and dropped in your three and hit Index. We shall see.
However, I think you missed one that might should be in, depending on your forum(s). That is */Admin-Only*. I remember discovering that you could find the contents of any Admin-Only folders via a Freefind search, so used that to exclude them.
BUT, I've since changed the name of the folder, so that exclusion is for naught. Why wouldn't using the permalink work in an exclusion? The new permalink is http://forum.garysgaragemahal.com/Administrative-Area-f33440.html. Or, should I just do */Administrative-Area*?
Which brings me to the "full address starting with http". Freefind's exclusions page says "Note: Typically you should use the full URL, starting with http://." But, do your exclusions work now that you went to https?
A search engine find anything that's publicly viewable. The admin folder on your main site is viewable, but it requires that you login to actually see the content of the forum, I would be surprised if Freefind actually shows forum contents in that area as that would require that the engine registers and is granted appropriate access by you.
To avoid Freefind finding the folder you'd need to create a robots.txt file for your main site with the appropriate exclusion code. (I assume that Freefind accepts instructions not to crawl the folders listed in a robots.txt. file!)
Aaargh! Seems like I forgot to adjust my code for https! Clearly I will have to adjust things. I'll report back when I have time to change things.
I believe you are right - while Freefind will find the Admin stuff, you cannot view it w/o being logged in as an admin.
As for Freefind not finding everything, here's an example of what I'm seeing. I searched for "Dad's Truck Build" with both Freefind as well as Nabble's search. Freefind found 4 instances, 2 of which are just the standard view of the main forum page and the Topics view of it, so two different views of the same thing. But the other two are fully legit.
But, it did not find the 574 other "instances" that Nabble found. However, those instances appear to the the name of the thread, Dad's Truck Build" in the posts - and there are 561 posts in that thread.
I can't account for the difference between 574 finds and 561 posts, but it may well be that Freefind is the more useful of the two. I'll have to do more searching to figure that out, but that's going to take some time. And, like you, I'll report back when I get that done.
Greg - Been playing with the Freefind and Nabble search features. And one thing I noticed is that Freefind finds things in both the normal view and the topics view, so I added this exclusion and re-ran the indexing: http://forum.garysgaragemahal.com/Bullnose-Enthusiasts-f1.topics.html.
But that doesn't seem to work as I expected. I ran an search for T2K-Car using both search functions, and here's what was found: (Bummer! This site doesn't have your fix for bulleted text. So play like these two things below have bullets.)
Freefind: Two instances of the same thread, one in the Projects forum and one in Topics view, but showing that the thread is in Projects. So the exclusion didn't work. But, I see that the URL of the Topics page is http://www.garysgaragemahal.com/#nabble-f1i1120.topics, which isn't a match for my exclusion. Is it the "forum" bit up front, or the f1 bit at the end?
Nabble: 80 hits: 79 posts in the T2K-Car thread where all it found was the "T2K-Car" in the title of each post, and 1 post from today where "T2K-Car" was mentioned.
Given that, the Freefind search is by far the more useful as I don't think finding 79 instances where that text was used in the title of the post is very helpful. (In another search Nabble returned 580 finds, 574 of which were the title/subject of the thread which gets replicated for each post.) So unless there is a way to "fix" the Nabble search function to disregard subsequent incidents of the same text in the title of a post, I think I'll remove it.
But, I would like to also exclude the Topic view in Freefind, so if you have suggestions there I'd appreciate it.
I'm not sure what you were expecting, I guess you got something different! :-)
First, avoid looking at or using those browser addresses for exclusions. Instead look at a search results screen and note the URLs of the pages you don't want included.
There may be others but it's fairly easy to deduce the common elements of the format of the URL of pages you are unlikely to want in the results of the forum search. e.g.
Sub-forum Pages - Standard
File names that all end in the form "f1234567.html" (i.e. seven digits after an "f" and ".html")
Sub-forum Pages - Topics view
File names that all end in the form "topics.html"
Topic Standard View
All end in "td1234567.html" (Think of it as "topic data")
Topic List View Pages
All end in "tc1234567.html" (Think of it as "topic compact")
Topic Threaded View Pages
All end in "tt1234567.html" (Think of it as "topic threaded")
(This group of pages use a template that requires processing before delivery. It includes the "Mixed" App and all the pages reached from the "Edit this page" link. It does include some pages that might might want to be seen in search results such as a forum user's profile page, but I tend to think of that as an acceptable loss when balanced against all the NAML macro stuff that otherwise gets indexed - but almost certainly contains material that is never going to be searched for.)
All pages are of the form:
https://forum.seahawk17.org.uk/template/NamlServlet.jtp(plus arguments that define the elements that require processing.)
Based on these findings I am getting Freefind to use these exclusions on my SeaHawk site:
https://forum.seahawk17.org.uk/template/NamlServlet.jtp* https://forum.seahawk17.org.uk/*-f???????.html https://forum.seahawk17.org.uk/*.topics.html https://forum.seahawk17.org.uk/*-tc???????.html https://forum.seahawk17.org.uk/*-tt???????.htmlThe * wildcard represents 0 or more characters and the ? wildcard represents any single character.
With these exclusion my site was indexed in a couple of minutes. Without the first line, indexing took ages and Freefind came back with a "partially indexed" report advising me that I needed to pay as the site was too large for the free service.
You won't get the neat indents I introduced with a bit of CSS but it's easy enough to add a bullet character with an HTML entity. Enter this:
• Here is a pointand you get this:
• Here is a point
You'll be aware that Nabble also has a lot of "-tp???????" links in it, which you can think of as "topic posts", but they are not relevant to searches.
One of my test searches on my site was for "hull" a fairly basic word for a boating forum. I had forgotten that that term is included in the menu system, so every page of the site appears in the results for that search, so it seems I still have work to do to get a perfect site search as I see that Freefind has a "Text Relevance Scoring" section to cope with that issue. But that is not a matter for Nabble Support - and probably not even GregHelp!
Wow, lots of really good info. Thanks!
I changed my exclusions to include *bullnose-enthusiasts.12971.n8.nabble.com/*.topics.html and asked Freefind to index the site. But then I remembered you said to look at the URL of the page I don't want, which was http://www.garysgaragemahal.com/#nabble-f1i1120.topics. So I guess the exclusion should be http://www.garysgaragemahal.com/*.topics instead.
But, that shows confusion on my part as to the difference between *bullnose-enthusiasts.12971.n8.nabble.com/ and http://www.garysgaragemahal.com/. I'm sure it has to do with embedding, but beyond that I'm at a loss.
It takes Freefind right at 1 hour to index my site as I have it set to start at 2:01 AM my time and it usually ends just after 3. So I'll check the results in an hour or so to see if the latest revision excluded Topics.
As for bullets:
• Take that!
The change to Topics did work, so now I may be close to "right". But I need to do more testing to find out for sure.
In reply to this post by Gary Lewis
You're looking at the address bar in your browser again! Forget that!
When I said "look at the URL of the page I don't want" I meant the URL shown on a Freefind results screen. Then edit it to include the necessary wild card to capture all similar pages and add that to your exclusions.
Also don't forget that line:
https://forum.seahawk17.org.uk/template/NamlServlet.jtp*or the crawl will definitely take hours, instead of minutes. (though I do accept your site is larger than my SeaHawk one.)
Ahhh! Dawn. Marblehead. Or, I twigged.
But, I think I'm "there", wherever there is, as the results of my few searches have been what I expected. But I need to do a lot more testing to confirm things.
Turns out "Text relevance" is little help for getting rid of site navigation terms in searches but I found this within their help!
and because my site is built dynamically with php I just have the single "menu.php" file to edit and it's done for the whole site.
Don't know if you would have similar capabilities with Weebly.
Interesting! I searched for "Documentation", which is in the menu, and got 602 hits. There are somewhere over 500 pages, so it found every one of the pages and then some. And I can see that in the results.
Weebly supposedly allows you to edit the code it generates, but I've not been very lucky in finding what I was looking for. But, maybe this time I can and add those tags before and after the menu.
Well, I found the menu code and added the first line right after <body class="no-header-page"> and added the second line right before </body>. The pages still work after publishing the site, so no I'm waiting for two hours while Freefind does its thing.
We shall see. Thanks again!
I fear that you will end up with no index at all!
An HTML page is built like like
All the meta data and other stuff that tells the browser how to display the body goes here
All the visible parts of the page here.
So it looks as if you've told Freefind not to index your site.
If Freefind really does take hours to index your site, then if it isn't crawling all over Nabble's the unwanted bits of code then I guess it's beavering away crawling the a large chuck of Weebly code.
Looking at your site's code it's just the code between this tag:
<div id="navlist" class="w-navlist nav">
and the corresponding
tag that closes that section that you need those Freefind comment tags to surround.
|Free forum by Nabble||Edit this page|