Last edited by Jobra on Fri Dec 28, am, edited 1 time in total.
This is one of a series of API Guides, which aim to help you understand how to use the Joomla APIs through providing detailed explanations and sample code which you can easily install and run.
Joomla allows you to add JavaScript and CSS files to your HTML document, and it puts the associated <script> and <link> elements within the HTML <head> section. To do this you call the addScript and addStyleSheet methods of the Joomla object which represents the HTML document. Since Joomla! buffers all the HTML-related data that makes up a page before output, it is possible to call these methods anywhere within your code.
First, get a reference to the current document object:
Then for a style sheet, use this code:
To add a JavaScript file, use this code:
where $url is the variable containing the full path to the JavaScript or CSS file. For example: JUri::base() . 'templates/custom/js/eunic-brussels.eu'
Note this will not include Mootools or jQuery. If your script requires Mootools or jQuery see JavaScript Frameworks for full details on how to include them. (Note that jQuery can only be included natively on Joomla! +.) It used to be possible to do this with JHTML, however, this was deprecated in Joomla and removed in Joomla 3.x.
You can add $options and $attributes parameters to the above methods. The $options control overall how the <script> and <link> elements are output while the $attributes get set as HTML attributes within those tags. (Note that although there are Deprecated markers against the addScript and addStyleSheet methods of the Joomla Document API, these markers refer just to the signature of these methods; the form of the signature using $options and $attributes parameters is not deprecated). The $options parameter should be an array and 2 different options are currently supported:
For example
The string of characters after the ? is the md5 hash, which will change when extensions or Joomla itself are installed/upgraded/uninstalled.
For example
The $attributes parameter should also be an array, and these are mapped to be HTML attributes of the <script> or <link> element. For example,
Joomla!
Only available in Joomla! and higher
(Note that these Options are different from the $options parameter described above).
Beside adding inline scripts, Joomla! provides a mechanism to store the options in the "optionsStorage". This allows you to nicely manage existing options on the server side and on the client side. It also allows you to place all JavaScript logic into the JavaScript file, which will be cached by browser.
Joomla! uses a special mechanism for "lazy loading" the options on the client side. It doesn't use inline JavaScript, which is good for page rendering speed, and makes your site more friendly to the Speed Testers (e.g. Google).
The use of "optionsStorage" is preferred over inline JavaScript for adding the script options.
Example of Use
Add the script options to your module:
Access your options on the client side:
Override the options on server side. (Possible until the head rendering.):
There are cases when you may want to output an error message in your JavaScript code and want to use the Joomla mechanism of language strings. You could manage this by using addScriptOptions to pass down each language string you need, but Joomla provides a more succinct solution. To pass a language string to JavaScript do in your PHP code, for example,
JText::script('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'); Then in your JavaScript code you can do:
var message = eunic-brussels.eu_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'); to obtain in the user's language the text message associated with the language constant. Obviously certain language strings have embedded %s characters, so in your JavaScript code you will have to handle that, eg using an external JavaScript sprintf library or string replace, etc.
If your JavaScript or CSS are generated using PHP, you can add the script or style sheet directly into the head of your document:
For example, the following code is used to define a custom tool tip that takes advantage of Mootools.
Note that in order for this JavaScript to be useful, it is necessary to include the appropriate class name in the HTML, as well as providing the eunic-brussels.eu file. Both are outside the scope of this article.
This is also useful if you are inserting a form field of CSS into your code. For example, in a module you might want a user to choose the colour of the border. Call the form field's value and assign it a variable $bordercolor in mod_eunic-brussels.eu Then in tmpl/eunic-brussels.eu you can include the following:
Here mod_eunic-brussels.eu contains the CSS file of any non-parameter based styles. Then the bordercolor parameter/form field is added in separately.
There will be some occasions where even these functions are not flexible enough, as they are limited to writing the contents of <script /> or <style /> tags, and cannot add anything outside those tags. One example would be the inclusion of a style sheet link within conditional comments, so that it is picked up only by Internet Explorer 6 and earlier. To do this, use $document->addCustomTag:
If it was necessary to include other conditional CSS, always include the addCustomTag method after it is declared.
Below is the code for a simple Joomla module which you can install and run to demonstrate adding CSS and JavaScript, and can adapt to experiment with the concepts above. If you are unsure about development and installing a Joomla module then following the tutorial at Creating a simple module will help. In a folder mod_css_js_demo create the following 4 files:
mod_css_js_eunic-brussels.eu
mod_css_js_eunic-brussels.eu
eunic-brussels.eu
eunic-brussels.eu
Zip up the mod_css_js_demo directory to create mod_css_js_eunic-brussels.eu. Within your Joomla Administrator go to Install Extensions and via the Upload Package File tab, select this zip file to install this sample mod_css_js_demo module. Make this module visible by editing it (click on it within the Modules page) then:
When you visit the web page, you should see the module in your selected position. It should display:
Using your browser's development tools you can also view the <script> and <link> elements within the HTML and see the JavaScript output on the console.
To have a well-formed XHTML document, you must put all references to Javascript and CSS files within the portion. Since Joomla! generates all the HTML that makes up a page before output, it is possible to add these references within the <head> tags from your extension. The simplest way to do this is to make use of the functionality built in to Joomla!. In Joomla you can still use the following, but it's marked as deprecated and changed in 3.x:
With the changed API in 3.x, the second parameter cannot be a string. If you really need to use these methods and wish to have compatibility with Joomla 3.x, you must include the absolute link to your files:
Using these functions, Joomla! will take care of any additional requirements. For example, if your Javascript requires Mootools, setting will automatically ensure that Mootools is loaded, if it has not already been done.
However, the above functions will not be flexible enough for every scenario, and so it is possible to tap into the underlying functionality instead. Of course, you will also need to manually code some of the steps that would be done automatically using the functions above.
First, get a reference to the current document object:
For a stylesheet, use this code:
To add a Javascript file, use this code:
Note this will **NOT** include Mootools or jQuery. If your script requires Mootools or jQuery see Javascript_Frameworks for full details on how to include them (note jQuery can only be included natively on Joomla +).
If your Javascript or CSS are generated using PHP, you can add the script or stylesheet directly into the head of your document:
For example, the following code is used to define a custom tool tip that takes advantage of mootools.
Note that in order for this Javascript to be functionally useful, it would be necessary to include the appropriate class name in the HTML, as well as providing the file. Both are outside the scope of this article.
This is also useful if your inserting a parameter/form field of CSS into your code. For example in a module, you might want a user to choose to call the colour of the border. After calling the parameter/form field and assigning it a variable $bordercolor in mod_eunic-brussels.eu Then in tmpl/eunic-brussels.eu you can include the following
Here mod_eunic-brussels.eu contains the CSS file of any non-parameter based styles. Then the bordercolor parameter/form field is added in separately
There will be some occasions where even these functions are not flexible enough, as they are limited to writing the contents of or tags, and cannot add anything outside those tags. One example would be the inclusion of a stylesheet link within conditional comments, so that it is picked up only by Internet Explorer 6 and earlier. To do this, use :
Each slide can include a title, description and can be linked to any Joomla article, menu item, or other URL or even do not linked (the magnificent popup appears ).
The Joomla slideshow extension also allows setting a start/end publishing date. Created slides can be organized in an unlimited number of slideshow categories and each category can have an unlimited number of slides.
As we mentioned above, its a fully responsive, mobile, and touch-ready Joomla slideshow.
The slideshow adapts to all screen sizes! It also offers a swipe navigation handling for touch screens.
What about slider effects and slider customization options? DJ-Image-Slider brings HTML5/CSS3 transitions 9+ slide effects . Users can set a custom slide transition time, choose bulletsnumber as slider indicators, and load custom slider buttons (prev/next/ and play/pause).
The Joomla slideshow comes with a huge number of useful slider features. Check more of them listed below:
We need to add that DJ Image Slider is an accessible slideshow component and it follows the latest Web Content Accessibility Guidelines (WCAG). It comes with compatibility with keyboard access (arrows and tab+ spacebar/enter key navigation). The accessibility is a very important issue when it comes to using the slider by people with different disabilities and older people, or those living in developing countries. Accessible slideshow is essential for many website visitors using keyboard navigation. Also, the people who are distracted by movement can pause a slideshow or if they need more time to read something, they can pause a slide, and find a while to understand the displayed content. You can enable or disable support for keyboard navigation with tab key and arrow keys!
The free slider extension offers many language translations of the slider (read below for more info)!
DJ Image Slider offers a tutorial section where users may find many articles, related to this free slideshow extension. Take a look at the list of available slider tutorials:
How to customize slide in DJ-ImageSlider
See how to create an attractive slideshow using unregular shapes, and customized colors for each element of the slide.
How to add DJ Image Slider module to the content
Discover how to publish DJ Image Slider module inside your content.
Fx-Transitions
See the list of the available slider effects along with the graph of how they work.
How to create smooth scrolling effect
See how to set the smooth scrolling for your slider.
How to link slides to external URLs
Linking slides to external URLs in DJ Image Slider is not a complicated issue.
DJ Image Slider doesnt work after update from ver. 2.x to 3.x
The slider doesnt work after the update? Follow the quick step by step guide.
How to change the spinning wheel/loader in DJ Image Slider
See how to change the slideshow spinning wheel/loader.
How to create a new slider theme?
Creating a new slider theme is very simple. Just follow a few steps.
DJ Image Slider system requirements
Check the slideshow extensions system requirements.
How to make a continuous loop?
Continuous slider loop is not available in DJ Image Slider. But you can use another slideshow extension.
How to change the background color of the description box?
Changing the background of a slideshow description box can be achieved only via CSS modifications, but this is a simple fix. See how to do it.
Custom ALT and TITLE image attributes in DJ Image Slider
Youll find two fields in slides edition under "Images attributes" section. See how to use them.
How to get the slides to fade like on demo page?
See how to get the effect of slides to fade like on the slider demo page
How to redirect images to external links properly?
When youre adding URL links to the slider make sure you are adding https:// or http:// before the address
We need to mention that the Joomla slideshow extension is a friendly slider for users from different countries because it includes available slideshow translations for such languages:
The number of available DJ Image Slider translations will be increased.
Although our slider does not have video tutorials section, there is a DJ Image Slider user Movies playlist. Weve gathered a set of slideshow videos (in English and Spanish) about the Joomla slideshow component. Watching the slider videos you can learn:
DJ-ImageSlider - slideshow ver.
- Added compatibility with PHP 8.x
- Fixed issue with the Joomla 4 Content SEF Helper
DJ-ImageSlider - slideshow ver.
- Full Joomla 4 compatibility
- Minor fixes
Version changelog:
DJ Image Slider - slideshow ver.
- added the possibility to attach subcategories to a given slider
- allow the user to set module radius
- allow the user to personalize slider colors
- Alt and caption attribute now doesnt show it is not declared (incorrect code in terms of accessibility)
- Problem with missing alt and caption attribute
- Don´t show the Next button when there is only one slide
- Rebuilding in module settings
- Font size title and description
DJ Image Slider - slideshow ver.
DJ Image Slider - slideshow ver.
DJ Image Slider - slideshow ver.
DJ Image Slider - slideshow ver.
DJ Image Slider - slideshow ver.
Postby catmetu » Fri Mar 16, am
FacebookTweetLinkedIn
With thousands of website building applications out there, creating the foundation of our first online project is literally a few clicks away. Many of the apps cover particular niches – ecommerce, community forums, social media – but you also have a wide choice of multipurpose tools.
Apart from WordPress, one other content management system (CMS) is rocking the online world and responsible for the well-being of over million websites – Joomla.
In this guide, we will take a closer look under Joomla’s hood – how it looks, how it works, and how to quickly get used to its specifics.
Joomla is undoubtedly one of the best choices for starting a new website. The application lets you turn a basic page into any kind of multifaceted project – an ecommerce shop, a public message board, or a stylish business site, just to name a few. This is thanks to the rich environment of plugins and themes, your go-to place when you want to change the look or feel of your website.
To date, there are around 6, extensions and over templates in the Joomla official repository. You can find thousands more in reputable marketplaces like Themeforest, Templatemonster, Joomlart, and Joomshaper.
Complete beginners will enjoy Joomla just as much as seasoned developers, thanks to the low learning curve and intuitive interface of the popular CMS. And if you wish to further improve your skills with the app – there are plenty of tutorials, video guides, and online communities that can always help you with a pressing question or issue.
Just last year, there was a major commotion in the Joomla society – a completely new version rolled out, promising to supercharge the experience for all users of the app. Joomla is to gradually replace all 3.x versions, with end of support scheduled around August .
But what makes the new version so superior, and why should current users consider upgrading their CMS? Here are some reasons that quickly come to mind:
When you consider all of the above, it’s not a question of whether you should move to Joomla 4.x but WHEN to make the switch.
We will now take a stroll around one of Joomla’s most integral parts – the admin dashboard. After you install the CMS, this is your go-to place for all site modifications. The more comprehensive and intuitive your dashboard is – the easier you will get the hang of it and start working your magic.
This is the first page you see when you log in your Joomla installation. The main screen consists of a few shortcuts to some of the most used functionalities, like key options, system notifications, sample data, recently added articles, and more. Additionally, you can view the most recent actions, who logs in/out, and what they do in the meantime.
The Joomla dashboard is fully customizable, so you can add/remove blocks with options to tailor your experience with the CMS.
On the left of the main screen, you will find the main menu categories.
This category contains everything regarding your pages, articles, and plugins.
You can see all your created articles, their status, author, language, and other important info. Clicking on an article will reveal its content and allow you to edit it as per your needs. You can also keep drafts that you can further modify before publishing. Once your content grows, various filters will help you find the article you need.
This is the place where you create, edit, and delete your categories. The categorization brings order to your content, allowing your Joomla site visitors to navigate easily to articles with a common theme. As with the previous menu, you can take advantage of filtering to quickly find the category you are looking for.
Joomla 4.x excels with some fantastic multimedia options. You can now organize your images and videos in neatly stacked folders, and the CMS helps you upload files with a click of the mouse button. There is an info option as well, allowing you to check the properties of each folder.
Modules work exactly like widgets – they are lightweight extensions that let you quickly add some basic functionalities to your Joomla site. Since , Joomla offers a set of 24 different modules. Each module comes with a comprehensive description and is effortless to configure.
The category that helps you manage your menu items. Regardless of your online project and goals, menus are an inseparable part of any website and one of the best ways to optimize your navigation.
With this option, you will be able to create/edit/manage your menu items, assign them to different categories, and determine the access permissions for your collaborators.
Similar to modules, components in Joomla work as ways to extend the CMS functionality, something like mini-apps within the app. You can take advantage of a number of pre-built components, as well as third-party solutions.
An essential category that you should look to configure right from the get-go. The menu is filled with wonderful options that cover key areas like site security, URL redirection, search engine optimization, and many more. You can easily password-protect your directories, modify user permissions, and even turn off your entire website in case of an emergency.
Banners are an excellent way to reach out to a broader audience and create beautiful ads that will bring targeted web traffic and potential sales. The Joomla dashboard has a separate section dedicated to your banners, where you can save your designs, categorize them, and quickly bring out a suitable visual for your next PPC or social media campaign.
We all keep various bits of information about important contacts we frequently communicate with. So why not store this information directly in our Joomla admin area? The Contacts menu allows you to input addresses, emails, phone/fax numbers, job positions, and many more. Finding the correct information about your partners and clients has never been easier.
If you want to include some of your favorite RSS feeds on your Joomla site – this is the right place for the job. Again, you can add various categories to your feeds to find them more easily. You can also include a description for each feed.
The easiest way to organize your content in Joomla (and most other CMS solutions). Create as many tags as you deem necessary and assign them to each piece of content. Site visitors can then navigate to the right articles and find relevant suggestions for similar content.
Keeping a close eye on your users and site contributors is highly valuable, especially if you are running a money-making website, like an ecommerce store. Joomla 4.x offers numerous options that can assist with the job.
Users on your website carry different roles, so grouping them by some common factor is more than logical. This creates something of a tree-like structure, which will let you easily determine user permissions later.
The default Joomla dashboard contains five access levels that determine what type of visitor views what content – Public, Guest, Registered, Special, and Super Users. Naturally, you can edit the defaults or create as many additional ones as needed.
IMPORTANT: Access levels are different from user permissions. This section only gives you access to configure the different user levels, what they can actually do can be set from the System -> User Permissions menu.
When it comes to monitoring your backend, this will be a frequent go-to option. You can find out detailed information about when someone logs into your admin area – who they are, what they did, and if they updated anything. This is quite the game-changer for large teams with multiple contributors working on a single Joomla project.
The system menu might be “pushed” down the menu tree, but it is one of the most essential administrative areas. It contains a ton of additional options that are directly connected to your Joomla site installation, operation, maintenance, and updates.
This section contains a single key option – Global Configuration. Once inside, you will find a bunch of options that are directly related to your website – site name, default editor, default access level, and many more.
Scrolling down, you will find numerous useful options for your metadata and SEO. All successful websites nowadays rely on search engine optimization to some extent, so your configuration here can greatly improve your efforts for more exposure.
This is your go-to place for installing extensions and languages for your Joomla project. You can upload the needed add-on from your computer, a URL, or straight from the Joomla Extensions repository. As for the languages, there are a whopping 48 options to choose from, so you can ensure your target audience will have no trouble understanding you.
Here’s where the design addicts can let all their creativity run loose. You will be able to upload and view templates for your website (frontend), admin area (backend), and emails. Each theme can be manually edited, so if you know a bit about HTML/CSS – you can create a truly unique outlook for your Joomla pages.
This section helps you clear your cached data. You can do so per folder and only cover things like templates, plugins, or languages. Additionally, you have the Global Check-In option. This component unlocks all previously locked or pending files, allowing the administrator to analyze or edit them.
Many of the subcategories you will frequently use are neatly organized in the Manage menu. You can enjoy quick access to your extensions, modules, templates, languages, redirects, and more. You can also schedule tasks from here, ensuring all of them get your due attention. Ideal for the site administrator in terms of organization.
Once you install Joomla, you automatically get “subscribed” to a number of important notifications. In this section, you’ll be able to see post-installation messages and detailed system information like web server, database types, PHP version, and the likes. In case Joomla detects a threat to your website, you will also receive a prompt warning here.
This one is pretty self-explanatory – whenever there is a new version of the Joomla core or one of its extensions, you can update your system from here. Updates are essential for every webmaster as old and un-updated apps may pose a severe security and performance threat in the long run.
Here, you can see the combined information from your user Groups and Access Levels. There is a variety of settings that will determine who will be able to view certain content, who will edit it, and which group has control over the others. In the Text Filters menu, you will be able to fine-tune your HTML content by creating forbidden lists and applying filters over your user groups.
Last, but certainly not least, the Help section is like a world of its own. Think of it like a Joomla academy where you can find all kinds of helpful resources. Self-learners can enjoy hundreds of insightful tutorials and developer resources to help them become wizards with the CMS. For those who prefer more human assistance, there are quick access links to the Joomla Forums, documentation Wiki, and community portal.
…and that concludes our tour of the Joomla 4 Dashboard!
We hope that you find this guide useful and build more confidence in using one of the most popular CMS solutions out there. You can check the ScalaHosting blog or contact us directly with any Joomla questions or issues.
FacebookTweetLinkedIn
аналитика форекс gbp кaртa мирa форекс вспомогательные индикаторы форекс как платят налоги трейдеры валютного рынка форекс лучшие индикаторы для входа индикаторы измерения температуры щитовые дмитрий котенко форекс клипaрт для форекс имхо на форексе дц форекс брокер отзывы безрисковая комбинация форекс индикаторы рынка ферросплавов