Link to Mod (http://mods.simplemachines.org/index.php?mod=196)
Ver. 2.5.2
KGIII is now maintaining the mod. (Don't ask what happened to 2.5.1)
Updated to work with SMF 1.1.2
May work with SMF 1.1.1 actually - untested.
Again, if you can come up with a better image it would be appreciated.
Ver. 2.5
Added the BBC button for it. The image looks crappy so if you can get me a better image I'll appreciate it :P
Ver. 2.0
I added the enable/disable option in the admin page. By default it's enabled. To disable it go to
Admin > Posts and Topics > Uncheck Enable Google Search Tags
Also when the tag is disabled it will just show Google Search: query in red
Use the tags like this same as 1.0
Put the search text in between the [google][/google] tags
[google]SMF rocks![/google]
or if you want to get creative
[google=SMF rocks!]Update your phpBB[/google]
Ver. 1.0
This MOD just adds the BBC Google Seach Tag. You can search two ways.
Put the search text in between the [google][/google] tags
[google]SMF rocks![/google]
or if you want to get creative
[google=SMF rocks!]Update your phpBB[/google]
For now the default text that is added when the tag is inserted is Google Search: SMF Rocks!
In the future I might just add the ability to insert custom text for search.
Also thanks to [Unknown] for looking over the code and to all the developers here for making this great software. And to the original mod creator for phpBB
ENABLED
(http://i9.photobucket.com/albums/a100/JayBachatero/google-tag.gif)
DISABLED
(http://i9.photobucket.com/albums/a100/JayBachatero/google-tag-disabled.gif)
SETTINGS
(http://i9.photobucket.com/albums/a100/JayBachatero/google-tag-settings.gif)
sceenies?
thats really nice
what about getting the search results into that thread :D (this would be greater :D :D ;D )
thanks
wasnt this made before?
Quote from: Tippmaster on September 21, 2005, 08:33:51 PM
wasnt this made before?
Yea it was made for 1.0.5 but all it did was add the [google] tags.
I did this one with the settings and the other google tag.
Rulez ;D
And it is easy to modify...
Quote from: Ivan Minic on September 22, 2005, 02:14:21 AM
Rulez ;D
And it is easy to modify...
Thanks for the comment. I should have an updated version that would workk on Beta 3, 4 and RC1.
Sorry for the delay in update. I updated the mod and now works for b3 b4 and rc1. any problems let me know.
Updated for 1.1 RC2. The latest package there only contains the files for RC2 and nothing else.
-JayBachatero
I'm getting strange error in Post.template.php
After modification I'm getting
'google' => array('code' => 'google', 'before' => '[google=smf rules]', 'after' => '[/google]', 'description' => $txt['google']),
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
instead of
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
'google' => array('code' => 'google', 'before' => '[google=smf rules]', 'after' => '[/google]', 'description' => $txt['google']),
Any help?
Already talked to Jay about it. Seems before and after statements in the mod system act the exact oposite way of what one would think :P
Hes aware and updating it.
Also check the code that was added to the admin template, it got swapped the very same way.
To make sure that when you uninstall it it works like it should I suggest that you uninstall it and install the updated one. I already fixed this.
The issue with the bbc I had fixed it but it seemed that I forgot to update the file in the zip and just updated the regular file that I was working on.
Thanks TheMatrix for informing me about this. I greatly appreciate it.
This is one of the first mods I have seen which can actually be really useful.
Maybe it could be extended and also have a forum search tag?
It can actually be done. Try this out in subs.php
array(
'tag' => 'search',
'type' => 'unparsed_content',
'content' => 'Search the forum: <a href="' ,$scripturl, '?action=search;search=$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_content' => '<span style="color: red;">Search the forum: $1</span>',
),
if (empty($modSettings['enableEmbeddedFlash']))
$disabled['flash'] = true;
$disabled['search'] = false;
I didn't test this but it should work. I left the target="_blank" so it opens in a new window but it's up to you to chage this. I still prefer [Unknown]'s mod [[]] ;)
Installed new version, and it works :)
Suggestions:
'content' => 'Google Search: <a href="http://www.google.com/search?q=$1" target="_blank">$1</a>',
I think this fraze 'Google Search' should be a translation string -> $txt['google']
I also think, that also url to google, should be transtlation string, to point to translated google site eg. http://www.google.pl/search?hl=pl&q=$1
Yea I was thinking about this too. I may add a text box on the admin panel so that you can enter the text your preffer :) I'm not sure about the url to google. I'll take a look into this. Thanks for the input :)
-JayBachatero
great mod, thanks. but u can optimize the bcc button for default theme? he is ugly
bye mate!
I need to gind a better looking image. if you are able to find a good looking one please let me know :P
Oh lol its fun thing right cause all i get search results is this :
http://www.google.com/search?q=smf%20rules
Even when i type free hosting in between the tag.
How to fix that issue ?
Are you using it like this [google]free hosting[/google] or [google=free hosting]free[/google]? They should both work.
Quote from: JayBachatero on June 04, 2006, 03:23:47 AM
Are you using it like this [google]free hosting[/google] or [google=free hosting]free[/google]? They should both work.
As we discussed on yahoo it was the bbc button and this line in Post.template.php which was making it look like this [google=smf rules]anytext[/google] search for smf rules all the time
'before' => '[google=smf rules]',
So i have fixed that part and also included another google bbc button icon so you guys can download it from here :
LINK CLIPPED.
Now when user clicks on the G bbc button it shows this :
[google][/google] instead of [google=smf rules][/google]
Demo of it with the new image for G can be found here : http://www.forums.sbclansite.com/
Probably would need to register to try the code.
Cheers
Cheers
EDIT: Removed external link to mod.
Ok like I said before though. That smf rules part is added to show that you can use it like that also. When ever I update this mod I will just change that text to "insert search term".
Thanks for the image.
Also can you please remove the file from your server. I like to keep things centralized because in the long run it becomes harder to manage which mod the member is using.
Quote from: JayBachatero on June 04, 2006, 01:59:16 PM
Also can you please remove the file from your server. I like to keep things centralized because in the long run it becomes harder to manage which mod the member is using.
Sorry but i like to keep my mods at one place at it will remain on my machine and you can just download it and upload it here at mods.smf .
Cheers
Ok I understand that. As long as you don't point users to my mod on your machine it's all good. I will edit your post and remove the link to it.
Just an update this mod will break your Streaming mod aka this mod :
Streaming 4.2.1b
If you have that mod on your boards dont install This mod even after uninstall it will not sort out the issue only solution would be to restore sql database prior to this mods installation else your probably doomed unless you can mannually remove the sql entry created by this mod .
Oh by the way jay you can test it on any demo board, just install that streaming mod and than install your mod and you will see what happens.
Ok like I have stated before can you please explain how it breaks the streaming mod. Like I stated before the database stuffs should NOT have any effects on any other mod.
BTW I updated the mod to remove the database stuff to please some people. I also changed the smf rules text.
Looks better and found out why it seems to break (well not break but it disables) the streaming mod.
So to users using streaming mod if u install this mod remember to go to admin>features>layoutandoption
and check the streaming options again cause everytime u either enable or disable this mod those options get unchecked i am not sure why its causing them to uncheck but maybe jay or some modder can look into the sql part.
This mod will be active on RC3??? just let me know =) :D
Perfectly works on RC3 TY
Now to get that youtube working.
It works on RC3? How ?
What version did you get and how did you installed it?
Use Google_Tag_Mod_RC2_2-5-1.tar.gz to get it working on RC3.
What's the point of this mod?
Hmm, i can't get it working. When i download that file, and try to add it via the packagemanager, I get the message that there are no installationactions are available (translated from dutch ... )
How to install?!
Ok here you go. Use this one.
http://mods.simplemachines.org/index.php?action=download;mod=196;id=18895
Haha, why is this one working? :D
Thanks mate for your help ;)
The other one had an install for="1.1 RC2" tag. I used to do that with my older mods. This one stayed behind with that. It's gone now.
I tried install and run this mod (It seems great for me) but the following problem showed up :
(http://i86.photobucket.com/albums/k118/ProtoMan_03/Googlehelp.jpg)
You know what I meant , right ? I am using 1.1 RC3 , my friend installed the mod without any problem (Note : my friend even installed mods more than me and which one I installed he installed too) :'(
Please help me , thank you
Sorry for double posting but I need help so badly , please help me :'(
If you are using a custom theme copy over the image to the correct folder.
Can you tell me the exact name of that folder ? And more , I am using the SMF Default theme :'( , I don't think it is because it doesn't work with IE cause I can't see it at my friend 's site :'(
Themes/default/images/bbc
Hello JayBachatero
I have modified your Mod for my Forum:
- support for 1.1.1
- german language support
- delete "Google Search: "
- insert a little, superior "Google" behind the Searchlink
I hope you think it's are good modifications an wish you a nice day ;)
Thanks for the update Cyberclone. I had forgotten all about this mod :P. I'll look into updating it soon.
Quote from: JayBachatero on September 11, 2006, 01:14:10 PM
Use Google_Tag_Mod_RC2_2-5-1.tar.gz to get it working on RC3.
I used this one, but I get pretty weird results with Greek words (i.e. it does not seem to recognize the Windows-1253 encoding and searches Greek words as extended ASCII strings instead)
Click the Google link on this post to see:
http://www.translatum.gr/forum/index.php/topic,7618.msg54897.html#msg54897
Seems like adding "hs=OPb" to the url fixes it. I'll look more into this and let you know how it goes.
Hi Jay,
Which bit of code do I need to change to get this working?
Thank you!
Spiros
In Subs.php
'content' => 'Google Search: <a href="http://www.google.com/search?q=$1" target="_blank">$1</a>',
replace
'content' => 'Google Search: <a href="http://www.google.com/search?q=$1&hs=OPb" target="_blank">$1</a>',
Hi Jay,
Thanks, but I found that this did not affect it at all, I even tried changing this line
'before' => 'Google Search: <a href="http://www.google.com/search?q=$1" target="_blank">',
to
'before' => 'Google Search: <a href="http://www.google.com/search?q=$1&hs=OPb" target="_blank">',
but it gave strange results too (adding the &hs=OPb after the query word)
Change this one also
'content' => 'Google Search: <a href="http://www.google.com/search?q=$1" target="_blank">$1</a>',
I tried changing both lines ('content' => + 'before' => ), or any single one of them, it still would not work.
Ok I'll look more into this and see what's up with Google.
Hi there, I love the idea of this mod, but it says this when I try to install it on 1.1.2.It may be the same problem that spiros is having.Just thought I would let you know. ;D
Execute Modification ./Sources/Subs.php Test failed
same problem as above - Execute Modification ./Sources/Subs.php Test failed
Same here.
Any ideas?
Chey
I am going to take this one over for Jay also. Just these two. He is swamped with work. I will be looking into this and if you find that I am not responding quickly enough - kick me. But, really, give me a day or two to ensure that I have the code wrapped well enough so that I can converse without sounding like I'm a complete idiot. ;)
Hi, im a recent convert from phpbb to smf and its looking great so far :) this mod appeals to me, but, as with the others above i also get the same error when trying to install it:
Execute Modification ./Sources/Subs.php Test failed
Cheers for taking this on KGIII, I dont mean to hassle ye :P
It's a big one. :D I kind of like it. I've gone through it over and over but let's start with the basics...
Try this one. ;)
Warning - I've only given it some short tests to verify it works on a clean SMF installation BUT it should be good to go.
Mate! Works a treat ;) (and i have 55 mods installed :P)
lovely job thanks so much :)
Not a problem, glad to have it updated... (Been meaning to do so for a while.) And you have almost as many mods installed as I have. Neat.
Does this work fine with 1.1.3?
Thanks!
It should do Matthew...KGIII hasn't put in any version limiting to stop it from doing so...however the version he provided (see page 3 of this topic) appears to only have been tested on SMF 1.1.2...so try it on a test forum before risking anything with a live/production forum.
It should work on 1.1.3 just fine. ;)
Quote from: KGIII on July 17, 2007, 09:08:10 PM
It should work on 1.1.3 just fine. ;)
how come whenever i click on my search word it always lead me to this. Enter Search Term[url] (http://www.google.com/search?q=Enter%20Search%20Term)
Did you enter a search term after clicking the button?
To elaborate, when the button is pressed the result might be something like:
[google=site:kgiii.info]Search the G³ Solutions site for PC help.[/google]
oooo i seee lol thanks
Not a problem. I should look to see if I can change it to be a popup box to insert the data. That may make it easier but, unfortunately, I really lack the time and will likely be right out straight until the end of the month.
I have test to install in smf 1.1.4 but i have received this error on top of page!
Error: Database modifications failed!
now i have uninstalled for security :(
The mod is fine; there appears to be a problem only on your particular installation. If you install the mod again and get the same problem please try extracting the add_sql_row.php file from the package and adding it to your forum root then go to that file with your browser so as to make it run and create the necessary database additions.
BTW @ KGIII on the mod page the latest version still shows as 2.5.1, you might want to update it.
ok thanks, this night i test to reinstall it ;)
Is this mod being worked on or has anyone released a similar mod?
It would be great if the word wrapped in the google tags was hyperlinked to a google search without any other input from the user other than adding the tags with the button.
well, I take-it from the last post that this mod has been orfined, to bad, seems to me the only thing that needs to be done is to get the code updated for 1.1.7 and get the db. string updated for the same.
To bad I don't under-stande how to do this.
If anyone takes this up please notify me.
For anybody it may matter to I installed this on 1.1.8 and it works fine without even having to do any edits to my custom theme. Just copied the image over.
However, I'm getting this
http://gregnmary.gotdns.com:8080/index.php?action=post;topic=26.0;num_replies=5
Apply Filter: Only show the errors with the same message
8: Undefined index: google
File: /srv/www/htdocs/Themes/default/Post.template.php
Line: 815
Sure enough, line 815 is for the google BBC tag mod. For the frickin life of me I cannot figure out what the deal is with this. It isn't hurting anything, but I wanna figure out why. The syntax is exactly the same as for every other BBC tag to the space and character near as I can tell. If I remove the piece of code the error goes away so that's definitely it. Also it's the only BBC button that doesn't display on a mouseover if that's any clue. I'm thinking it has something to do with it's interaction with another file maybe. Not a huge deal, but id anybody might have a clue I'd appreciate it.
Here's the BBC section from post.template.php:
// Assuming BBC code is enabled then print the buttons and some javascript to handle it.
if ($context['show_bbc'])
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
// ]]></script>';
// Hack's Park Color Picker -->
if (!isset($context['disabled_tags']['color']))
echo '
<script language="javascript" type="text/javascript" src="' . $settings['default_theme_url'] . '/HP_colorPicker.js"></script>
<script language="javascript" type="text/javascript"><!-- // -->
function HP_postBox_setColor(sh,c) {
if (typeof(c) == "undefined")
c = document.getElementById("hp_colorpicker_input_aply").value;
if (!HP_colorPicker[\'bg\']) {
document.getElementById("hp_postbox_s_color").style.backgroundColor = c;
if (c == \'\')
document.getElementById("hp_postbox_s_color").src = smf_images_url + "/bbc/nocolor.gif";
else {
document.getElementById("hp_postbox_s_color").src = smf_images_url + "/blank.gif";
surroundText(\'[color=\' + c + \']\', \'[/color]\', document.forms.' . $context['post_form'] . '.' . $context['post_box_name'] . ');
document.forms.' . $context['post_form'] . '.' . $context['post_box_name'] . '.focus(document.forms.' . $context['post_form'] . '.' . $context['post_box_name'] . '.caretPos);
}
HP_colorPicker[\'color\'] = c;
}
else {
document.getElementById("hp_postbox_s_bgcolor").style.backgroundColor = c;
if (c == \'\')
document.getElementById("hp_postbox_s_bgcolor").src = smf_images_url + "/bbc/nocolor.gif";
else {
document.getElementById("hp_postbox_s_bgcolor").src = smf_images_url + "/blank.gif";
surroundText(\'[bgcolor=\' + c + \']\', \'[/bgcolor]\', document.forms.' . $context['post_form'] . '.' . $context['post_box_name'] . ');
document.forms.' . $context['post_form'] . '.' . $context['post_box_name'] . '.focus(document.forms.' . $context['post_form'] . '.' . $context['post_box_name'] . '.caretPos);
}
HP_colorPicker[\'bg_color\'] = c;
}
if (sh) HP_colorPicker_sh();
}
// ]]></script>';
// <-- Hack's Park Color Picker
// The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]),
'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]),
'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]),
'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]),
array(),
'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]),
'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]),
'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]),
array(),
'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]),
'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]),
'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]),
'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]),
array(),
'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]),
'amazonsearch' => array('code' => 'amazonsearch', 'before' => '[amazonsearch]', 'after' => '[/amazonsearch]', 'description' => $txt['amazonsearch_post']),
array(),
'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]),
'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]),
);
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
'google' => array('code' => 'google', 'before' => '[google]', 'after' => '[/google]', 'description' => $txt['google']),
'wiki' => array('code' => 'wiki', 'before' => '[wiki]', 'after' => '[/wiki]', 'description' => $txt['wikipedia']),
'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]),
'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]),
'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]),
'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]),
array(),
'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]),
'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]),
'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]),
array(),
'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]),
'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]),
'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]),
array(),
'code' => array('code' => 'code', 'before' => '[code]', 'after' => '
', 'description' => $txt[259]),
'quote' => array('code' => 'quote', 'before' => '
Quote', 'after' => '
', 'description' => $txt[260]),
array(),
'list' => array('code' => 'list', 'before' => '
', 'description' => $txt[261]),[/code]
Thanks
I figured this one out.
This:
$txt['google'] = 'Google Search';
for some reason wasn't added to the /Themes/default/languages/Modifications.english.php file.
Now the mouseover text displays and the error is gone.
I installed it tonight, and TEXT came up at the top of every page showing something like Google This [....] So I immediatley UNINSTALLED it, then it showed a message HACKER ATTACK!
Let Me Google That For You BBC Tag February 20, 2009, 09:40:57 AM February 23, 2009, 12:34:08 PM
Not a mod I want to try!
SMF 1.1.8
Quote from: kdreger on February 25, 2009, 11:30:24 PM
I installed it tonight, and TEXT came up at the top of every page showing something like Google This [....] So I immediatley UNINSTALLED it, then it showed a message HACKER ATTACK!
Let Me Google That For You BBC Tag February 20, 2009, 09:40:57 AM February 23, 2009, 12:34:08 PM
Not a mod I want to try!
SMF 1.1.8
That's a different mod than this one.
Does it work for 1.1.11? Does the search for non Latin text work ok?
It does not install on 2 Final. Anyone able to adapt it?
Attached the version for SMF2 (adaptation by Dragoon).