What is deference between local plugin and block plugin in Moodle? - plugins

I have to make a page to manage a series of videos in a Moodle system, but I am wondering that if I use block plugin or local plugin for managing videos; or
may be basically I should use block to creating per video and editing that specific video and add local plugin to retrieving list of all videos and managing them... (a combination of local plugin by block plugin)
...

The main difference between a local plugin and a block plugin, is that a block plugin is designed to be added into the side panel or user dashboard as a 'block' of content. A local plugin, on the other hand, does not have a defined space to appear on the page (although it may hook into the site navigation in order to provide a link to access the pages inside the local plugin).
Both can run scheduled background tasks, define database tables, trigger and handle events, etc. There are also a few hooks into the code that local plugins have access to (and which not all other plugins have) - you can find the details here: https://github.com/moodle/moodle/blob/master/local/readme.txt

Related

What is the difference between activating content/page and publishing page in AEM?

When we publish a page again we need to activate content in tools. I just need difference and use case. What is difference between activating content/page and publishing a page in AEM?
From Adobe Docs -
Certain terms related to publishing can be confused:
Publish / Unpublish These are the primary terms for the actions that
make your content publicly available on your publish environment (or
not).
Activate / Deactivate These terms are synonymous with
publish/unpublish.
Replicate / Replication These are the technical terms describing the
movement of data (e.g. page content, files, code, user comments) from
one environment to another such as when publishing or
reverse-replicating user comments.
Activate/Deactivate were the terminologies used in classic UI, you can see this on any version of AEM if you invoke the old screens - go to http://localhost:4502/siteadmin or use cf# to edit the page (http://localhost:4502/cf#/content/app/en.html) and go to page properties in side kick, you'll notice Activate/Deactivate.
On Touch UI, you'll notice Publish/unpublish, check page properties using the editor.html(http://localhost:4502/editor.html/content/app/en.html) or any other console in Touch UI.
They both mean the same - moving data from author environment to publish environment. Taking it a step further, it can also mean moving data from author to the dispatcher(via the publisher), with an added flexibility of clearing cache for that page during publishing/activating.

How to put multiple forms in the same page using joomla?

I'm using CKForms to create 3 forms, so far, they are independent components, I would like to put them in the same page.
This manual could help :
http://joomlacode.org/gf/download/frsrelease/12021/48586/manual_ckforms-EN-1.3.4.pdf
In order to use multiple instances of the same component in a joomla page, you have to check if there is a module or a plugin available.
If there is an option for a module you could publish each instance in a module position.
If there is a plugin, you could create an article (or a module in some cases) and add plugin code to load plugin instance.
Checking CKForms site I could see that there are both options.
Hope this helps

Unable to Edit Article After System Plugin Install

I have developed a front-end system plugin for Joomla 3.0 which replaces keywords for HTML formatted objects. This works perfectly in my local lab environment but when installed on the hosted site (WHM/cPanel) it causes issues with the administration area and prevents the administrators from editing the articles.
When the administrator clicks on a article to edit the page attempts to load then appears to go back to the same page. I have developed this as a front-end plugin only so I shouldn't affect the administration area.
The problem is also preventing admin from creating anything new (news, blogs, content, menu items etc.)
As this does not happen within my lab I can only assume the issue is with some server settings which I may need to enable/disable. I have complete administrative access to both WHM, cPanel and Joomla so can change settings where ever needed...
Things I have observed:
The article URL changes from:
/administrator/index.php?option=com_content&view=article&layout=edit&id=7
to:
/administrator/index.php?option=com_content&view=article&layout=edit&id=7
when the plugin is enabled. Notice the ampersand has changed to amp;. This makes me think it could be something to do with UTF-8 character encoding has been set in MySQL to utf8general_ci.
Any pointers on configurations I may need to change would be greatly received.
Question: How do I prevent this from occurring (without removing my essential plugin).
If you create System Plugin that should work only on front-end you have to check in your plugin if current page is front-end. You can do it using this function: JFactory::getApplication()->isSite() or JFactory::getApplication()->isAdmin()
Example usage (I assume you use onAfterRender event):
function onAfterRender() {
// Exit if current page is from Administration panel
if( JFactory::getApplication()->isAdmin() ) return;
/* your plugin main code goes here*/
}
It will prevent your plugin from modifying administration panel output. If you already done it and it does check like it should to, there is no way that reason of your problems is that plugin.

Issue with publishing a new page in CQ5

I have installed both author and publish instances of CQ5.5 on my PC. But when I add a new page and publish it, it does not appear in the publish instance. Only a blank page is rendered.
I have tried activating it both from the siteadmin and from the Replication page in Tools. Only the navigation item appears in the Publish instance.
I checked the Request logs also. But it only gives a
200 response(OK)
Can someone please help me on this ?
You need to activate/replicate your /apps/site folder where all of your templates and components are located to push it from your author instance to your publish instance. Activating a page doesn't automatically activate the components and templates it uses.
Go to:
http://localhost:4502/etc/replication/treeactivation.html
Browse to or type /apps/[your site] in the path field
Set the check boxes to fit what you want to activate (Unchecking all will make everything under the selected path activate)
Click 'Dry Run' to see what will get activated without actually activating. (This is more of an informative step to help ensure you don't activate something not intended in a production setting)
Click 'Activate' to activate.
You can then check your publish instance to see your templates and code are there.
It is easy to miss activating your apps folder as there is no ui like the website admin for pages where you can activate.
Activating a page/folder/asset does not activate sub-pages/folders/assets. This can cause confusion especially when working with folders.
Generally if you need to activate a tree the best way is to use the tree activation utility
The only time I've ever seen this is when the code is not installed. That would be the first thing that I'd check. Go to (assuming you have your publisher on port 4503)
http://localhost:4503/crx/de
You should have your the code in /apps and you should be able to find the content page in /content too.
The reason this happens is that the sling:resourceType property points to a component that doesn't exist so it uses the default which is an empty output.
You have to build the code to both the environments (author as well as publish). This way both the environments will have the same copy of source code installed in the form of cq5 packages and felix bundles. Then if you create a new page or drop any component on any existing page, it will appear the same on publish environment after activating the same either through 'Activate Page' link in sidekick or through replication tree activation page.

Difference between components, modules, extensions and plugins in Joomla

What is the difference between Joomla components, modules, extensions and plugins?
Plugins
Plugins enable you to execute code in response to certain events, either Joomla core events or custom events that are triggered from your own code. This is a powerful way of extending the basic Joomla functionality.
Components
Components are the main functional units that display in your template, like the content management system, contact forms, Web Links and the like. They are usually displayed in the center of the main content area of a template (depending on the template).
Modules
A more lightweight and flexible extension used for page rendering is a module. Modules are used for small bits of the page that are generally less complex and able to be seen across different components. Sometimes modules are linked to a component such as the core latest news module.
Extensions
Components, languages, modules, plugins and templates collectively known as Extensions.
Quickstart tutorial for free.
Components
A component is a separate application. You can think of a component as something that has its own functionality, its own database and its own presentation.
So, if you install a component, you add an application to your website. Examples of components are
a forum
a newsletter
a community system
a photo gallery
You could think of all of these as being a separate application. Each of these would make perfectly sense as a stand-alone system.
A component will be shown in the main part of your website and only one component will be shown. A menu is then nothing more than a switch between different components. You can compare it a bit with your windows taskbar, where you see a tab for each open application.
Modules
Modules are extensions which present certain pieces of information on your site. It's a way of presenting information that is already present. This can add a new function to an application, which was already part of your website.
Think about
latest article modules
login module
a menu
Typically, you'll have a number of modules on each web page.
The difference between a component and a module is not always very clear. A module doesn't make sense as a standalone application, it will just present information or add a function to an existing application.
Take a newsletter for instance. A newsletter is a component. You can have a website which is used as a newsletter only. That makes perfectly sense. Although a newsletter component probably will have a subscription page integrated, you might want to add a subscription module on a sidebar on every page of your website. You can put this subscribe module anywhere on your site. You'll probably agree with me that a site with just a subscription module and no actual newsletter component would be rather ridiculous.
Plugins
They used to be called mambots in Joomla 1.0.x, but since Joomla 1.5.x they're called plugins. A plugin is a function which is performed on a part of Joomla before this part is shown. This part can be on content, on the editor, on the complete system, etc. This might seem a bit abstract, but you'll understand it with an example.
Let's take one of the plugins of Ulti Joomla as an example: Ulti Reflection. This is a plugin which can make a reflection of the images you use in your content articles. To use this you just have to put something like
inside your content. Before the content is shown to the user, the Ulti Reflection plugin will scan the content to find the {reflection} tag. If it finds the tag, it will replace the tag with the image and its reflection.
Be carefull not to put to many plugins one your website, because some of them can really slow down your site.
If the difference between the three types of extensions is still not completely clear, then I advice you to go to admin pages of your joomla installation and check the components menu, the module manager and the plugin manager. Joomla comes with a number of core components, modules and plugins. By checking what they're doing, the difference between the three types of building blocks should become clear. You can also check out the official Joomla extensions page. Browse through the extension categories and you'll be amazed about the extension possiblities you have for your site.
Modules and components are displayed on a page.
Plugins operate behind the scenes and can do a multitude of things, like replacing content with other content, perform searches, perform login/logout functions, or anything really tricky that you can imagine.
There can only ever be one component on a page. When you choose menu items, you are actually choosing the component that you wish a page to display. The variables for the component are stored once (in the database), so you can't have multiple instances of the component!
On the other hand, modules are added multiple times. You can have many modules on the one page. In fact, you could have 100 instances of the same module on the one page. The variables for a module are stored against each instance. (in the database).
This is why joomla templates have one place holder for a component, and many place holders for modules.
A module can be added to an individual page (menu item) , or seleceted pages, or all pages.
Remember that a menu item is indeed a component choice. Each menu item does store variables in the database, so it is possible to feed the component display details. E.g. what page id the content component is to display.
In the back end, components can have many backend settings and functions, and "do" many more things than a module.
Examples of a component are:
com_content (displays articles...)
a bulletin board
a forum
a sitemap
Examples of a module:
a countdown clock
top 10 most read content
a poll
Unless you understand the difference between a module and a component, you will find it very difficult to administer your Joomla installation.
Modules
Modules are usually small pieces of functionality designed to present information in your site. They can appear a number of times, on a number of pages in various positions. On the contrary components are a full blown application, usually quite complex and are to the main body if a page. Also each module can be viewed in various pages, and the position of each module can be easily changed. You are allowed to select the menu items where a module is displayed. A good example of the usage of this functionality is targeted advertising. If your site has various sections, you can create module for each section. Each module will contain a targeted advert for the section. Now instead of showing all the modules, all the time, you customise the visibility of the module such that each advert is displayed only in the relevant menu links. Typical examples of standard Joomla modules are : Main / User / Top and other menus, Latest News, Popular Articles, Polls, Login Form, Syndication Details etc.
Components
On the other hand, a Joomla component is typically more complex, with extensive functionality and capabilities. A component can only be displayed in the main area of a page, and can only be displayed in a single page (usually). Links to components are usually done by creating menu items. Components usually have a particular page or pages for their configuration.
Extensions
Joomla extensions extend the functionality of Joomla websites. Five types of extensions may be distinguished: components, modules, plugins, templates, and languages. Each of these extensions handles a specific function.
Comdev is a Joomla development services provider, which provides varirties of extensions like: JomOffers, JomDirectory, JomHoliday 3, JomEstate, JomEvents.
Source: http://comdevjoomla.blogspot.com/