Including a Javascript File from Admin

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
jevchance
Registered User
Posts: 1
Joined: Tue Jul 22, 2008 8:59 pm

Including a Javascript File from Admin

Post by jevchance » Tue Jul 22, 2008 9:02 pm

Greetings.

I am using PHPBB 2.0.21 in a hosted environment. I do not have developer access to the application.

I would however like to include a javascript include on every page of the board. The code looks something like this:
<script src="http://www.xyz.com/xyz.js"></script>

Is there anyway to include this on every page from the administration tool?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50745
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Including a Javascript File from Admin

Post by Brf » Tue Jul 22, 2008 9:10 pm

If you cannot access your files, you are out of luck.

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Including a Javascript File from Admin

Post by ric323 » Tue Jul 22, 2008 10:44 pm

What do you mean a "hosted environment"? Are you on a "free forum host", meaning you did not install phpBB yourself?
If so, then as brf said, you cannot make any changes.
If this was a "one-click install", but you can see your board files via FTP, then you can make changes.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
Lumpy Burgertushie
Registered User
Posts: 63196
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Including a Javascript File from Admin

Post by Lumpy Burgertushie » Tue Jul 22, 2008 11:49 pm

and if you do have the access, simply add your javascript to the <head> section of the overall_header.tpl file for whatever style you are using.

that will make the script run on every page.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.
Premium phpBB 3.2 Styles by PlanetStyles.net

New phpbb 3.0 support site

compt 134
Registered User
Posts: 10
Joined: Thu Jul 24, 2008 6:52 am

Re: Including a Javascript File from Admin

Post by compt 134 » Thu Jul 24, 2008 10:07 am

jevchance wrote:Greetings.

I am using PHPBB 2.0.21 in a hosted environment. I do not have developer access to the application.

I would however like to include a javascript include on every page of the board. The code looks something like this:
<script src="http://www.xyz.com/xyz.js"></script>

Is there anyway to include this on every page from the administration tool?
Is it really possible? I mean is it safe to do have access like that?

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Including a Javascript File from Admin

Post by ric323 » Thu Jul 24, 2008 10:18 am

compt 134 wrote:
jevchance wrote:Greetings.

I am using PHPBB 2.0.21 in a hosted environment. I do not have developer access to the application.

I would however like to include a javascript include on every page of the board. The code looks something like this:
<script src="http://www.xyz.com/xyz.js"></script>

Is there anyway to include this on every page from the administration tool?
Is it really possible? I mean is it safe to do have access like that?
What do you mean? It is NORMAL for the forum adminstrator to have full FTP access to all the phpBB files.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

Locked

Return to “2.0.x Support Forum”

Who is online

Users browsing this forum: No registered users and 16 guests

cron