Members   Search      Help    Register    Login    Home
Home » Support Forums for PMBT 1.X » Feature Request » OpenSearch
OpenSearch [message #1213] Wed, 11 July 2007 16:31 Go to next message
djechelon is currently offline djechelon  Italy
Messages: 207
Registered: June 2006
Location: Ercolano, NA
Releaser
Administrator

Hey guys, I found an interesting feature of IE7 and FF2: OpenSearch!
Just by adding one single HTML tag (and an appropriate script), the user is able to search for Torrents from the browser's search box.

Simply add the following code to the header (this one is Wikipedia's)
<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (English)" />

and prepare a script that does the search.

An interesting idea (I don't know the details about OpenSearch) is to set the href value to search.php and inside the, search.php, add a line that recognizes OpenSearch's argument and does the search. Of course the title can be set to the website URL.

Another interesting idea is to make the feature optional (enabled in Admin).

What do you think about it?


Unfortunately, no one can be told what the Matrix is. You have to see it for yourself.
Re: OpenSearch [message #1816 is a reply to message #1213] Thu, 21 February 2008 07:10 Go to previous message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
O.K. i just got around to this one and here is the coding for it
open header.php and find
themeheader();

echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>\n";
and add after
echo '<link rel="search" type="application/opensearchdescription+xml" title="' . $sitename . '" href="'.$siteurl.'/opensearch.php" />';
now creat a new file in your tracker root called opensearhc.php and add this to it
<?php
require_once("include/config_lite.php");
require_once(
"include/functions.php");

echo
'<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>'
.$sitename.'</ShortName>
    <Description>movies games</Description>
    <Url type="text/html" template="'
.$siteurl.'/search.php?search={searchTerms}" />
    <Tags>movies,games,music</Tags>
    <LongName>'
.$sitename.'</LongName>
    <Image height="16" width="16" type="image/vnd.microsoft.icon">'
.$$siteurl.'/themes/vista/favicon.JPG</Image>
    <Developer>joeroberts</Developer>
    <Attribution>Copyright © 2006 phpMyBitTorrent! Inc. All rights reserved.</Attribution>
</OpenSearchDescription>'
;
?>

and thats it you can go to your web site and add a search to IE and firefox in the main search bar stell working on opera


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Fri, 22 February 2008 12:12]

Report message to a moderator

Previous Topic:peerguardian
Next Topic:Security Code off
Goto Forum:
  


Current Time: Wed Feb 08 06:00:56 GMT 2012

Total time taken to generate the page: 0.00690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software