We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SOLVED: $PREFS->ini('system_folder', TRUE)

Development and Programming

Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Hey guys,

I am building a module and having a few people test it with fairly good results. However there is one thing that is cropping up every now and then.

My module uses some JS in the admin and I am including it in the head like so:

<.script type='text/javascript' charset='utf-8' src='/".$PREFS->ini('system_folder', TRUE)."modules/lg_module/scripts/jquery.ui-1.0/jquery.tablesorter.pack.js'>

The problem is that

$PREFS->ini('system_folder', TRUE)

is sometimes returning ‘system’ rather than the actual path to the system folder. What would be causing this?

Is there a reliable way to get the system folder into a url?

Cheers Leei

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ok figured this one out….

For some reason the users path.php file has the correct path to the system folder but his config.php file still had:

$conf['system_folder'] = "system";

Something to check if things are not working as expected… 😊

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
17 years ago
Ingmar Greil's avatar Ingmar Greil

Well, I was going to say, perhaps because he didn’t change the name 😊

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

That was the issue… but I would have thought (unless he copied the file) that the install would have sorted that out 😊

       
Sacha's avatar
Sacha
33 posts
17 years ago
Sacha's avatar Sacha

I just encountered this problem with Brandon Kelly’s Playa extension. Maybe the wording during the install should be changed to “full path to your system folder” instead of “name of system folder” as it is now.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.