Post Reply 
Scroogle: Alternate Display
Feb. 28, 2009, 08:59 AM
Post: #1
Big Grin Scroogle: Alternate Display
This piggy-backs off of Sidki's Google images/CSS, and uses concepts from his "Google: Alternate Display" filter. They don't really need to reference to the "http://local.ptron...css" file (the CSS rules can be put into the three style filters); I'm a little strapped for time, so I didn't check which CSS rules are essential:

Code:
[Patterns]
Name = "Scroogle: Alternate Display"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)(www.|)scroogle.org/cgi-bin/nbbw.cgi"
Limit = 625
Match = "<h3>Sorry, but we are unable*</a>"
        "$SET(1=<form method=post action="http://www.scroogle.org/cgi-bin/nbbw.cgi">"
        "<input type=text name="Gw" value="" size="40" maxlength="225">&nbsp;&nbsp;<input type="submit" value="Search">"
        "<input type=hidden name="n" value="1"></form></center>)"
        "|(<INPUT TYPE=TEXT NAME="Gw" VALUE="\8" SIZE="30" MAXLENGTH="225">)\2$SET(query=\8)$SET(1=\2)"
        "|Google Search</b>$SET(1=Google Search</b>&nbsp;-&nbsp;<a href="http://images.google.com/images?gbv=1&num=100&hl=en&safe=off&q=$GET(query)&um=1&ie=UTF-8&sa=N&tab=wi" target=_blank>Images</a>)"
        "|<(/|)blockquote>"
        "|<ul><font size=2>$SET(1=<div class="s">)"
        "|</font></ul>$SET(1=</div>)"
        "|$NEST(<br><font color=#008000>,\3,</font>)$SET(1=<div class=mainspace></div><cite>\3</cite></div>)"
        "|$NEST(<b style="background-color:#\w">,\3,</b>)$SET(1=<em>\3</em>)"
        "|([#1:*])\2. <a href=$AV((([^/]+//[^/]+/)\9?*|*)\5)>\7</a>$TST(\2=(?)\8*)($TST(a=odd)$SET(a=even)|$SET(a=odd))$SET(1=<div class="g $GET(a)"><a href="\5">\7</a>&nbsp;&nbsp;<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;<a href="\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>)"
        "((^$TST(counted=yes))$SET(counted=yes)$SET(count=\8)$TST(($GET(count)+)=$LST(Count)|*)$SET(count2=$GET(i))$TST(($GET(count)-)=$LST(Count)|*)$SET(count1=$GET(i))|)"
        "|<BR><font size=2>number of results*</font>$SET(1=</form>"
        "<table><tr><td><form method=post action="http://www.scroogle.org/cgi-bin/nbbw.cgi"><input type=hidden name="Gw" value="$GET(query)">"
        "<input type=hidden name="z" value="$GET(count1)"><input type="submit" value="Previous"><input type=hidden name="n" value="1"></form></td>"
        "<td><form method=post action="http://www.scroogle.org/cgi-bin/nbbw.cgi"><input type=hidden name="Gw" value="$GET(query)">"
        "<input type=hidden name="z" value="$GET(count2)"><input type="submit" value="Next"><input type=hidden name="n" value="1"></form></td></tr></table>)"
Replace = "\1"

Name = ". + Scroogle Dark Blue Theme"
Active = FALSE
URL = "$TYPE(htm)(www.|)scroogle.org/cgi-bin/nbbw.cgi"
Limit = 10
Match = "</TITLE>$SET(1=</TITLE>"
        "<script>"
        "var prxSpics=["http://local.ptron/sidki_h_$GET(cfg)/Google/google-","
        "new Image(),new Image(),new Image()];"
        "prxSpics[1].src=prxSpics[0]+"top.png";"
        "prxSpics[2].src=prxSpics[0]+"new.png";"
        "</script>"
        "<style type="text/css">\r\n"
        "/* Proxomitron dark blue Scroogle theme */\r\n"
        "body {background: #253960 url(http://local.ptron/sidki_h_$GET(cfg)/Google/google-bg-blue.png) repeat-x; font-size: 13px;}\r\n"
        ".even {background: #334B7B;}\r\n"
        ".odd,.even {margin:7px 0;padding: 3px;}\r\n"
        ".a,cite,.cite,.cite:link{color:green;font-style:normal}\r\n"
        "em{font-weight:bold;font-style:normal}em,b{text-decoration:inherit}\r\n"
        "</style>\r\n"
        "<style>@import url(http://local.ptron/sidki_h_$GET(cfg)/Google/google-dark.css);</style>\r\n)"
