• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Reminder for developers of modules or other api
PostPosted: Wed May 24, 2017 12:41 am 
Offline
New Member
New Member

Joined: Fri Sep 11, 2015 9:26 pm
Posts: 2
In your development code :

The references to directories should never be made literally,
But always by using a variable or a constant, especially when they already exist.

Example of error which I find in some modules : (microtiny, tinymce...)

$output.='<__script__ or link src=$config->smart_root_url().'/tmp/cache/'.....etc

/tmp/cache was defined in the config.php file as a variable, it may therefore vary !

instead of : $config->smart_root_url().'/tmp/cache/'

use simply : $config['public_cache_url'] (Or the appropriate variable)

Moreover, keep in mind the difference between

$config['public_cache_url'] (public access chmod 705)

$config['tmp_cache_location'] or $config['tmp_templates_c_location'] (internal processing no public access chmod 700)

otherwise, variables defined in the config file are useless !

Lastly, If your directory should not be customizable, like the directory "Lib", use a constant.

Thank you all,


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting