Search quotes terms highlighting

Hope someone can help with this - I have a function that I use to highlight search terms in the results page:



<? PHP function highlightResult ($keyword, $result) {}
If (get_magic_quotes_gpc()) {}
$replace = stripslashes ($keyword);
}
else {}
$replace = $keyword;
}
$replaceArr = explode ("", $replace);
for ($i = 0; $i < sizeof ($replaceArr); $i ++) {}
$result = preg_replace ("/ / i {$replaceArr [$i]}","< b > < font color = #FF0000 > {$replaceArr [$i]} < station > < / b >", $result ");
}
$highlighted = $result;
Return $highlighted;
}
? >

Basically, the research code I use uses quotes for individual words as a phrase group.
for example

If you search on: technical knowledge

It returns all results that contain technical knowledge of GOLD. (and are properly highlighted)

If you search on: technical knowledge,

It returns all results that contain the knowledge AND techniques. (and are properly highlighted)

If you search on: 'technical knowledge '.

It returns all results that contain the technical knowledge of the exact phrase - and in this case even if the results are correct, the expression is not being highlighted.

I guess that when it comes to highlight instead of reading of technical knowledge, reading 'technical knowledge', in which case he is not stressing to is not a corresponding sentence due to between it quotation marks, so that I need is somehow the expression so that it remove the quotes and make read the words or phrase inside...

If someone could help change the above code to make what would be very much appreciated.

See you soon,.
Iain

If he ever comes in handy for someone else, the code that did it was:


If (get_magic_quotes_gpc()) {}
$replace = stripslashes ($keyword);
}
else {}
$replace = $keyword;
}
$replace = preg_replace("/\"|\,/i","",$replace);
$replace = preg_replace ("/ {2,} /", "", $replace ");
$replaceArr = explode ("", $replace);
for ($i = 0; $i< sizeof($replacearr);="" $i++="" )="">
$result = preg_replace ("/ / i {$replaceArr [$i]}"{$replaceArr [$i]} "," ", $result");
}
$highlighted = $result;
Return $highlighted;
}
?>

Tags: Dreamweaver

Similar Questions

  • How can I search for terms in Dreamweaver on my remote side not only local folders Web site?

    I'm trying to search for terms on my website in Dreamweaver. When I use the button "Find and replace", it seems fair to search only the local files folder. Is it possible to have the focus of the research on the remote side of the Web site, instead of just the local side?

    Not with Dreamweaver.

    You can use the function search (Ctrl + F) in your web browser. But it will not replace the terms found.

    Nancy O.

  • Search for zoom + Highlight, Exclude bookmarks

    Hello

    I used Zoom search for about 2 years with a few projects of Homesite HTML and am now integrate Zoom Search in a Robohelp project. So far so good.

    I followed the suggestions of Peter, refined for my needs. Once again, so far, so goo.   I added the highlighted option (jump to match and highlighting search words).  It works as expected, but I'm having a problem it highlights of bookmarks, when search terms corresponds to a word in the bookmark.  It's not ideal, and it causes a big problem when the corresponding search word is in the bookmark and at the bottom of the page.  The 'leap' in this case stops at the top of the page because the bookmark is the first occurrence of the word.  It's technically correct, but from a user perspective, it is not so great.

    To exclude parts of the page being indexed by a Zoom uses the <! - ZOOMSTOP - > and <!-ZOOMRESTART-> tags, which works as expected with RoboHelp.  My problem is that the bookmark code does not appear in the html file, so I cannot even exclude it.  Any suggestions?

    I was going to make this post in the forum of Zoom, but I feel that they will tell me to ck with Robohelp.

    Thanks in advance...

    --j

    I just replied on Zoom forum on this subject, in which I proposed to manually add the placeholder of breadcrumbs in topics, instead of using the selection of the global view, thus requiring only a one-time addition of the and tags (which removes RH is more than once). Of Helpware FAR tool makes it fast, if the user decides on this method.

    Good luck

    Leon

  • Your feedback / submit an idea not work not (Page not found) | Search for term regular multiline

    Hello

    I arrived a few months an idea with a (edeting multiline regexp search).

    Nice to see that this has already been incorporated, to me but disappointing is the search for the regex, in combination with the Edeting multiline.

    But what he brings me to use regexp search, when I can't change every time.

    In this function, I would once again.

    But unfortunately I can not find the feedback system, and here in the forum I always get the error message, page not found.

    Beautiful would be if the two could be corrected ;)

    For me, code is currently the " " http://www.sublimetext.com/ "editor of my choice if Adobe so some producing duties, edge code would be a real alternative. "

    Still I find edge Code is not ready for daily use.

    Greetings

    Dirk Persky

    Hi Dirk,

    This Forum is now the feedback system!

    Edge Code CC is a new image of the project in parentheses. I thought he had a card for this feature in the Media Product Backlog , but I did not see in a quick search. We invite you to add your vote for any function it, or a new file number if you can't find it.

    Thanks for your comments,

    Randy

  • Search for WebHelp highlighting revisited (RH7)

    I like the integrated research of RH7 highlighting feature, particularly after the update from Adobe at 7.02.001 (see P. Grainge point 32 slot using RoboHelp 7, correction, or replacement of whtopic.js). However, I swear to you that my current project behaves differently in my initial test using RH7 demo (thanks to the correction, using IE v6). Perhaps I had not noticed before, but the whole expression or sentence or paragraph (this varies) each found and highlighted Word is bold!

    This was? If anyone else has noticed this? I unconsciously have turn some settings or corrupt a style? It's quite distracting and my client does not like this. I verify that the file whtopic.js in the generated WebHelp files collection does contain the fix.

    I thought it could be related to whether the word found (or any in the surrounding original text) was bold, but it happens in paragraphs even where I have not used all fat. I am confused - or it is a 'feature '?

    Thanks as always to this community helpful and responsive!
    Steve Peterson

    AHA! Persistence is paying off. I found and removed ' make-weight: bold; " et "make-style: normal" of the "span" in my main style sheet style definition, leaving "extended" empty definition. RH7 of Format / style editor poster now "span +"as the definition of 'merged' under the character.»

    Him stressing present now works as it should, simply emphasizing the elements found as to the format. Starting to get the hang of Styles, I guess...

    See you soon!
    Steve

  • How can I make command-f continue to search for the same term on each page I bring up without returning the search term?

    I want to enter a search term using the command-F and then continue to change the pages in a database and searching the term each page without returning the end of search each time I change pages.   Is this possible?  Is there another way to do it?   Thank you for your help

    Command-G, for 'new' works in Web browsers.

  • Google search terms are superimposed with any file time/all/any language.

    Using FF, Google search terms are superimposed with any file time/all/any language. The result is that I don't see the search correctly term to change or add to. This shows a screenshot of the problem. http://t.co/LAU0DLKW

    I think that the problem is a problem in the FF rendering engine or some problem with Google. Can anyone help?

    I tried to uninstall and reinstall FF (11 and 12b 3) and erase history, but none worked.

    This is the plugin GoogleEnhancer. Disable the that and the problem will stop.

  • The search by using the search bar IS NOT to bring out all its on the page. He sees the shots, but don't highlight, so I don't see what it is.

    When I search a Word using the search bar, Firefox highlights all the hits on the page. (Sometimes it highlights some.)

    Apparently, he sees shots, because it climbs to everyone that I click Next. But it is not to highlight the successes. I don't see what Firefox has found.

    I'm afraid that it is a problem of Windows 7 (I'm not a fan of Win7).

    Are you clicking on "highlight all" in the search bar? See: https://support.mozilla.com/en-US/kb/Searching+within+a+page

    You have outdated plugins with known security problems. You need to update.

    • Shockwave Flash 10.1 r82
    • Next-generation Java plug-in 1.6.0_21 for Mozilla browsers
      • New update of security published, version 1.6.0_22
    1. Check your plugin versions: http://www.mozilla.com/en-US/plugincheck/

      • Note: plugin check page lacks information about all versions of the plugin
    2. Shockwave Flash update
    3. Java Update:
  • ATG-short integration - change the query of the user's search term before being sent to short

    All testing the ATG-short front-end search/browse integration in a commerce application of my organization, one of our QA team members noticed as a search term consisting of just a vertical pipe character ("" | "") would cause the full product catalog to return in the results of research, as if every product in the catalogue was a match to that search term.

    This behavior can be seen in the Application of reference short JSP as well, so that this behavior does not appear to be caused by something that makes our custom application code.

    It is an undesirable behavior for our application - the company prefers that we do not show the entire catalog of products at the same time unless he is cut down somehow (whether via a word search or by the application of filters of properties).

    I plan to implement a solution to wash just ' | ' characters of the search term entry.  It would be pretty easy to do on the client side, but as with any other web application input validation, we really want to do this on the side server.

    I think that this should be done by the substitution of / expand part of the OOTB ATG pipeline where it sends the search request to short for treatment.  However, this is not something I've done before.  I read in Chapter 7 of the ATGEndecaIntegrationGuide.pdf ("application integration"), but it's not immediately obvious to me how/where I'd be better on the substitution of / extend an OOTB ATG component for making filter ' | ' characters in the search query term.

    All the world is this kind of thing before?  If so, could you please describe how you went to?

    Thank you!

    -Jon

    I ended up implementing this as follows:

    -Create a new class that extends the class InvokeAssembler;

    -Implement a custom InvokeAssembler.properties file that points to my new class derived;

    -In service () of the new derived class method, use methods of the DynamoHttpServletRequest to filter pipe characters in the value of the Ntt parameter and the query string.  Then call super.service () to handle the demand.

    -Jon

  • Speed up production using a template. Variables? "Edit mode" highlighting?

    I have a proposal standard format that I use, and it contains, I have a lot of reusable content mixed with custom items written for the particular project. I was wondering, what kind of workflow support is there for the optimization of the production of a custom proposal for a paper like this?

    I think I would be able to highlight sort content so that he calls clearly (like a yellow reflection on it) when I'm editing (so as to mark the points that need to customize and they separate visually the reusable content is not), but this climax gets auto-filtrés in the export as PDF, or after running some sort of command to remove all in preparation for sending of this.

    Also, is it possible to put in place the chips varibale I can drop in key areas (like where the name of the client is used) and just put their value in some central localtion? This seems less inclined to pips and more quickly than with a search and replace.

    Are there other clever ways to treat this type of workflow scenario?

    jaymcdonald wrote:

    I have a proposal standard format that I use, and it contains, I have a lot of reusable content mixed with custom items written for the particular project. I was wondering, what kind of workflow support is there for the optimization of the production of a custom proposal for a paper like this?

    I think I would be able to highlight sort content so that he calls clearly (like a yellow reflection on it) when I'm editing (so as to mark the points that need to customize and they separate visually the reusable content is not), but this climax gets auto-filtrés in the export as PDF, or after running some sort of command to remove all in preparation for sending of this.

    Also, is it possible to put in place the chips varibale I can drop in key areas (like where the name of the client is used) and just put their value in some central localtion? This seems less inclined to pips and more quickly than with a search and replace.

    Are there other clever ways to treat this type of workflow scenario?

    Consider using conditional text to meet the needs of different mat. You can mark it with a highlight that will not print color. You can create sets of conditions that you can switch from the visible to the invisible.

    In addition, you could watch using the fusion of data with a data file which retains the boilerplate different pieces in different fields (for example spreadsheet columns) and drag the fields in place for the merger. You will perhaps according to the length of the document, select the preference of intelligent redistribution of text allow the automatic creation of the new page.

    You can use these two together and with text variables. You can load text from one document to the other variables.

    Google search for terms such as "InDesign data merge tutorial", "InDesign text variables Tutorial", "Conditional text in InDesign tutorial," without the quotes for more details.

    HTH

    Kind regards

    Peter

    _______________________

    Peter gold

    Know-how ProServices

  • How can I search all subjects in my guide? and if this is not possible, how do I get books have not not subjects with the same name?

    How can I search all subjects in my guide? and if this is not possible, how do I get books have not not subjects with the same name?

    "People need be able to find these without having to look inside each book TOC.

    Sorry, but I'm not a big fan or user of this sensitive arrangement "New kid on the block. Therefore, it may be that I am simply misunderstanding because I do not regularly use it. Of what you say, it seems to me that if you (or more precisely your users) are not able to click on the right side, where he says 'Getting Started' or 'List of Email Campaign' and see these topics open and view the content with search terms highlighted?

    Regarding the "bookmarks", those that are normally visible by the user and will be not viewable unless the name of the bookmark appears also as text within the topic. Although, if the two are different, you could probably get there by adding the name of the bookmark as a keyword search in the properties of the section.

    In any case, I feel that at this point, I can just be frustrating you and you may need someone else to try to help that probably better understand the issue.

    Sorry, I was not able to help.

    See you soon... Rick

  • Spaces disappear when searching in WebHelp

    The HTML code looks like this: (see attached code)

    So in the WebHelp, it looks like this:
    In most systems, the information < /b > < b > page is the first...

    But if you do a search in the WebHelp (on the 'Search' tab) and 'Highlight search results' are enabled (which is default), that's what the users see:
    In most systems, the information < /b > < b > page is the first...

    It seems therefore that we ran out of space in all directions.

    The only way I found to avoid this problem is by manually adding a hard space in the HTML code. But we can't do every time format us the text!

    With the users of research more, I have to find a solution to this problem. Anyone?

    Thank you
    Eileen

    Great! Rather than everyone else going to search your site for the answer, here it is (quote):

    Adobe has quickly released a change to one of the javascript files with instructions for manually, change the file "C:\Program Files\Adobe\Adobe RoboHelp 7\RoboHTML\WebHelp5Ext\template_stock\whtopic.js" assuming an installation to the default location. To save you need to make the change, "click here" to download a zip file containing a replacement file.

    And here's the URL to the new file:
    http://www.Grainge.org/pages/authoring/RH7/whtopic.zip

    And here's a tip: it works very well (thanks, Peter), but you have to recompile the WebHelp. You can not just replace the whtopic.js file in the output.

    Eileen

  • Text search without wildcards - for example 'Howe' but not 'how '.

    A lot of old messages to go without finding common words such as 'how' and «and' instead of simply 'Howard' or «candles»

    From your description, I suspect you use the global search, which I agree is a bit lame.

    There is an older search tool, accessed by ctrl + shift + f, which allows a more precise search. And because it is based on the same set of tools such as Message filters, additional such as FiltaQuilla modules and search for term / Gmail UI that enhance the capabilities of filtering are also available in your research.

    The main disadvantage with ctrl + shift + f search is that it is based on records; She looks in the current folder only. One way to work around this is to use a saved, search where you have so much stronger search/filtering rules and the ability to select which folders to search in.

  • Several Internet sites have been automatically redirect me to the Yahoo! search engine without asking me that.

    I click on the URL for a specific website (often a Tumblr blog), and the browser automatically redirects me to a Yahoo! search for terms related to this sentence. In some cases, I can click on the back button and it will take me to the site of that origin, I wanted to go, but sometimes is not yet do. It is very annoying. The most common example is when I try to visit the blog gaslightgallows.tumblr.com, which redirects me to the screenshotted search in the image as an attachment.

    sackobooks said

    The only listed modules are the following:
    Extensions: Feedly, SearchMe, Trend Micro Toolbar and perhaps Hola but also perhaps not Hola.

    Searchme is an add-on faucet.

    Here's my suggestion: If you do not install or do not recognize an extension, disable it. If nothing is wrong, delete it. All extensions are optional; No ship with Firefox.

    You can remove the dossier Spigot completely; This article mentions where it is: http://www.thesafemac.com/arg-spigot/

  • I have a problem with the functionality of search bar

    If the search bar has changed recently and is shit... Basically, there is way more information to I type in my search, and if my mouse happened to move a button randomly when I hit "enter" it looking a different engine or go to "change search settings"... These buttons do not need to engage with the key enter, it's really annoying... in the screenshot, photo, I took it took my cursor but notice that "change search settings" is highlighted, if I press on enter would not seek, he would open parameters

    If you want to revert changes to the search bar and to have the standalone window to manage search engines, you can enable or disable this pref to false with a middle-click on the topic: config page.

    • browser.search.showOneOffButtons = false

    Close and restart Firefox for the changes to take effect.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

Maybe you are looking for