The standard Joomla registration forms has a limited set of fields available. What's the "correct" method for adding the user's first name, last name, and phone number to the registration project? I can certainly modify the Joomla core, but that's less than ideal.
A nickel for your thoughts.
Essentially, you'll need to code alternatives for com_user and mod_login, then store your extra information in a separate table, keyed by user_id. Community Builder does something similar, only on a much larger scale. There may also be other similar profile extensions that act as drop-in alternatives to the core login system.
The best way to do it (and most in line with Joomla 1.6 - when it's released) is to use the Joomla User Meta plugin. UserMeta
You can extend the profile using just the user xml file but this won't store them in a database, merely as parameters. The Usermeta is much more robust.
I accomplished this by using the CBE extension for Joomla! Depending on your needs that might be overkill for you, but if you need profile management with avatars and other features you can consider going that route.
Related
I have a task from the client to create a screncasts website. It must be similar to egghead.io or laracasts.com. I decided to choose Joomla for a basis. And for this reason, I want to know are there components or modules for Joomla, which realize similar video functionality? For example, the site has two types of screencasts. Paid and free. If the video is paid, then at the opening, instead of showing, the user must to pay. (All like on laracasts.com). This is the main point. Thank you.
P.S. Perhaps there is a better solution for this kind of site?
Your project has 3 different aspects.
User management
Managing payments and memberships
Video display
1.For the first point Joomla ACL (Access Control Level) provides good built-in functionality to filter user access. You can create different user groups (free memberships, paid, pro etc.) and use acl to control access to the content. 2.Managing payments. There are many components that do this (free and paid), you can search on extensions.joomla.org Akeeba subscriptions is a good one for managing subscriptions.
3. Video playing. You can do anything from simple to complex. Basic solution is to embed the video in an article using standard html5 tags. A better solution, is to use a content builder extension like K2 that has additional features to handle multimedia content. It makes editing and content creation easier for non specialists.
Or you can build or find a specialized component that will handle all these aspects in one solution.
I just started with Joomla 3.x and I'm writing a component for Joomla v3 which is supposed to create new usergroups for creating 'groups'- the design requirements being:
An organisation may set up a group to offer access to some set of services -including communication but also also other types of services - to their members
(the other services is the reason why I believe the community and forum joomla extensions are not suitable- they mostly focus at fora and social media services, not the services I will implement.)
Other persons/members of the organisation may register to this group, which allow him/her to access these services
ps: it is also possible for person to set up a personal account and get access to the set of services. This person may also join one or more groups at a later stage
How to do code the creating of new usergroups? I noticed a possible suggested solution at How to create custom User Group Programmatically in Joomla 3.x, but I struggle to understand how to use the suggested JTableUsergroup class because of the limited documentation at http://docs.joomla.org/API17:JTableUsergroup(?) Does creating an instance of JTableUsergroup results in the creation of a new customer user group?
Another question: how to add users to a customer usergroup? The only hint I found was at http://api.joomla.org/cms-3/classes/JUserHelper.html - using the method addUserToGroup of class JUserHelper.
Many of the Joomla development concepts are well document but I could not find one for managing custom user groups...
Appreciate your help;-)
First, overall, the best consistent documentation of Joomla APIs is in the docblocks for the classes. Then to be honest what I do a lot of times is to search for where in the core the API is used. There are some great pieces of narrative documentation in the wiki, but on the whole I always start with the docblocks which are very complete. However in this case it's pretty simple.
You need to do something along the lines of
$newrow = JTable::getInstance('Usergroup');
//code to add your data
$newtable->save(); // Shortcut for check, bind, store
However, if I were you I would look carefully at UsersModelGroup because there are a lot of other things that should normally happen in this process such as running the user plugins. So I might include and extend that model (which manages the table class) rather than going to the table class directly. In fact your whole component might even be able to extend almost all of the users component or it might also be possible that you could do what you want with plugins rather than reinventing the whole thing.
In terms of assigning users to groups that is trickier because of some legacy things in the code. I think the setter followed by a $user->save() ($user being a JUser instance) is probably the way to go when adding to groups. What I probably would do is to write a custom JFormField that would manage opt-in groups because the core usergroup field includes everything. You could extend that and exclude the groups that you want to have only managed by admin.
usually its done by setting up the config.xml but what to do when my component needs more parameters at run-time ? There is little or zero information about, just 1-2 tutorials about custom parameters which could be used to archive the same thing but only if you're willing to write lots of bloat code for a very simple thing.
In my case my component is rather a little platform in it self, ie: users can add plugins from us. Of course I'd like to expose some options for such plugins in the component's options.
Is there any shortcut because if you look at the built-in component's code, you really don't want to do the same for each plugin...
well, thanks! any thoughts are welcome!
ps: may be there is something more compact like the Redux-Framework for Wordpress. I'd love to know there is library which can server both CMS systems.
update
'component' = Joomla component and by 'plugin' I mean my and non-Joomla plugin, hosted in a Joomla component. Imagine your Joomla component is just a host for external plugins.
You need to create a custom field type, where you'll be able to implement all the logic that's needed.
In case you need to store the values with the component, add a hidden input field, and use javascript to populate the markup on load, and insert the values you want to store on user interaction (you can also store an object encoded in json). Joomla will take care of saving and retrieving it.
the docs
Using codeigniter 2. Don't want to reinvent the wheel. Have tried Grocery_CRUD and found it takes as long, or longer, to learn it that it did to learn codeigniter.
Looking for crud library that makes sense, easy to learn so I don't reinvent the wheel.
Many thanks for any ideas.
You can use http://www.grocerycrud.com
It's easy to use with codeigniter.
Sample use
$this->grocery_crud->set_table('customers');
$this->grocery_crud->columns('customerName','phone','addressLine1','creditLimit');
$this->grocery_crud->render();
Also you can take look at https://github.com/jamierumbelow/codeigniter-base-model
This is very basic base model class for CI
Subjective but take a look at https://github.com/keevitaja/simple-crud-codeigniter
Why don't you try MY_Model to do all the CRUD functionality?
MY_Model
Just want to inform all you that I have released CRUDDER. This is a plug-in module for your application that works as a CRUD solution, ideal for systems back-ends.
CRUDDER is developed using CodeIgniter and Bootstrap for look&feel. You can develop your own skin appart from the Bootstrapped one. Full localization is possible. CRUDDER is designed to be intuitive and easy to use. The interfaces always show on-line help tips related to the CRUDDER itself and also to your database characteristics.
I'm attaching here an image of the CRUDDER example contained in the product web page so you can figure how easy it's to use.
On the other hand, you will find that configuration is very easy. There is no need to write code other than your own custom validation rules (more powerful than the CodeIgniter ones). There are only two classes: one contains all the functionality code and the other, Crudderconfig, encapsulates the configuration and localization parameters.
In contrast to other commonly used open-source CRUD solutions available, in CRUDDER all the table-and-field-specific metadata don't require to write code. All of this is contained in two "metatables", that can also be managed using the CRUDDER itself... so you use the CRUDDER to create your own CRUD rules (don't need to use phpMyAdmin, for example). This is a plus for users seeking for simplicity.
A full list of features is available:
Open the project web page
Among them:
Pluggable to applications not developed with CodeIgniter.
Sort, filter and pagination features, among others.
Soft deletes with unique-index collision avoidance.
Automatic menu-type form fields based on other tables content.
Extensible event triggering when a value is changed in a form.
Interface help tips for fields are contained in the database.
Designed with strong security in mind.
Take a look! Write me if you like it, have questions or want another functionality.
CRUDDER is released under the GNU LGPL license.
I have this specific requirement that there is a list of names of people and a container for photo.
So when I click on specific user's name, his photo will appear in that container.
Is there any specific extension for this, so that admin can manage all the people names with their images ?
Thanks in advance.
If you are referring to an Avatar and using Joomla 2.5+ then I would recommend using Community Builder. I know it's a fairly big system, however it extends user profiles massively and might come in handy in the future.
If you're using Joomla 1.5 then you could always use DAvatar which is simply a plugin.
Hope this helps
You can user Community Builder as well but its very large & powerful extension & i think your interested to show only users image. If you have Joomla 2.5 then Profile Picture plugin will be most suitable for your case. Here is the link check it out. http://extensions.joomla.org/extensions/clients-a-communities/user-management/19702 . Hope it helps you.
Community builder is overkill just to get an image.
Here are a few options, depending on how often these are updated and whether you want to allow users to update these themselves.
Of course you can always make a category and an article for each team member, then use the links and urls to load the image in a standard location (override +use css in your template to do this). Use ACL to manage who can change this and to decide if you will allow users to manage.
Use the image field in the contact component, put all of the team members in the same category in contact. Put bio etc in miscellanous information. Only admins can manage this since it is edited back end only.
Use a profile plugin for com_user if you want users to be able to manage for themselves.