Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=93)
-   -   Open Seach (http://www.bvlist.com/showthread.php?t=1311)

joeroberts 1st November 2008 23:31

Open Seach
 
1 Attachment(s)
here is a real easy mod
open themes/**all**/main.php
and add between
Code:


Code:

echo '';
now creat a new file called opensearch.php and add this to it

PHP Code:

<?php
require_once("include/config.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/'.$theme.'/favicon.JPG</Image>
    <Developer>joeroberts</Developer>
    
</OpenSearchDescription>'
;
?>

save this to your root dir and thats it
this works in FF
and IE
now to make it work
for firefox
just go to browser search in the area to select search from click the down arrow and select add ((your site name))

and now just enter a search word or frace click the magnifying glass and presto it search's your site
for IE
click the down arrow beside the magnifying glass and the add search profider then your site name
Attachment 817
and thats it

Krypto 2nd November 2008 00:04

Thanks Joe.

Though I've not managed to get this simple hack working:shock:

Have placed the this in my theme at this location

Code:

echo "\n";
echo "\n";
echo "\n";
echo "";
echo "".$sitename."\n";
echo '';

In FF 2.0.0.17 I click on the search part and then ADD my site, but the site never gets added, it just says ADD all the time?

Could it be because I have the source running in a sub-dir?

joeroberts 2nd November 2008 00:07

no because it works here
phpMyBitTorrentV2.0 Beta4
where dd you put opensearch.php?

at what location did you add opensearch.php?
should be in same location as index.php

Krypto 2nd November 2008 00:15

I put in in the root dir, same location as index.php

joeroberts 2nd November 2008 00:21

is there a way I can see a copy of your source code?
you can pm it to me

Krypto 2nd November 2008 00:42

Quote:

Originally Posted by joeroberts (Post 6140)
no because it works here
phpMyBitTorrentV2.0 Beta4
where dd you put opensearch.php?

Just tried on the demo site and it does the same!

And with IE I get:-

IE could not install this search provider
There was a problem with the search providers info

joeroberts 2nd November 2008 00:58

fixed please try new openseach.php listed in first post

Krypto 2nd November 2008 01:02

Excellent, works great now:hi:

Just querying is this part right with the double $ in opensearch.php?

$$siteurl

joeroberts 2nd November 2008 01:04

no sorry I just noticed that I fixed it first post


All times are GMT +2. The time now is 19:54.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.