Post Reply 
[Kye-U] Google Alternate Display...
Feb. 08, 2009, 07:05 PM
Post: #1
[Kye-U] Google Alternate Display...
Kye-U,

kind of curious, if you do a Google Search for "showimage.htm", you get a "did you mean" 'top 2 results shown' tidbit...

below those two results is a "line", but the line only spans roughly 3/4 of the page...

can it be altered so that it spans the same width as the shaded every-other search result?
Add Thank You Quote this message in a reply
Feb. 08, 2009, 07:11 PM
Post: #2
RE: [Kye-U] Google Alternate Display...
Definitely! I'll have it fixed after I get some food Wink

EDIT:

Code:
[Patterns]
Name = "Google Search: Alternate Display     9.01.30 (multi) [sd] (d.s) ku-20090208"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)www.google.[^:/]+/(intl/[^/]+/(^?)|search\?(^q\=cache:)|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$SET(1= )| <br>( <table)\2$SET(1=</p><br class=mainspace>\2))"
        "|"
        "<("
        "/b> of (about )+<b>[0-9,]+</b> ((from|over the) $NEST(<b>,</b >) )+for <b>( <b>)+[^<]+"
        "&&((<*>|?)+{95})\2???$SET(1=<\2...\3\4\5)*|$SET(1=<\2\3\4\5)\2"
        ")(*</table > )\3(<div(^ id=)$INEST(<div,>)$SET(5=<div)|)$SET(4=<div id="topspace">&nbsp;</div>\r\n)"
        "|"
        "<style(^$TST(b=s))$SET(b=s)$SET(1="
        "<script>"
        "var prxSpics=["http://local.ptron/sidki_h_$GET(cfg)/Google/google-","
        "new Image(),new Image(),new Image()];"
        "prxSpics[1].src=prxSpics[0]+"bug.png";prxSpics[2].src=prxSpics[0]+"top.png";"
        "prxSpics[3].src=prxSpics[0]+"new.png";"
        "</script>"
        "<style id="themed""
        ")"
        "|"
        "<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 >"
        ")"
        "|"
        "<(div|p|li)\2 class="
        "$AV(g)("
        "((^ style=$AV(margin-(left|right)*))($TST(a=odd)$SET(a=even)|$SET(a=odd))|)$SET(#=$GET(a))"
        ")(*<a)\#"
        "(*( href=$AV(/interstitial\?url\=h\9|([^/]+//[^/]+/)\9?*|*))\5*</a >)\4\6( <br>|( <table)\7)"
        "($TST(\9=t$SET(0="
        "<a href="h\9"><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-bug.png""
        " width=16 height=10 border=0 title="Malware warning!"></a>&nbsp;&nbsp;"
        ")*|$SET(0="
        "<a href="\9"><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>&nbsp;&nbsp;"
        ")*)|)"
        "$SET(1="
        "<\2 class=g&#x20;\#\#\4&nbsp;&nbsp;\0"
        "<a\5 target=_blank><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-new.png""
        " width=14 height=10 border=0 title="Open in new window"></a>&nbsp;&nbsp;"
        "\6<br class=mainspace><br class=mainspace>\7"
        ")"
        "|"
        "<hr size=1 align=left color=#c9d7f1 width=65%>$SET(1=<hr size=1 align=left color=#c9d7f1 width=100%>)"
Replace = "\1"

The new additions are the last two lines in the matching expression, a simple match/replace. I checked in the US and Canadian versions of Google, and the code is exactly the same.
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 08, 2009, 07:53 PM
Post: #3
RE: [Kye-U] Google Alternate Display...
When doing ProxRocks' example search, the first result right below that 3/4 line is for me:

Quote:Results for: showimage.htm
#
International Business Times - Article Archives [Go to top domain] [Open in new window] [Go to top domain] [Open in new window]

The little images, inserted right to that link, are duplicated.
That happens only with that first link. But for all "Did you mean" searches i've just tried.

If that's hard to reproduce, or problematic to fix, surely no biggie! Smile!
Add Thank You Quote this message in a reply
Feb. 08, 2009, 08:19 PM
Post: #4
RE: [Kye-U] Google Alternate Display...
Fixed, although I don't really know the reason why "<p" was also being matched.

What I changed was (div|p|li) to (div|li).

The reason for the duplicate images is because of:

Code:
<li><p class=g style="margin-top:0"><span class=med>Results for:&nbsp;<b>showimage.htm</b></span>

Note the "<p class=g". Wink This updated filter also seems to prevent the "Results for: showimage.htm" being included in the alternating row colours system.

Code:
[Patterns]
Name = "Google Search: Alternate Display     9.01.30 (multi) [sd] (d.s) ku-20090208b"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)www.google.[^:/]+/(intl/[^/]+/(^?)|search\?(^q\=cache:)|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$SET(1= )| <br>( <table)\2$SET(1=</p><br class=mainspace>\2))"
        "|"
        "<("
        "/b> of (about )+<b>[0-9,]+</b> ((from|over the) $NEST(<b>,</b >) )+for <b>( <b>)+[^<]+"
        "&&((<*>|?)+{95})\2???$SET(1=<\2...\3\4\5)*|$SET(1=<\2\3\4\5)\2"
        ")(*</table > )\3(<div(^ id=)$INEST(<div,>)$SET(5=<div)|)$SET(4=<div id="topspace">&nbsp;</div>\r\n)"
        "|"
        "<style(^$TST(b=s))$SET(b=s)$SET(1="
        "<script>"
        "var prxSpics=["http://local.ptron/sidki_h_$GET(cfg)/Google/google-","
        "new Image(),new Image(),new Image()];"
        "prxSpics[1].src=prxSpics[0]+"bug.png";prxSpics[2].src=prxSpics[0]+"top.png";"
        "prxSpics[3].src=prxSpics[0]+"new.png";"
        "</script>"
        "<style id="themed""
        ")"
        "|"
        "<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 >"
        ")"
        "|"
        "<(div|li)\2 class="
        "$AV(g)("
        "((^ style=$AV(margin-(left|right)*))($TST(a=odd)$SET(a=even)|$SET(a=odd))|)$SET(#=$GET(a))"
        ")(*<a)\#"
        "(*( href=$AV(/interstitial\?url\=h\9|([^/]+//[^/]+/)\9?*|*))\5*</a >)\4\6( <br>|( <table)\7)"
        "($TST(\9=t$SET(0="
        "<a href="h\9"><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-bug.png""
        " width=16 height=10 border=0 title="Malware warning!"></a>&nbsp;&nbsp;"
        ")*|$SET(0="
        "<a href="\9"><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>&nbsp;&nbsp;"
        ")*)|)"
        "$SET(1="
        "<\2 class=g&#x20;\#\#\4&nbsp;&nbsp;\0"
        "<a\5 target=_blank><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-new.png""
        " width=14 height=10 border=0 title="Open in new window"></a>&nbsp;&nbsp;"
        "\6<br class=mainspace><br class=mainspace>\7"
        ")"
        "|"
        "<hr size=1 align=left color=#c9d7f1 width=65%>$SET(1=<hr size=1 align=left color=#c9d7f1 width=100%>)"
Replace = "\1"
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 08, 2009, 08:45 PM
Post: #5
RE: [Kye-U] Google Alternate Display...
Thanks, also for the code explanations!

Google used <p> tags, before introducing <li>. Probably it isn't used anymore now.
Regarding <hr>'s, in case they change something to the exact code, maybe a candidate for the CSS?

Old:
Code:
/* Content snippets */
.j { width: 100%; }

New:
Code:
/* Content snippets, horizontal rules*/
.j, hr { width: 100%; }
Add Thank You Quote this message in a reply
Feb. 08, 2009, 08:49 PM
Post: #6
RE: [Kye-U] Google Alternate Display...
(Feb. 08, 2009 08:45 PM)sidki3003 Wrote:  Google used <p> tags, before introducing <li>. Probably it isn't used anymore now.

Ah, that makes sense Eyes Closed Smile

(Feb. 08, 2009 08:45 PM)sidki3003 Wrote:  Regarding <hr>'s, in case they change something to the exact code, maybe a candidate for the CSS?

Old:
Code:
/* Content snippets */
.j { width: 100%; }

New:
Code:
/* Content snippets, horizontal rules*/
.j, hr { width: 100%; }

That's a better solution! Thanks Smile! I guess you can remove the two last lines in the last filter I posted and update the CSS file.
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 08, 2009, 08:57 PM
Post: #7
RE: [Kye-U] Google Alternate Display...
Good, i'll update filter and CSS accordingly.
Add Thank You Quote this message in a reply
Feb. 09, 2009, 01:39 AM
Post: #8
RE: [Kye-U] Google Alternate Display...
If you are logged in:

The alternating row color system doesn't work, only the second result of the 'top 2 results shown' is shaded.

The [Go to top domain] [Open in new window] links are not added.
Add Thank You Quote this message in a reply
Feb. 09, 2009, 01:57 AM
Post: #9
RE: [Kye-U] Google Alternate Display...
$AV(g) -> $AV(g(\s*|))
?
Add Thank You Quote this message in a reply
Feb. 09, 2009, 02:34 AM
Post: #10
RE: [Kye-U] Google Alternate Display...
whenever, it works fine for me when I'm logged in. I'm guessing you have a different version of Google? Can you copy/paste the unfiltered source code and attach it here?

Thanks!
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 09, 2009, 03:04 AM
Post: #11
RE: [Kye-U] Google Alternate Display...
(Feb. 09, 2009 01:57 AM)sidki3003 Wrote:  $AV(g) -> $AV(g(\s*|))
This brings the alternating row color and the [Go to top domain] [Open in new window] links back.

Attached you can find the source code.


Attached File(s)
.zip  google.zip (Size: 22.7 KB / Downloads: 891)
Add Thank You Quote this message in a reply
Feb. 10, 2009, 07:03 PM
Post: #12
RE: [Kye-U] Google Alternate Display...
It's time to get to a "final" filter version. Smile!

I assume that i can add suggested change. (It *could* potentially break layout, because it doesn't write back the original secondary classes - those that follow "g".)
Add Thank You Quote this message in a reply
Feb. 10, 2009, 07:59 PM
Post: #13
RE: [Kye-U] Google Alternate Display...
No reported page layout breakage here so far Wink
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 11, 2009, 02:25 AM
Post: #14
RE: [Kye-U] Google Alternate Display...
Is this supposed to be like that?

.png  google logo missing.png (Size: 7.39 KB / Downloads: 782)
Add Thank You Quote this message in a reply
Feb. 11, 2009, 05:43 PM
Post: #15
RE: [Kye-U] Google Alternate Display...
Yep
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: