Zur Google-Suche mit Ergebnissen auf der eigenen Seite


Torsten beschreibt in seinem Blog vi-su recht schön, wie man man die Google adsense Suche in seinen Blog integriert und die Ergebnisse auch gleich auf der eigenen Seite erscheinen. Wen’s interessiert, schaut’s euch mal an.

Ich habe das zur Probe hier mal gemacht, ist doch nicht so ganz easy, deshalb noch ein paar Worte von mir dazu.

Zitat meines Kommentars bei vi-su:

Hi Torsten,
das muss ich auch mal probieren, dachte ich..
also schnell den adsense Code besorgt, einen Teil in die sidbar.php, den anderen Teil in ein Template.
Wichtig (bei mir zumindest) ist, dass man ein Seitentemplate nimmt, wo vor dem php get_header noch der Template-Eintrag ist, etwa so:

/*
Template Name: suche
*/
?>

Gute Vorlage ist die archives.php der meisten Themes.
Dann alles raus zwischen div content bis ende dieses div.
Da kommt, wie Du schön schreibst, der Googlecode für die eigene Seite rein.
Damit die Suche aber diese Seite findet, reicht es nicht, den Pfad bis ins theme anzugeben!
Besser man schreibt eine neue Seite auf Basis der neuen Template, sollte ‘ne ganz leere Seite sein.


Den Pfad zu dieser Seite, z.B. domain/index.php/suche kann man dann als Suchergebnisseite angeben. (oder im Googlecode zweite Zeile hinter form – action …
Dann klappt’s.
Noch was, der Platz sollte mindestens 500px breit sein, bei deinen 470px hier wird’s nicht passen.
Ich hab’ nur 450, also schiebt’s mir die zweite Sidebar runter – ist mir egal..

Wer’s bis hier geschafft hat und keinen adsense account hat, es geht eigentlich noch besser mit dem Google Code search Api.

Ich hatte mich hier: CSS style – Google AJAX Search APImal darüber ausgelassen, die Ergebnisse sind hier: Web-Search

Viel Spass




Theme Wikipedia the free encyclopedia

Theme (music), the initial or principal melody in a musical piece ... Theme (Byzantine district), an administrative district in the Byzantine Empire governed by a ... read more...

theme definition of theme by

Translations of theme. theme synonyms, theme antonyms. Information about theme in the free online English dictionary and encyclopedia. theme music ... ... read more...

theme Definition Synonyms from Answers

theme n. A topic of discourse or discussion. See synonyms at subject . A subject of artistic representation ... read more...

PS3 Dynamic Theme Clash of

Dynamic PS3 theme featuring Medusa sliding around with her snake hairdo. Clash of the Titans dynamic theme is available Now at the Playstation ... read more...

Sohan Quadri as a Prophetic

Sohan Quadri as a Prophetic Poet: A Critical Review of AFORISMER by Santosh Kumar Sohan Quadri’s Aforismer AFORISMER is a bilingual publication in English ... read more...

Misheard Lyrics Bad Romance Lady

I was sent this by my daughter @MillieClarke and it goes down in my books as a classic. A video playing around with the lyrics ... read more...

4. July 2007 
Tags: , , , , wordpress

Short URL for 'Zur Google-Suche mit Ergebnissen auf der eigenen Seite':

Sure you like to read these similar posts too!

don't forget:

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • MisterWong
  • Bloglines
  • Technorati
  • Sphinn
  • Facebook
  • LinkedIn
  • TwitThis

Kommentare

Einen Kommentar schreiben

Get Adobe Flash playerPlugin by wpburn.com wordpress themes