Diary SiteMap RecentChanges About Contact 2007-11 Calendar

Search:

Matching Pages:

2007-11-19 Oddmuse and Google Custom Search Engines

Last edit

Summary: Using Google's Custom Search Engine.

Changed:

< Here's a possible setup for your config file. Note how I removed the submit button and the fancy Javascript, and I deleted the id attribute for the form (because this form will appear at the top and at the bottom of every page).

to

> Here's a possible setup for your config file. Note how I removed the submit button and the fancy Javascript, and I deleted the id attribute for the form (because this form will appear at the top and at the bottom of every page). Also note the ugly hack of closing the span, printing a form, and opening a new span to have this all fit into a normal goto bar. Uuuugly. But it works. :)

Changed:

< </p></form><!-- Google CSE Search Box Begins -->

to

> <!-- Google CSE Search Box Begins -->


I recently replaced the search box for EmacsWiki with a Google Custom Search Engine. This is better than adding the site:emacswiki.org term because emacswiki.org/cgi-bin/emacs and emacswiki.org/cgi-bin/alex are two different sites. It is possible two create two different search engines and supply the appropriate URL patterns, and it seems to work.

Here’s a possible setup for your config file. Note how I removed the submit button and the fancy Javascript, and I deleted the id attribute for the form (because this form will appear at the top and at the bottom of every page). Also note the ugly hack of closing the span, printing a form, and opening a new span to have this all fit into a normal goto bar. Uuuugly. But it works. :)

$UserGotoBar = qq{</span>
<!-- Google CSE Search Box Begins  -->
<form class="tiny" action="http://www.google.com/cse"><p>
  Google:
  <input type="hidden" name="cx" value="004774160799092323420:s9wlu0va1v0" />
  <input type="text" name="q" size="25" />
</p></form>
<!-- Google CSE Search Box Ends -->
<span>
};

Tags:

Show Google +1

Comments


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

A carefully selected set of emoji for you to copy and paste: • ✕ ✓ ✝ ☠ ☢ ☣ ⚛ ☭ ☮ ☯ ⚒ ⚓ ⚔⚙ ★ ☆ ✨ 🌟 🐣 🐤 🐥 🐦 🐧 🐨 🐷 🐻 🐼 🐢 🐝 🐛 🐙 🐒 🐌 🐋 👑 ✊ 👊 ✌ 👋 👌 👍 👎 👏 👸 🍵 🍷 👹 👺 👻 👽 👾 👿 💀 ❤ ❦ ♥ 💔 📓 📖 📜 📝 🔒 🔓 🔔 🔥 🔨 🔪 🔫 🔮 😁 😂 😃 😄 😅 😆 😉 😊 😋 😌 😍 😏 😒 😓 😔 😖 😘 😚 😜 😝 😞 😠 😡 😢 😣 😤 😥 😨 😩 😪 😫 😭 😰 😱 😲 😳 😵 😷 😸 😹 😺 😻 😼 😽 😾 😿 🙀 🙇 🙈 🙉 🙊 🚶 🚲 🚀 🚽

To save this page you must answer this question:

Please say HELLO.