• [Mod] Opensearch v0.1 5 0 5 1
Currently:  

Author Topic: [Mod] Opensearch v0.1  (Read 64289 times)

0 Members and 1 Guest are viewing this topic.

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #45 on: November 13, 2010, 12:53:08 AM »
Code Update:
Online Installation:  :arrow:
if v0.1 is the new version, what version was before that? v0.0? ;)
What's new in this version?

[EDIT]

This line:
define('GET_CACHES', (isset($HTTP_GET_VARS['s'])));

Needs to be replaced with:
define('GET_CACHES', (isset($_GET['s'])));


$HTTP_GET_VARS - not available on all servers. However after global.php executed $HTTP_GET_VARS should be used instead of $_GET
« Last Edit: November 13, 2010, 01:07:09 AM by V@nо »
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #46 on: November 13, 2010, 01:16:48 AM »
Hi Vano,

in principle it is not a new version. For the modification can not even more than before. However, this version is better prepared for the future. Just the new "CSS data" have been very important.

In an advanced version I am working on a support for Opera and Safari. There are several code snippets that you can work and we'll see if I can design something from it.

Offline dgu

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #47 on: November 14, 2010, 08:08:47 PM »
Hallo,

Super V2 ist da und trotzdem klappts nicht  :(

1.)

2.) Wenn ich in de Datei opensearch die Url h**p://www.mozilla.org/2006/browser/search/ aufrufe bekomme ich dann ein 404: File Not Found

3.) Auf der Startseite rechts oben erscheint die Grafik, auf den Unterseiten und den Detailseiten nicht

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #48 on: November 14, 2010, 08:21:32 PM »
Code Update:
Online Installation:  :arrow:
if v0.1 is the new version, what version was before that? v0.0? ;)
What's new in this version?

[EDIT]

This line:
define('GET_CACHES', (isset($HTTP_GET_VARS['s'])));

Needs to be replaced with:
define('GET_CACHES', (isset($_GET['s'])));


$HTTP_GET_VARS - not available on all servers. However after global.php executed $HTTP_GET_VARS should be used instead of $_GET

Thank you!

Hallo,

Super V2 ist da und trotzdem klappts nicht  :(

1.)

2.) Wenn ich in de Datei opensearch die Url h**p://www.mozilla.org/2006/browser/search/ aufrufe bekomme ich dann ein 404: File Not Found

3.) Auf der Startseite rechts oben erscheint die Grafik, auf den Unterseiten und den Detailseiten nicht

Das liegt an deine Seitenbeschreibung weil ein ö im Name vorkommt. Mal sehen ob ich dafür eine Lösung finde!

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Opensearch v0.1
« Reply #49 on: November 14, 2010, 08:38:59 PM »
Das liegt an deine Seitenbeschreibung weil ein ö im Name vorkommt. Mal sehen ob ich dafür eine Lösung finde!

Hi,

dann muss da halt ein "oe" her oder was meinst du mit Seitenbeschreibung?
Den Seitennamen?
(Kann man da nicht mit html arbeiten (ö oder ö)?


Gruß Jens

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #50 on: November 14, 2010, 09:33:49 PM »
Code Update:
Online Installation:  :arrow:
if v0.1 is the new version, what version was before that? v0.0? ;)
What's new in this version?

[EDIT]

This line:
define('GET_CACHES', (isset($HTTP_GET_VARS['s'])));

Needs to be replaced with:
define('GET_CACHES', (isset($_GET['s'])));


$HTTP_GET_VARS - not available on all servers. However after global.php executed $HTTP_GET_VARS should be used instead of $_GET

Thanks for the note. I have already installed and comes with the next update.

But there are problems with the page name. If in the name of "ö", "ä" or the like occur, it does not work the script.

Can this be solved somehow? As I have unfortunately no idea.

I tried the following, but the logic does not work! That what comes out of it must also be converted or?

----| ---- | -----|---

Danke für den Hinweis. Das habe ich bereits eingebaut und kommt mit dem nächsten Update.

Es gibt aber Probleme mit dem Seitennamen. Wenn in dem Name "ö", "ä" oder dergleichen vorkommen, dann funktioniert das Script nicht.

Kann man das auch irgendwie lösen? Da habe ich leider keine Idee.

Ich habe folgendes versucht, aber logisch das es nicht funktioniert! Dass was dabei herauskommt muss ebenfalls umgewandelt werden oder?


and

htmlspecialchars dont work too
  echo '      <ShortName>'.htmlentities($config['site_name'], ENT_QUOTES).'</ShortName>';

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Opensearch v0.1
« Reply #51 on: November 15, 2010, 03:51:39 AM »
try htmlspecialchars()
Also if I'm not mistaken, browser expects xml in unicode, perhaps that's why it doesn't accept non-ACSII characters if they are not in unicode.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #52 on: November 15, 2010, 12:31:24 PM »
But this dont work too
'      <ShortName>'.htmlspecialchars($config['site_name'], ENT_QUOTES).'</ShortName>';

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Opensearch v0.1
« Reply #53 on: November 16, 2010, 11:15:29 PM »
Hi Benny,

ich vermisse die anzeige des favicon wenn man die Suchmaschine installiert hat,
mit der alten Version tauchte das icon auf.

Mit der neuen fehlt es.

Wie bekomm ich das wieder dahin?

hier nochmal Wortlos:



Ich hab ein eigenes favicon im root liegen das mir auch alle Browser anzeigen, desweiteren ist da
noch im opensearch ordner das opensearch_favicon.png das aber auch nicht angezeigt wird.

