-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JHtml and JDocument script/stylesheet/image improvements #24
base: staging
Are you sure you want to change the base?
Conversation
@mbabker how about now. What do you think? I tested this PR in the patchtester and all seems fine (php 7). Note: i did this only on my repo. will not push to joomla repo until is fine. |
libraries/cms/html/html.php
Outdated
* | ||
* @return array files to be included. | ||
* | ||
* @see JBrowser | ||
* @since 1.6 | ||
* | ||
* @deprecated 4.0 Usage of MD5SUM files is deprecated, use version instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method isn't deprecated, don't add a tag here.
libraries/cms/html/html.php
Outdated
* | ||
* @return mixed nothing if $options[path_only] is false, null, path or array of path if specific css browser files were detected. | ||
* | ||
* @since 3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave the since tag alone, this indicates the first version the method was available in the API, not the version it was last changed.
ok i'm making all the changes you said. Thanks a lot. I would like more if the methods were called like (example): JHtml::_('script', 'system/somejs.js', array('version' => null);
JHtml::_('stylesheet', 'system/somestyle.css', array('version' => null);
JHtml::_('image', 'system/someimage.png', array('version' => null); In other words the Also do you think a similar signature revision should be made for the four |
For stylesheet it'd only work if there were unique (required) keys in both the attribs and new signature's arrays. Since file's the only requirement if you leave that as a separate parameter it's hard to find something to go from. I'd leave JDocument alone for the moment and just deal with JHtml. |
so i can conclude that in your opinion, the only way is to leave as i made in this PR. the other opinion is having different signature for style which i don't want to, because it would be confusing. |
ok, found a way JHtml::_('script', 'system/somejs.js', array('version' => 'auto');
JHtml::_('stylesheet', 'system/somestyle.css', array('version' => 'auto');
JHtml::_('image', 'system/someimage.png', array('version' => 'auto'); |
Correct my syntax error from before
* alpha order com_content * Correcting alpha order (#24)
* codestyle * code style * codestyle * codestyle * codestyle * thanks @wojsmol * corrections - thanks @Quy * corrections - thanks @Quy * oops * make @Quy happy * Update article.xml * Remove space * Update config.xml (#14) * Update filter.xml (#15) * Update config.xml (#16) * Update profile.xml (#17) * Update application.xml (#18) * Update article.xml (#19) * Update filter_articles.xml (#20) * Update config.xml (#24) * Update config.xml (#23) * Update filter_fields.xml (#22) * Update filter_featured.xml (#21) * Update override.xml (#25) * Update config.xml * Update config.xml (#26) * Update itemadmin_alias.xml (#30) * Update itemadmin.xml (#29) * Update item.xml (#27) * Update item_alias.xml (#28) * Update itemadmin_url.xml (#31) * Update module.xml (#32) * Update plugin.xml (#33) * Update config.xml (#34) * Update link.xml (#35) * Update config.xml (#36) * Update style.xml (#38) * Update config.xml (#37) * Update note.xml (#42) * Update group.xml (#41) * Update filter_debuggroup.xml (#40) * Update config.xml (#39) * corrections for @andrepereiradasilva * gotya
Summary of Changes
This PR does some changes to JHtml image, stylesheet and script methods:
inline = true
After this PR you can also scripts like this (the same is valid for stylesheet and image methods):
Scripts
Styles
Images