News:

Wondering if this will always be free?  See why free is better.

Main Menu

Google Search Your Site

Started by lucas-ruroken, July 09, 2009, 07:40:21 AM

Previous topic - Next topic

aw06

Quote from: TheListener on September 06, 2009, 12:08:51 PM
One manual edit and it works.

Looks good on a black theme too.

the search button is missing ...
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

TheListener


aw06

sorry, my bad, thought it had a search button lol
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

LHW

Nice mod!  Installed flawlessly on a site with 40+ Mods already on it.  ;D


Sabre™

Quote from: aw06 on September 06, 2009, 04:24:03 PM
sorry, my bad, thought it had a search button lol

If you'd like to add a search button, search for this line in the mod

<input type="text" name="q" size="27" maxlength="255" value="" />

and add this after it

                    <input type="submit" name="submit" value="', $txt[182], '" style="width: 8ex;" />
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TheListener

Sabre how would I change the blue font for a differnt color?

The blue is hard to see on the black.

Sabre™

It uses your themes color.
But to change only that texts color, you could go into your Modifications.english.php and change
$txt['googlesearch'] = 'Use Google to search the site';

to
$txt['googlesearch'] = '<font color="red">Use Google to search the site</font>';

and do so for each of the others if you'd like.
You could also hard code it to the BoardIdex.template.php or change your css, but I personally prefer this way.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TheListener

Quote from: Sabre™ on September 06, 2009, 08:07:26 PM
It uses your themes color.
But to change only that texts color, you could go into your Modifications.english.php and change
$txt['googlesearch'] = 'Use Google to search the site';

to
$txt['googlesearch'] = '<font color="red"><strong>Use Google to search the site</strong></font>'

and do so for each of the others if you'd like.
You could also hard code it to the BoardIdex.template.php or change your css, but I personally prefer this way.

Are you trying to make my head explode?   :P

Sabre™

lol
I removed the <strong > tags because they were not really needed, and closed the string properly.
I forgot to because Im eating my brekkie at the same time lol
So if you havent seen my change in the previous post, then refer to it mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TheListener

Tried what ya said bud.

Parse error: syntax error, unexpected T_VARIABLE in /home/visionar/public_html/Themes/default/languages/Modifications.english.php on line 1016

This appeared.

Sabre™

Did you check the changes I referred to?
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TheListener

Removing the strong tags is easy enough.

Closing it off is that with a ;

??

Cereal at 3am is good too ya know.

Sabre™

Yep.
Copy n paste this part into your template, or yes, just add that to the end of the string
$txt['googlesearch'] = '<font color="red">Use Google to search the site</font>';

I changed it when I saw the error I made.
Sorry bout that champ.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TheListener

Woohoo that worked.

Can actually see it now.


villasg

What is the new (?) in the last version 1.1 ?
And need to remove the old to install the new ?
Thanks


lucas-ruroken

Quote from: villasg on October 03, 2009, 02:37:30 AM
What is the new (?) in the last version 1.1 ?
And need to remove the old to install the new ?
Thanks

the last version is 1.0

Quote from: Smog on October 03, 2009, 04:06:58 PM
Any idea how to hide this Google search (box) for guests?

if you use smf 1.1.x

// Google Search your site Start
if($context['user']['is_logged'])
{
echo'
<tr>
<td class="titlebg" colspan="2">
', $txt['gtitle'], '
</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/info.gif" alt="Google" align="middle" />
</td>
<td class="windowbg2" valign="top">
'.$txt['googlesearch'].'
<form method="get" action="http://www.google.com/search" target="_blank">
<img src="'.$settings['default_theme_url'].'/images/google.gif" alt="', $txt['galt'] ,'" width="61" height="24" align="middle" />
<input type="hidden" name="sitesearch" value="', str_replace("/index.php", "", $scripturl), '" />
<input type="text" name="q" size="27" maxlength="255" value="" />
</form>
</td>
</tr>';
}
// Google Search your site End



but if you use smf 2.0 rc


// Google Search your site Start
if($context['user']['is_logged'])
{
echo'
<div class="infocenter_section">
<h4 class="headerpadding titlebg">
', $txt['gtitle'], '
</h4>
<div class="windowbg">
<p class="section">
<img src="', $settings['images_url'], '/icons/info.gif" alt="Google" align="middle" />
</p>
<div class="windowbg2 sectionbody">
<strong>',$txt['googlesearch'],'</strong>
<form method="get" action="http://www.google.com/search" target="_blank">
<img src="'.$settings['default_theme_url'].'/images/google.gif" alt="', $txt['galt'] ,'" width="61" height="24" align="middle" />
<input type="hidden" name="sitesearch" value="', str_replace("/index.php", "", $scripturl), '" />
<input type="text" name="q" size="27" maxlength="255" value="" />
</form>
</div>
</div>
</div>';
}
// Google Search your site End


Only it is necessary to add the variable if($context['user']['is_logged'])


Adk Portal 3.1 is coming....

Design your universe!


Groundhog


lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

Advertisement: