Quantcast

How to include javascript file into the header?

classic Classic list List threaded Threaded
12 messages Options
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How to include javascript file into the header?

Hi,

Anyone knows how to add js file into the header in general not in particular application. An if you have some code snippet, don't hesitate to post.
Please be advise.


Thanks,

Gil Poligrates
Ralf Becker-2 Ralf Becker-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

http://svn.stylite.de/egwdoc/nav.html?phpgwapi/inc/class.egw_framework.inc.php.html#validate_file

$GLOBALS['egw']->framework->validate_file('/someapp/js/somejs.js');

Ralf

Am 30.09.11 23:41, schrieb Gil T. Poligrates:

> Hi,
>
> Anyone knows how to add js file into the header in general not in particular
> application. An if you have some code snippet, don't hesitate to post.
> Please be advise.
>
>
> Thanks,
>
> Gil Poligrates
>
> --
> View this message in context: http://egroupware.219119.n3.nabble.com/How-to-include-javascript-file-into-the-header-tp3383747p3383747.html
> Sent from the egroupware-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> eGroupWare-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/egroupware-developers


--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

Commerzbank BLZ 55040022 | Account 218111300
IBAN DE33 5504 0022 0218 1113 00 | BIC COBADEFFXXX
VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Hi Ralf,

This is the code i get from egw_framework:
        // try to add app specific js file
        self::validate_file('.', 'app', $app);

How to get include a script from that code?
Please advise.


Thanks,

Gil Poligrates
Ralf Becker-2 Ralf Becker-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Am 03.10.11 15:16, schrieb Gil T. Poligrates:
> Hi Ralf,
>
> This is the code i get from egw_framework:
> // try to add app specific js file
> self::validate_file('.', 'app', $app);

That automatically includes a script you name js/app.js in your
application folder.

For other names, you either have to use a path relative to the
egroupware root:

        egw_framework::validate_file('/myapp/js/somejs.js')

or

        egw_framework::validate_file('.','some','myapp')

Ralf

>
> How to get include a script from that code?
> Please advise.
>
>
> Thanks,
>
> Gil Poligrates
>
>
> --
> View this message in context: http://egroupware.219119.n3.nabble.com/How-to-include-javascript-file-into-the-header-tp3383747p3389727.html
> Sent from the egroupware-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> eGroupWare-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/egroupware-developers


--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

Commerzbank BLZ 55040022 | Account 218111300
IBAN DE33 5504 0022 0218 1113 00 | BIC COBADEFFXXX
VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Hi Ralf,

I got it. Thanks for help.


Best regards,

Gil Poligrates
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Hi Ralf,

How about including CSS file from other app?
Please advise.


Thanks,

Gil Poligrates
Ralf Becker-2 Ralf Becker-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Am 04.10.11 18:38, schrieb Gil T. Poligrates:
> Hi Ralf,
>
> How about including CSS file from other app?

http://svn.stylite.de/egwdoc/nav.html?phpgwapi/inc/class.egw_framework.inc.php.html#includeCSS

Ralf
--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

Commerzbank BLZ 55040022 | Account 218111300
IBAN DE33 5504 0022 0218 1113 00 | BIC COBADEFFXXX
VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Hi,

Last time I query about relative path of js, this is the reply from Ralf:
====================================================
For other names, you either have to use a path relative to the
egroupware root:

        egw_framework::validate_file('/myapp/js/somejs.js')

or

        egw_framework::validate_file('.','some','myapp')
====================================================

How about for css?
Please advise.


Thanks,

Gil
Ralf Becker-2 Ralf Becker-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

I already send you the answer in the mail you are replying too:

http://svn.stylite.de/egwdoc/nav.html?phpgwapi/inc/class.egw_framework.inc.php.html#includeCSS

Please be more specific if you don't understand the answer.

Ralf

Am 07.10.11 22:45, schrieb Gil T. Poligrates:

> Hi,
>
> Last time I query about relative path of js, this is the reply from Ralf:
> ====================================================
> For other names, you either have to use a path relative to the
> egroupware root:
>
>          egw_framework::validate_file('/myapp/js/somejs.js')
>
> or
>
>          egw_framework::validate_file('.','some','myapp')
> ====================================================
>
> How about for css?
> Please advise.
>
>
> Thanks,
>
> Gil
>
> --
> View this message in context: http://egroupware.219119.n3.nabble.com/How-to-include-javascript-file-into-the-header-tp3383747p3404045.html
> Sent from the egroupware-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> eGroupWare-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/egroupware-developers


--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

Commerzbank BLZ 55040022 | Account 218111300
IBAN DE33 5504 0022 0218 1113 00 | BIC COBADEFFXXX
VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Hi,

I tried this two codes but no luck:

egw_framework::includeCSS('/myapp/js/somecss.css')
================================================
egw_framework::includeCSS('myapp','somecss')


Please advise.
Thanks.


Best regards,
Gil Poligrates
Ralf Becker-2 Ralf Becker-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Am 09.10.11 05:56, schrieb Gil T. Poligrates:
> Hi,
>
> I tried this two codes but no luck:
>
> egw_framework::includeCSS('/myapp/js/somecss.css')

This is a very unusual path for css files in EGroupware, but it should
work, given the file exists, is readable by the webserver and the call
es before the header get rendered.

> ================================================
> egw_framework::includeCSS('myapp','somecss')

This refers to the path /myapp/templates/default/css/somecss.css, as
described in the documentation (do you read that?).

All pathes are *relative* to the EGroupware server root (directory of
EGroupware installation, eg. /var/www/html/egroupware).

Ralf
--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

Commerzbank BLZ 55040022 | Account 218111300
IBAN DE33 5504 0022 0218 1113 00 | BIC COBADEFFXXX
VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ki Setargilop Ki Setargilop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to include javascript file into the header?

Still no luck.

string $name=null name of css file in $app/templates/{default|$this->template}/$name.css

Is there a need for css folder insiude default folder?

Please advise further.


Thanks,
Gil Poligrates
Loading...