Jetzt verstehe ich nicht ganz wieso das bei dir ein png ist, geht das auch?

Du schreibst:

Code: [Select]
Ebenfalls erkennt das Script ob eine favicon.ico vorhanden ist. Sollte keine vorhanden sein benutzt das Script das eigene Favicon als Icon für die Suche.
EDIT:

Im ie taucht das favicon auf, im FF nicht.

In Safari und Opera kommt die nicht unterstützt Meldung (soweit ok)
Im Chrome passiert garnix, weder suchmaschinen installation noch die Meldung der fehlenden Browserunterstützung.



MfG Jens
« Last Edit: November 16, 2010, 11:27:33 PM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #54 on: November 16, 2010, 11:21:12 PM »
Eigentlich sollte das auftauchen.
Wenn im root keine favicon.ico vorhanden sein sollte, dann benutzt Opensearch ein eigenes.
Wenn das favicon.ico aber vorhanden ist, wird das eigentlich auch genommen.

Kann man das Live testen?

Weil dieser Abschnitt ist dafür zuständig

$favicon ROOT_PATH."favicon.ico";
function 
get_opensearch_favicon($favicon) {
  global 
$config;
  if (
file_exists($favicon)) {
    return 
$favicon;
  }
  else {
    return 
ROOT_PATH."/opensearch/img/opensearch_favicon.png";
  }
}

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Opensearch v0.1
« Reply #55 on: November 16, 2010, 11:28:25 PM »
Hi,

ich hab zwischenzeitlich editiert, bitte les nochmal oben.


Gruß Jens

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Opensearch v0.1
« Reply #56 on: November 16, 2010, 11:36:16 PM »
Guck mal in dem Anhang. Da ist eine inoffizielle opensearch.php

Teste die mal bitte!

@ V@no....

dont work....

  header ("content-type: text/xml; charset=UTF-8'");
  
$array = array("x-ico""gif""jpg""png");

  echo 
'  <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">';
  echo 
'      <ShortName>'.htmlspecialchars($config['site_name'], ENT_QUOTES'UTF-8').'</ShortName>';
  echo 
'      <Description>'.$lang['search'].'</Description>';
  echo 
'      <InputEncoding>UTF-8</InputEncoding>';
  
$favicon_info getimagesize($url.get_opensearch_favicon($favicon));
  if (!isset(
$favicon_info[2]) || !isset($array[$favicon_info[2]]))
    
$favicon_info[2] = 0;
  echo 
'      <Image width="16" height="16" type="image/'.$array[$favicon_info[2]].'">'.$url.get_opensearch_favicon($favicon).'</Image>';
  echo 
'      <Url type="text/html" method="get" template="'.$url.'search.php?search_keywords={searchTerms}"/>';
  if (isset(
$url_suggestions) && $url_suggestions)
  {
  echo 
'      <Url type="application/x-suggestions+json" template="'.$url_suggestions.'{searchTerms}"/>';
  }
  echo 
' </OpenSearchDescription>';


@ => Easy-Coding

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Opensearch v0.1
« Reply #57 on: November 17, 2010, 12:18:06 AM »
Hi,

mal abgesehen von der inoffiziellen Version mit gleichem Ergebnis ist mir gerade aufgefallen
das die Suche garnicht funzt... Hatte die noch nicht benutzt:

Er versucht diesen Link zu erreichen der garnicht existiert:

Code: [Select]
.../opensearch/search.php?search_keywords=blub
Welcher Pfad stimmt denn da nicht?

Scheint ja diese Zeile zu sein:

Code: [Select]
echo '      <Url type="text/html" method="get" template="'.$url.'search.php?search_keywords={searchTerms}"/>';
wieso packt der da bei mir scheinbar noch den ordner opensearch dazwischen?...
steckt in $url der pfad in dem die opensearch liegt?


EDIT:

Ich hab die Zeile mal wie folgt editiert:

Code: [Select]
echo '      <Url type="text/html" method="get" template="search.php?search_keywords={searchTerms}"/>';
Das klappt aber leider nicht, wenn ich dann versuche die Suchmaschine neu hinzuzufügen kommts zu dem
netten Fehler den ein User vorher schonmal beschrieben hat die xml Geschichte...

Wenn man es ohne die Suchmaschine neu hinzufügen versucht kommt es zum von mir beschriebenen Fehler, ich nehme an
der Browser speichert lokal die Adresse die er kontaktieren muss und die wird ja nur aktualisiert wenn ich die Suchmaschine
neu hinzufügen kann was ja nicht geht... :D

Weißt du wo die Settings für die Suchmaschinen lokal hinterlegt sind (IE oder FF)?

Und noch was :)

Wenn man auf das Such Plugin klickt wird bei mir ein horizontaler Scrollbalken im Browser erzeugt, es ist minimal
(vielleicht 5-10px) in der breite zuviel so das scroller erzeugt wird, das fällt nur auf wenn die Suchmaschine schon
installiert ist weil dann die Meldung erscheint, solange dann die Grafik oben rechts noch focus hat bleibt der
horizontale scrollbalken erhalten bis der focus verloren geht...

Das ist aber nur im FF so hier mal ein Bild:




Gruß Jens



« Last Edit: November 17, 2010, 01:13:43 AM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Opensearch v0.1
« Reply #58 on: November 17, 2010, 04:42:19 AM »
Try this (note, there is a little bug fixed with incorrect path to search.php ;))
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Opensearch v0.1
« Reply #59 on: November 17, 2010, 07:35:19 AM »
Try this (note, there is a little bug fixed with incorrect path to search.php ;))



Thank you V@no


Greetz X23


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--