Welcome to Geeklog, Anonymous Monday, November 09 2026 @ 06:48 pm EST
Geeklog Forums
Setting a JavaScript File
Ramos
Anonymous
How I can use a javascript file?
I try in lib-custom file
But this don't work.
Thanks
I try in lib-custom file
Text Formatted Code
$_SCRIPTS->setJavaScriptFile('theme.mitheme', '/javascript/myfile.js' );But this don't work.
Thanks
34
36
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1484
Location:Canada
If it is a javascript file for your theme you can set it in the functions.php which is found in the root of the theme directory.
Look at the modern curve theme that comes with Geeklog 2.1.0 and check out the function theme_js_files_modern_curve
One of the Geeklog Core Developers.
Look at the modern curve theme that comes with Geeklog 2.1.0 and check out the function theme_js_files_modern_curve
One of the Geeklog Core Developers.
32
25
Quote
Status: offline
::Ben
Site Admin
Admin
Registered: 01/14/05
Posts: 1594
Can you also try?
like this
Ben
Text Formatted Code
$_SCRIPTS->setJavaScriptFile('theme.mitheme', '/path_from_public_html_to/myfile.js' );like this
Text Formatted Code
$_SCRIPTS->setJavaScriptFile('theme.mitheme', '/layout/mitheme/javascript/myfile.js' );Ben
31
31
Quote
Ramos
Anonymous
I fixed it, thanks.
{
global $_CONF;
return array(
array(
'file' => '/layout/' . $_CONF['theme'] . '/javascript/jquery.flexslider-min.js',
'footer' => false, // Not requred, default = true
'priority' => 100 // Not requred, default = 100
),
);
}
Text Formatted Code
function theme_js_files_c3(){
global $_CONF;
return array(
array(
'file' => '/layout/' . $_CONF['theme'] . '/javascript/jquery.flexslider-min.js',
'footer' => false, // Not requred, default = true
'priority' => 100 // Not requred, default = 100
),
);
}
30
39
Quote
All times are EST. The time is now 06:48 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content