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 became a Liaison between Arvixe and Clip-Bucket, so I am here to assist you with anything you need regarding Clip-Bucket or any particular computer-related subject you need. Best Regards, Richi

One Comment 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’

Leave a Reply

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


× 5 = 45

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>