search button moves


Author Message
CoreyBrett

Posted: 9/17/2013
Quote message 

The search button seems to be broken in my Joomla template.
I'm using Joomla 3 and Artisteer 4. The search button moves when I try to put my mouse on it.
Is there a way to fix this?

https://dl.dropboxusercontent.com/u/3594910/pics/joomla_search_button.JPG

http://2013.boston.edu/component/search/?searchword=bible&searchphrase=all&Itemid=101
 
Joe

Posted: 9/17/2013
Quote message 

Are you using a Joomla search extension or a search control from Artisteer? (of which the later won't work)
 
imadeus

Posted: 9/19/2013
Quote message 

yes it can be solved. I already had the problem.

I have to correct the css but actually it is link to the tooltip.
So I have desactivated it.
Do not do if you have tooltips you need !

REPALCE the file "bootstrap.min.js" in media/jui/js/bootstrap.min.js
Code:
[this.options.html?"html":"text"]
by
Code:
[this.options.html?"":""]

Upload the file corrected. The button will not move anymore.

! The best solution is to solve the .css problem.
My method disable the tolltip.
 
Sergio Dias

Posted: 10/17/2013
Quote message 

I found solution without disabling tooltips. I spent 3 hours to find it. And LOL you just need to replace ONLY ONE CHARACTER!

Open php-script "/templates/<name of your template>/library/Artx/Page.php". Artisteer uses this file for dirty joomla hacks.

Find: case "com_search":
In my case it was on line #152

Now you can see intresting replacement of search button.

$content = preg_replace('/<button name="Search" onclick="this\.form\.submit\(\)" class="btn hasTooltip" title="(\w+)">.*<\/button>/', '<button name="Search" onclick="this.form.submit()" class="button" title="$1">$1</button>', $content);


Pattern of this replacement finds standart joomla search button declaration and replaces it with Artisteer's one. You need to replace "w" to "W" in this part of pattern: title="(\w+)"
Now title part should look like this: title="(\W+)"

In fact w+ works only with standart ANSI English word. If you have non-English button caption or utf-8 encoding W+ expression needed. There should be universal solution but I hate PHP, Perl regular expression and Artisteer developers who makes such kind of mistakes.