[Slackbuilds-users] Firefox Search Plugin

Vincent Batts vbatts at batts.mine.nu
Mon Apr 28 17:55:37 UTC 2008


sorry, my first reply to you didn't get sent properly,
<paste>
On Mon, Apr 28, 2008 at 06:57:26AM +0530, dev wrote:
>
> <Url type="text/html" method="GET"
> template="http://slackbuilds.org/result/?search={searchTerms}&sv=12.0"/>
i thought about that, but having multiple search plugins just for the
multiple versions of slack, would become redundant.
if the search result could possibly determine if search string contains
a valid version number.
because currently, if you search for 'rt2500', it returns for slack 11
and 12, but if you search for 'rt2500 12', it returns nothing.
>
> Regards
> Dev

vb
</paste>

basically i would recommend that be handled on the site, not by the
search plugin.

vb

On Mon, Apr 28, 2008 at 12:07 PM, dev <dev.akhawe at gmail.com> wrote:
> Hi
>
>  I wouldn't do that. Why use php unnecessarily?
>
>  Just create 2-3 files for different versions and based upon the
>  version show them to the user using javascript (which should be pretty
>  trivial).
>
>
>  Regards
>  Devdatta
>
>
>
>  On 28/04/2008, Alex <alex.j.elliott at virgin.net> wrote:
>  > Vincent Batts wrote:
>  >
>  > > perhaps like
>  > >
>  > > <?php
>  > >  $searchStrng = $_GET["search"];
>  > >
>  > >  if( strchr($searchStrng, "12.1) )
>  > >  {
>  > >  $sv = "12.1"
>  > >  }
>  > >  elif( strchr($searchStrng, "12.0) )
>  > >  {
>  > >  $sv = "12.0"
>  > >  }
>  > >  elif( strchr($searchStrng, "11.0) ){
>  > >  $sv = "11.0"
>  > >  }
>  > >  else
>  > >  {
>  > >  $sv = ""
>  > >  }
>  > > ?>
>  > >
>  > > just brainstorming
>  > >
>  > > vb
>  > >
>  > > On Sun, Apr 27, 2008 at 8:27 PM, dev <dev.akhawe at gmail.com> wrote:
>  > >
>  > >
>  > > > Hi,
>  > > >
>  > > > Via a trivial change to the JS , you could ask the user to give his
>  > > > slackware version and give the XML file as
>  > > >
>  > > > <Url type="text/html" method="GET"
>  > > >
>  > template="http://slackbuilds.org/result/?search={searchTerms}&sv=12.0"/>
>  > > >
>  > > > etc etc.
>  > > >
>  > > >
>  > > > Regards
>  > > > Dev
>  > > >
>  > > >
>  > > >
>  > > > _______________________________________________
>  > > > Slackbuilds-users mailing list
>  > > > Slackbuilds-users at slackbuilds.org
>  > > >
>  > http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>  > > >
>  > > > Please read the FAQ - http://slackbuilds.org/faq/
>  > > >
>  > > >
>  > > >
>  > > _______________________________________________
>  > > Slackbuilds-users mailing list
>  > > Slackbuilds-users at slackbuilds.org
>  > >
>  > http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>  > >
>  > > Please read the FAQ - http://slackbuilds.org/faq/
>  > >
>  > >
>  > >
>  >  Well, what I would do in this situation, make it PHP and use mod_rewrite to
>  > forward "slackbuild-search.xml" to "slackbuild-search.php" and
>  > "slackbuild-search-([0-9\.]+).xml" to
>  > "slackbuild-search.php?version=$1", then when it comes to
>  > it do:
>  >
>  >  <?php
>  >   $versions = array('12.1','12.0','11.0');
>  >   $version = '';
>  >   if(in_array($_GET['version'],$versions))
>  >      $version = $_GET['version'];
>  >   echo '<Url type="text/html" method="GET"
>  > template="http://slackbuilds.org/result/?search={searchTerms}&sv=',$version,'"
>  > />';
>  >  ?>
>  >
>  >  Or similar, I just like the fact that it's quite compact, and altering the
>  > list of versions is quite easy.
>  >
>  >  _______________________________________________
>  >  Slackbuilds-users mailing list
>  >  Slackbuilds-users at slackbuilds.org
>  > http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>  >
>  >  Please read the FAQ - http://slackbuilds.org/faq/
>  >
>  _______________________________________________
>  Slackbuilds-users mailing list
>  Slackbuilds-users at slackbuilds.org
>  http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>
>  Please read the FAQ - http://slackbuilds.org/faq/
>


More information about the Slackbuilds-users mailing list