Post Reply 
Google search and Local Business results
Oct. 06, 2010, 10:59 PM (This post was last modified: Oct. 07, 2010 04:22 AM by JJoe.)
Post: #1
Google search and Local Business results
Google search occasionally has "Local business" results for some U.S. searches. The code sent for this depends on the user agent. The set hides the google map for at least Opera, Mozilla 2, and ChromePlus.

Problem appears to be solved by forcing a Firefox 3.0 user-agent. Haven't tried to modify google-css-alt.css yet.

EDIT: Best I've been able to do with css is to add a min-width statement to google-css-alt.css. Not very elegant but does seem to work in all affected browsers tested.

Code:
#lu_map {
  min-width: 100px;
}


Am attaching images and relevant (I hope) code for Good and Broken pages but in brief.

Good
Code:
<td valign=top style="padding-right:8px" width=252>
<a href="http://maps.google.com/maps?um=1&amp;ie=UTF-8&amp;q=dog&amp;fb=1&amp;gl=us&amp;hq=dog&amp;hnear=Westwood,+KS&amp;ei=SvCsTIywCoGdlgec5-3BCA&amp;sa=X&amp;oi=local_group&amp;ct=image&amp;resnum=4&amp;ved=0CFAQtgMwAw"  style="border:1px solid #11c;display:block;max-width:252px;padding:1px;">
<img src="http://mt0.google.com/vt/data=LtgX-e3f8ctI3U5dJtbt7EJ1ZfRneYme,R66mELrpZjvTk9Pz_2st2Dc9zz48hcZSsiFLMJfIOcmvv_Tmb2904kIUngHHaNOBQKc2sgHrOf5A8n3qfWLUafPL6kqGNvt1WNiT0a89tPEgjprvPqLLykUhq8Cbxi6TCdSmSgkYnEoPCSJP56Icryq2_IAtWqQz6yuQeYZI-v-oXIq4J-uiYXKg5nwqOXqYNwM16H7PTMedAhrs9CLUp6sjvAUdP221m8Ff_-B5eHZMI8_B2PSEPZUXYK90MKcn92pDO1fIyOiQlopDyPaQvkX_NWLcLwROML_P8sDtUpRsJbMr4WHJlTxsSFZPPbVkgoKrz95NyQN90zLb2I1icCWD8Z4zRbuJoFVUXWsVNfMgjyTn22_7RO97x5KAs-XCY1JCKprAcNaf4hAzEwIQsXEkXZS3ruCPR-6POedfm78NvnJE8hQ" alt="" border=0 id=lu_map width=100% >
</a>

Broke
Code:
<td valign=top style="padding-right:8px">
<a href="http://maps.google.com/maps?um=1&amp;ie=UTF-8&amp;q=dog&amp;fb=1&amp;gl=us&amp;hq=dog&amp;hnear=Westwood,+KS&amp;ei=ceusTLWiK4OBlAfRhuWyCA&amp;sa=X&amp;oi=local_group&amp;ct=image&amp;resnum=4&amp;ved=0CFEQtgMwAw"  style="border:1px solid #11c;display:block;max-width:252px;padding:1px;">
<span id=lu_map style="background:url('http://mt0.google.com/vt/data=LtgX-e3f8ctI3U5dJtbt7EJ1ZfRneYme,R66mELrpZjvTk9Pz_2st2Dc9zz48hcZSsiFLMJfIOcmvv_Tmb2904kIUngHHaNOBQKc2sgHrOf5A8n3qfWLUafPL6kqGNvt1WNiT0a89tPEgjprvPqLLykUhq8Cbxi6TCdSmSgkYnEoPCSJP56Icryq2_IAtWqQz6yuQeYZI-v-oXIq4J-uiYXKg5nwqOXqYNwM16H7PTMedAhrs9CLUp6sjvAUdP221m8Ff_-B5eHZMI8_B2PSEPZUXYK90MKcn92pDO1fIyOiQlopDyPaQvkX_NWLcLwROML_P8sDtUpRsJbMr4WHJlTxsSFZPPbVkgoKrz95NyQN90zLb2I1icCWD8Z4zRbuJoFVUXWsVNfMgjyTn22_7RO97x5KAs-XCY1JCKprAcNaf4hAzEwIQsXEkXZS3ruCPR-6POedfm78NvnJE8hQ') no-repeat center;display:block;height:303px;margin:auto;"></span>
</a>


Attached File(s)
.gif  Good.gif (Size: 84.65 KB / Downloads: 623)
.gif  Broke.gif (Size: 45.15 KB / Downloads: 600)
.txt  good.txt (Size: 13.73 KB / Downloads: 654)
.txt  broke.txt (Size: 13.8 KB / Downloads: 622)
Add Thank You Quote this message in a reply
Oct. 07, 2010, 04:05 PM
Post: #2
RE: Google search and Local Business results
(Oct. 06, 2010 10:59 PM)JJoe Wrote:  EDIT: Best I've been able to do with css is to add a min-width statement to google-css-alt.css. Not very elegant but does seem to work in all affected browsers tested.

Code:
#lu_map {
  min-width: 100px;
}

I have tested with the current minor version of Opera 10 and a US IP at http://www.google.com/search?q=dog .
It doesn't look like there is an elegant way. The responsible property is "width" in this google-css-alt.css rule:
Code:
/* News content tables */
.ts td {
  width: auto !important;
  max-width: none !important;
}

It's actually not just about news tables, but also "Videos" etc..

If width isn't set, then the tables don't stretch to the entire window width. If width or min-width is set to a fixed value, then the layout is broken in Firefox.

So, i agree that your suggestion is an acceptable work-around; i'll add it.
Add Thank You Quote this message in a reply
Oct. 07, 2010, 06:51 PM (This post was last modified: Oct. 07, 2010 06:57 PM by ProxRocks.)
Post: #3
RE: Google search and Local Business results
i "think" i found a fix...
but allow me to cross-browser test this evening before i post...


edit: that is, for the "local businesses" width issue - may i have a "videos" width issue link to use as a test, please?
Add Thank You Quote this message in a reply
Oct. 07, 2010, 07:06 PM
Post: #4
RE: Google search and Local Business results
http://www.google.com/search?q=gaga
Add Thank You Quote this message in a reply
Oct. 07, 2010, 10:19 PM
Post: #5
RE: Google search and Local Business results
i "thought" i might be onto something 'cause my "old" default (based on the 2/13 with 6/6 updates) displays the "local businesses" map correctly...

but now that i'm on the 9/19, i'm seeing what JJoe posted above...

so i started some mixing-and-matching on a "test.cfg" with only three filter changes from the 9/19 out-of-the-box...


with those three filters, my "old" default Google view is back and the "local businesses" map is displayed correctly - BUT in trying to "rewrite" the three filters that those three 'replace' isn't as easy as it might sound...