Replace = "\1"

Name = ". + Scroogle Light Blue Theme"
Active = FALSE
URL = "$TYPE(htm)(www.|)scroogle.org/cgi-bin/nbbw.cgi"
Limit = 10
Match = "</TITLE>$SET(1=</TITLE>"
        "<script>"
        "var prxSpics=["http://local.ptron/sidki_h_$GET(cfg)/Google/google-","
        "new Image(),new Image(),new Image()];"
        "prxSpics[1].src=prxSpics[0]+"top.png";"
        "prxSpics[2].src=prxSpics[0]+"new.png";"
        "</script>"
        "<style type="text/css">\r\n"
        "/* Proxomitron light blue Scroogle theme */\r\n"
        "body {font-size: 13px; color: #000;}\r\n"
        ".g {margin-top: 10px; margin-bottom: 10px;}\r\n"
        "div.g, p.g {line-height: 16px; padding: 2px 5px 4px 5px;}\r\n"
        ".odd {background: #EFF6FF;}\r\n"
        ".even {background: #DFEFFF;}\r\n"
        "br.mainspace {line-height: 3px;}\r\n"
        "div.mainspace {height: 3px;}\r\n"
        "a {text-decoration: none;}\r\n"
        "a:link, .q a:link, a.toplink:visited {color: #0C5AA9;}\r\n"
        "a:visited {color: #087D7E;}\r\n"
        "a:hover {text-decoration: underline;}\r\n"
        "a:hover, .q a:hover, a.fl:hover {color: #1689FF;}\r\n"
        ".s {max-width: none;}\r\n"
        ".odd,.even {margin:7px 0;padding: 3px;}\r\n"
        ".a,cite,.cite,.cite:link{color:green;font-style:normal}\r\n"
        "em{font-weight:bold;font-style:normal}em,b{text-decoration:inherit}\r\n"
        "</style>\r\n)"
Replace = "\1"

Name = ". + Scroogle Dark Grey Theme"
Active = TRUE
URL = "$TYPE(htm)(www.|)scroogle.org/cgi-bin/nbbw.cgi"
Limit = 10
Match = "</TITLE>$SET(1=</TITLE>"
        "<script>"
        "var prxSpics=["http://local.ptron/sidki_h_$GET(cfg)/Google/google-","
        "new Image(),new Image(),new Image()];"
        "prxSpics[1].src=prxSpics[0]+"top.png";"
        "prxSpics[2].src=prxSpics[0]+"new.png";"
        "</script>"
        "<style type="text/css">\r\n"
        "/* Proxomitron dark grey Scroogle theme */\r\n"
        "body {background: #333333 url(http://local.ptron/sidki_h_$GET(cfg)/Google/google-bg-gray.png) repeat-x; font-size: 13px;}\r\n"
        ".even {background: #454343;}\r\n"
        ".odd,.even {margin:7px 0;padding: 3px;}\r\n"
        ".a,cite,.cite,.cite:link{color:green;font-style:normal}\r\n"
        "em{font-weight:bold;font-style:normal}em,b{text-decoration:inherit}\r\n"
        "</style>\r\n"
        "<style>@import url(http://local.ptron/sidki_h_$GET(cfg)/Google/google-dark.css);</style>\r\n)"
Replace = "\1"

Test: http://scroogle.org/cgi-bin/nbbw.cgi

Wink

Pretty messy filters, but they do the job. I think I'll be spending all my weekend studying, so I just wanted to get this posted so you folks can take a look, and possibly improve upon the filters Eyes Closed Smile


.jpg  main.jpg (Size: 59.45 KB / Downloads: 624)

.jpg  search.jpg (Size: 277.47 KB / Downloads: 618)

.jpg  search2.jpg (Size: 273.59 KB / Downloads: 628)

What these filters do:
  • make Scroogle look better (alternating row colours, Sidki's "Top Level" / "New Window" icons)
  • add "Previous" / "Next" buttons at the bottom of every page
  • add an "Images" link at the top of the page that goes to Google Images
Visit this user's website
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: