Search

@phoque: No, I haven’t heard anything from ahwayakchih.

Hopefully, he has Github notification mails enabled. I sent him a private message there. :-)

I’ve had errors before too. On line 165 of the DS try escaping the output:

$entry->appendChild(new XMLElement('content', General::sanitize($result->content)));

I know this is kind of hackish, but in my situation the following did the trick for me:

 $entry->appendChild(new XMLElement('content', str_replace('·', '·', $result->content)));

michael-e, your fox jas beem implemented and pushed to github. :-)

Thanks, phoque. I already found a GitHub message in my inbox.

How do I format the HTML tags in de content like ‘< b >’ from the google xml results? Thanks

UPDATE: solved

Is this extension also compatable with Google Site Search - http://www.google.com/sitesearch

I’ve set up everything and it seems to work quite o.k now. One thing is still troubling me.

I’m using Nick Dunn’s pagination template for the search results. But what doesn’t work is the ‘pagination-url’ I have to set. Because ‘$’ is already used for the current page number, it doesn’t work anymore when I want to make a variable for the ‘?q={$url-q}’. Every ‘$’ outputs the current page number.

How do I keep the query in this url?
Thanks

<xsl:with-param name="pagination-url" select="'/search/?q={$url-q}&#38;p=$'" />

You need to use the concat() function, since the curly braces within the single quotes will still just be a string rather than have their values evaluated as you wish. Try:

select="concat('/search/?q=', $url-q, '&amp;p=$')"

However this doesn’t fix the problem when the user enters a string containing $. :-)

Couldn’t (shouldn’t) it be chnaged for something that is far less likely to be used in XSLT than the '$' symbol?

How about '§' instead?

Thanks Nick that works.

However this doesn’t fix the problem when the user enters a string containing $. :-)

Indeed, it’s not a big problem but it could come in handy of course. In that case isn’t better to change the ‘$’ symbol to something else like designermonkey says?

Do I have to display search results on the current page, or can I add a search box to any page and display the search results on a separate page?

If the latter is possible (without too much trouble), any help getting it set up would be much appreciated.

Thanks, D

Sorry – I forgot that I hadn't attached the data source to the page that I was trying to display my results on.

Problem solved!

@ahwayakchih - is there any plan to update this extension to Symphony 2.3. Thanks for pulling this extension together.

I sent a pull request to work on Symphony 2.3.3.

I have a question, right now I'm testing this out, and it's working well. But it is gathering global information, I mean, it is performing a global search, a common Google search. How can I limit it to search for my website only?

From what I understand, the Website should be fully indexed in Google directory before any result can pop up, but I don't want to perform global searches on my site...

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details