Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis 5.5 Calypso supports 2 factor authentication login with e-mail or SMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Extensions
»
Modules
»
folder path
« previous
next »
Print
Pages: [
1
]
Author
Topic: folder path (Read 4820 times)
1050
Newbie
Posts: 33
folder path
«
on:
June 27, 2012, 15:42:12 »
Hi,
I want to write an ajax module, and I want to include ajax_new.js in my php file, it's on
/administrator/include/js/ajax_new.js
how should I wirte the path?
I find this it in one of your ajax topic :
<script type="text/javascript" src="includes/js/ajax_new.js"></script>
but it didn't work for me
thank you
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: folder path
«
Reply #1 on:
June 27, 2012, 20:18:35 »
<?php echo $mainframe->getCfg('live_site'); ?>/administrator/....
or
<?php echo $mosConfig_live_site; ?>/administrator/....
Tip
: you can alternative write your own ajax script without using the
ajax sack
library which works fine, but it is an old script.
Note for Elxis 4.0 Nautilus
The "live site URL" is now provided by the "URL" configuration option:
$live_site = eFactory::getElxis()->getConfig('URL');
But for scripts/stylesheets/images inclusion we strongly suggest to use the secureBase method which automatically switches to https on SSL/TLS protected pages:
$live_site = eFactory::getElxis()->secureBase();
And the link to site's frontpage:
$frontpage_link = eFactory::getElxis()->makeURL();
or
$frontpage_link = eFactory::getURI()->makeURL();
«
Last Edit: June 27, 2012, 20:31:53 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Extensions
»
Modules
»
folder path