Allow Foreign Language Characters in the Search Form of Clip-Bucket v2

Hello,

Do you have a non-English Clip-Bucket powered website? Then you might have found either yourself or your audience trying to search for videos using foreign characters (ie. â, ê, î, ô, ä, ë, ï, ö, etc.) and having no search results being displayed. Per an Arvixe user request, I’ve decided to write this article to finally allow this characters to be used in the search query. This article was tested to work with v2.6.

c1

The change will be simple, we will just comment a function’s content and return a non-touched variable.

1. Open search.class.php, located inside ./includes/classes/*

2. Find

function set_the_key($string=null)

3. Comment the whole function content and before the ending }, put:

return $this->key;

Our whole function will look like this:

function set_the_key($string=null)
	{
		/*if(!$string)
		$string = $this->key;
		$pattern = array('/(\w+)/i','/(\++)/i',"/(\-\+)/i",'/(\-+)/i');
		$replacement = array('+$1',"+","-","-");
		return $this->key = preg_replace($pattern, $replacement, $string);*/
		return $this->key;
	}

c3

4. Save and Upload.

And there you go! If you get stuck at any step or come up with a question, please do not hesitate to contact me. Any comment or suggestion is welcomed!

Best Regards,

Richi

Looking for quality ClipBucket Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , , , , , | Posted under ClipBucket | RSS 2.0

Author Spotlight

Richi González

Richi González

I started programming when I was 12. I'm a Developer and have been working with the Clip-Bucket script since it came out. I'm the Liaison between Arvixe and Clip-Bucket, so anything you need regarding Clip-Bucket or any particular computer-related subject you need, let me know so I can assist you.

3 Comments on Allow Foreign Language Characters in the Search Form of Clip-Bucket v2

  1. Aaron L. says:

    Hello,

    Thank you for this solution. It is working fine for all the characters (ie. â, ê, î, ô, ä, ë, ï, ö, etc.), but how can i include this kind of characters : L’ or Qu’

  2. Nawaz Bazmi says:

    Hi Richi González
    thanks for this post.
    i want know something i want to include a default text in the search bar like ”search mysite for video and photos” and when some one will click the search box to search default text will hide and user will able to right own text. hope you understand what i want please help.
    Thank you in advance.

    • Hello,

      1. Open ./styles/{YOURTEMPLATE}/layout/header.html
      2. Find and replace it with
      3. From the code you pasted, edit EDIT THIS TEXT to what you want the search bar to have.
      4. Save & Upload

      Let me know if I can be of further assistance.

      Regards,
      Richi

Leave a Reply

Your email address will not be published. Required fields are marked *


− 1 = 2

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>