[Gmod-help] Re: [Gmod-gbrowse] PhP in the conf file?
Lincoln Stein
lincoln.stein at gmail.com
Wed Oct 1 10:06:07 EDT 2008
Hi Taner,
I think it might be easier for you to create a .php file that creates the
header and footer that you want and that then incorporates the gbrowse stuff
into an <iframe> or an <embed> that is generated by the PHP.
Here is my guess about how to do a PHP hello world from a gbrowse callback:
[GENERAL]
...
init_code = require PHP::Interpreter;
[my_sub]
...
balloon hover = sub {
my $feature = shift;
my $p = PHP::Interpreter->new();
return $p->eval('echo "hello world"');
}
Lincoln
On Wed, Oct 1, 2008 at 9:42 AM, Taner Z. Sen <taner at iastate.edu> wrote:
> Hi Lincoln, Jeremy, and Dave,
>
> Ok. We cheated a little without using PHP::Interpreter to at least
> incorporate a header that we use in MaizeGDB:
>
> header = <iframe width="100%" frameborder="0" height="90" src="
> http://someaddress.edu/header.php"> </iframe
>
> TUTORIAL?
> It turns out I don't even know how to create a "Hello World!" perl code
> inside sub { .. } Is there a tutorial for dummies that shows how to do this?
> I think this will be the first step for me before using PhP::Interpreter.
>
> But for the time being we will be using Javascript for our other needs
> (like creating a feedback button that includes the information where we are
> in the genome along with the user comments)
>
> Thanks,
> Taner
>
>
> At 11:04 AM 9/30/2008, Lincoln Stein wrote:
>
> Hi Taner,
>
> I don't have any experience with PHP::Interpreter myself, but I would be
> very interested in how well this works. It might actually be easier to embed
> GBrowse as an <embed> in a .php file.
>
> Lincoln
>
> On Mon, Sep 29, 2008 at 10:12 AM, Taner Z. Sen <taner at iastate.edu> wrote:
> Thanks Dave. That'll do.
>
> Given your great enthusiasm for PhP, we will give a shot to rewrite our
> code in perl as you suggested.
>
> Taner
>
>
> At 05:28 PM 9/26/2008, Dave Clements, GMOD Help Desk wrote:
>
> Hi Taner,
>
> The thought of running PHP inside Perl gives me the cold pricklies.
> However, that doesn't mean it can't be done.
>
> You could try something like PHP::Interpreter:
>
>
> http://search.cpan.org/~gschloss/PHP-Interpreter-1.0.1/lib/PHP/Interpreter.pm<http://search.cpan.org/%7Egschloss/PHP-Interpreter-1.0.1/lib/PHP/Interpreter.pm>
> http://www.linuxjournal.com/article/9282
>
> However, I don't think we would enthusiastically support doing this.
> If at all possible I would think about rewriting the code in Perl.
>
> Thanks,
> Dave C.
> GMOD Help Desk
>
>
> On Fri, Sep 26, 2008 at 3:21 PM, Taner Z. Sen <taner at iastate.edu> wrote:
> > Hi,
> >
> > Is there a way to insert php code in the conf file? (something like
> header =
> > <?PHP ...)
> >
> > Thanks,
> > Taner
>
> Taner Z. Sen, Ph.D.
> Computational Biologist, USDA-Agricultural Research Service
> Collaborator Assistant Professor, Dept. of Genetics, Development and Cell
> Biology
> Bioinformatics and Computational Biology Program
> Iowa State University
> 1025 Crop Genome Informatics Lab
> Ames, IA 50011
> Phone: (515) 294-5326
> Fax: (515) 294-8280
> taner at iastate. <taner at iastate.edu> edu <taner at iastate.edu>
> http://www.public.iastate.edu/~taner/<http://www.public.iastate.edu/%7Etaner/>
>
>
--
Lincoln D. Stein
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Stacey Quinn <Stacey.Quinn at oicr.on.ca>
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724 USA
(516) 367-8380
Assistant: Sandra Michelsen <michelse at cshl.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20081001/e86e499f/attachment.html>
More information about the Gmod-help
mailing list