i'll do more digging over the weekend...
but for the curious, these are the three filters:
Code:
Name = "Google Search: Alternate Display     10.08.22 (multi) [sd ku] (d.s) PFR [add]"
Active = TRUE
Multi = TRUE
URL = "$TST(hCT=*html)www.google.(*/)+{1}(intl/(*/)+{1}(^?)|search\?|webhp|(^?))$SET(keyword=$TST(keyword=\1.(i_layout:[#*:0].)+\2)\1.i_layout:2.\2)"
Limit = 2048
Match = "(^?)$SET(a=)$SET(b=)$STOP()"
        "|"
        "<br>(\r\n+|\n\r+)$SET(1= )"
        "|"
        "<("
        "/b> of (about )+<b>[0-9,]+</b> ((from|over the) $NEST(<b>,</b >) )+for <b>( <b>)+[^<]+"
        "&&((<*>|?)+{95})\2???$SET(1=<\2...)*"
        ")"
        "|"
        "</style >(^$TST(b=s))$SET(b=s)$SET(1="
        "</style>\r\n"
        "\r\n<style id="themed"></style>"
        ")"
        "|"
        "<div ("
        "id=("
        "$AV(ie6tb)>$INEST(<div,</div)</div >( $NEST(<script,</script >))+"
        "|$AV(exp_msgs)$INEST(<div,</div)</div >"
        ")"
        "|style=$AV(margin : -5px 0 5px)$INEST(<div,</div)</div >"
        ")"
        "|"
        "(<span class="std nobr">\&nbsp;- \[ <a href=$AV(\8) class=fl>Translate this page</a> \]</span>)"
        "$SET(Gtranslate=&nbsp;&nbsp;"
        "<a class="tool" href="\8" target=_blank><img src="http://local.ptron/My_HTML/storm119_HTML/trans.png""
        " width=15 height=15 border=0 align="middle">&nbsp;Translate</a>)"
        "|"
        "<(div|li)\2 class="
        "$AVQ(("+g)\#((\s*|")\#|))("
        "((^ style=$AV(margin-(left|right)*))($TST(a=odd)$SET(a=even)|$SET(a=odd))|)$SET(#=$GET(a))"
        ")(*<a)\#"
        "((*href=$AV(/interstitial\?url\=h\9tp(s$SET(Gsecure=https-px-.)|):\/\/\8|http(s$SET(Gsecure=https-px-.)|):\/\/(([^/]+/)\9?*)\8|http(s$SET(Gsecure=https-px-.)|):\/\/\8)*)\5>*</a >)\4\6"
        "($TST(\9=t$SET(0="
        "<a href="http://$GET(Gsecure)\8"><span dir=ltr><img src="http://local.ptron/My_HTML/storm119_HTML/sim.png""
        " width=15 height=15 border=0 align="middle" title="Malware warning!"></a>&#160;&#160;"
        ")*|$SET(0="
        "<a href="http://$GET(Gsecure)\9"><span dir=ltr><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-top.png""
        " width=10 height=10 border=0 title="Go to top domain"></a>&#160;&#160;"
        ")*)|)"
        "$SET(google=$GET(google)1)"
        "$SET(iframe=<div id="google$GET(google)" style="display:none"></div>)"
        "$SET(1="
        "<\2 class=\#&#x20;\3\#\#\4&#160;&#160;\0"
        "<a class="tool"\5 target=_blank><span dir=ltr><img src="http://local.ptron/Grypen_HTML/imgs/google/new.png""
        " width=14 height=10 border=0 align="middle">&nbsp;New&nbsp;Window</a>&#160;&#160;"
        "<a id="plink$GET(google)" class="tool" style="display:inline""
        " href="javascript:GooglePrv('google$GET(google)','&#104;ttp://$GET(Gsecure)\8','link$GET(google)','plink$GET(google)')">"
        "<img src="http://local.ptron/My_HTML/storm119_HTML/preview.png""
        " width=15 height=15 border=0 align="middle">&#160;Preview</a>"
        "<a id="link$GET(google)" class="tool" style="display:none""
        " href="javascript:GooglePrvC('google$GET(google)','link$GET(google)','vlink$GET(google)')">"
        "<img src="http://local.ptron/My_HTML/storm119_HTML/close.png""
        " width=15 height=15 border=0 align="middle">&#160;Close&#160;Preview</a>"
        "<a id="vlink$GET(google)" class="tool" style="display:none""
        " href="javascript:GooglePrvC('google$GET(google)','link$GET(google)','vlink$GET(google)')">"
        "<img src="http://local.ptron/My_HTML/storm119_HTML/reload.png""
        " width=15 height=15 border=0 align="middle">&#160;Show&#160;Preview</a>"
        "$GET(iframe)\6\7"
        ")"
Replace = "\1"

Name = ". + Google Light Blue Theme     10.05.08 (!nn) [ozo] (o.s) PFR [add]"
Active = TRUE
URL = "$TST(hCT=*html)www.google.(^$TST(hOrigUA=mozilla/4.[1-9](^*opera)*))(*/)+{1}(intl/(*/)+{1}(^?)|search\?|webhp|(^?))"
Limit = 32
Match = "<style( id=\"themed\"*>$INEST(<style,//-->|-->|</style))\1(*</style >)\2"
Replace = "<style\1\r\n"
          "/* Proxomitron Tight Light Blue Google Theme */\r\n"
          "a {text-decoration: none !important; font-size: 12px;}\r\n"
          "a:link, .q a:link, a.toplink:visited {color: #0000cc !important;}\r\n"
          "a:visited {color: #990066;}\r\n"
          "a:active, .q a:active, a.fl:active {color: #000066 !important;}\r\n"
          "a:hover, .q a:hover, a.fl:hover {color: #0066cc !important;}\r\n"
          "a.ProXPref:hover {color: #379CCD;}\r\n"
          "a.ProXPrefJs {color: #968AFF !important; }\r\n"
          "a.ProXPrefJs:visited {color: #990066 !important;}\r\n"
          "a.ProXPrefJs:active {color: #000066 !important;}\r\n"
          "a.ProXPrefJs:hover {color: #0066cc !important;}\r\n"
          ".odd {background: #EFF6FF; margin-bottom: 0em !important;}\r\n"
          ".even {background: #DFEFFF; margin-bottom: 0em !important;}\r\n"
          ".s {max-width: none !important; width: auto !important; color: #463E41;}\r\n"
          "li {padding-left: .5em; padding-right: .5em;}\r\n"
          ".g {margin: 0px; line-height: 13px; border-top: 2px solid #dddddd; padding-bottom: 3px;}\r\n"
          "div.mainspace {line-height: 3px;}\r\n"
          "/*div.med {padding-right: 0px !important;}*/\r\n"
          "/*div#ssb {background: #ebeff9;}*/\r\n"
          ".tsw {width: auto;}\r\n"
          ".lst {font-size: 16px;}\r\n"
          "div#cnt {max-width: none;}\r\n"
          "/*div.tsf-p {max-width: none; margin:0 1em;}*/\r\n"
          "#center_col {margin: 0px; padding: 0px;}\r\n"
          "a.tool {color: #999999; padding: 0px 3px 0px 3px;}\r\n"
          "a.tool:hover {background: #ffff99; color: #0000cc; padding: 0px 3px 0px 3px;}\r\n"
          "a.tool:visited {color: #990066;}\r\n"
          ".f, .fl {font-size: 9px; margin-top: -5px;}\r\n"
          "\2"

