[Slackbuilds-users] Firefox Search Plugin
dev
dev.akhawe at gmail.com
Mon Apr 28 17:07:38 UTC 2008
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/
>
More information about the Slackbuilds-users
mailing list