Name = ". + Google - No left bar  10.05.07 (!nn) [ozo,sumw] (o.s) (mod) [add]"
Active = TRUE
URL = "$TST(hCT=*html)www.google.(^$TST(hOrigUA=mozilla/4.[1-9](^*opera)*))(*/)+{1}(intl/(*/)+{1}(^?)|search\?|webhp|(^?))"
Limit = 15000
Match = "<div id=leftnav*(<div id=foot class=tsf-p)\1"
Replace = "\r\n<!-- Removed LeftNav -->\r\n\1$STOP()"

i'll see if i can pinpoint it more precisely over the weekend...
Add Thank You Quote this message in a reply
Oct. 07, 2010, 10:26 PM
Post: #6
RE: Google search and Local Business results
Code:
#lu_map {
  min-width: 100px;
}
this doesn't work in IE8, btw...
i'm sure i can find a three-browser fix, but i'll need the weekend to come up with something... fingers crossed, i'll keep ya posted...
Add Thank You Quote this message in a reply
Oct. 07, 2010, 11:29 PM (This post was last modified: Oct. 07, 2010 11:30 PM by JJoe.)
Post: #7
RE: Google search and Local Business results
(Oct. 07, 2010 10:26 PM)ProxRocks Wrote:  
Code:
#lu_map {
  min-width: 100px;
}
this doesn't work in IE8, btw...
i'm sure i can find a three-browser fix, but i'll need the weekend to come up with something... fingers crossed, i'll keep ya posted...

IE8 doesn't require it. Adding it doesn't or didn't appear to break anything.

I think I see/understand something that you don't see/understand and will try to review and explain (if necessary) in a little while.
Add Thank You Quote this message in a reply
Oct. 08, 2010, 04:22 AM (This post was last modified: Oct. 08, 2010 03:55 PM by JJoe.)
Post: #8
RE: Google search and Local Business results
(Oct. 07, 2010 11:29 PM)JJoe Wrote:  I think I see/understand something that you don't see/understand and will try to review and explain (if necessary) in a little while.

First, I'm not a css expert and it has been a while. So...

The Local business results are in a table

Code:
<table class=ts width=100% style="margin-top:7px;line-height:100%">

"class=ts" also appears elsewhere in the page and other Google pages.

sidki has found that, for sidki's mods, the TD elements inside the cells given the 'ts' class must have and not have certain properties

sidki Wrote:If width isn't set, then the tables don't stretch to the entire window width. If width or min-width is set to a fixed value, then the layout is broken in Firefox.

So, sidki uses a separate style sheet that overrules Google's choices with

Code:
.ts td {
  width: auto !important;
  max-width: none !important;
}

The thing is

Code:
<td width=62% valign=top>

follows the google map and its width property is change to "auto" by the style sheet.
When the google map is provided by "<span id=lu_map style="background:url('http://mt0.google.com/vt/data=", the span's image is partially hidden.
When the google map is provided by "<img border="0" width="100%" id="lu_map" alt="" src="http://mt0.google.com/vt/data=", the image is not hidden.
For me, what happens depends on the code that google sends not the browser used. IOW, IE8 renders the span's image as partially hidden and the <img*> as totally visible.
Adding a minimum width property to the span's styling allows the background image to show and doesn't seem to affect the page that uses the img tag.



Your ". + Google Light Blue Theme 10.05.08 (!nn) [ozo] (o.s) PFR [add]" filter contains the css styling.
From what I can decypher, the filter appears to be like sidki's style sheet but without the part causing the problem. So, there may still be problems with Firefox.
Rewriting filters and the required testing...

I think I'd rather add a little css to the style sheet and make better use of our weekend Wink

HTH

Edit for spelling
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: