Keyword

First name, last name

  • johanna
  • johanna's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #100087 by johanna
First name, last name was created by johanna
My client is asking to have users defined as first name, last name. Is there any way of doing this without hacking into the K2 users component?

 

I'm wondering why that wasn't done in the first place...it would have been so easy.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #100088 by william white
Replied by william white on topic First name, last name
Quick two ways to approach this w/o making core changes.

1. Use Categories for each user, an item for each user with xtra fields for all their info.. Test for user, and echo the proper info in an override. (trouble and extra work)

2. Use php string functions to split and display the user name which is usually entered as first last in username field and you have direct accessto in an override...

another approach may be to use another extensions integration ie: jomsocial and use their registation form and put those fields in the override

 

Please Log in or Create an account to join the conversation.

  • johanna
  • johanna's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #100089 by johanna
Replied by johanna on topic First name, last name
Thanks for your quick reply...

I'm not really looking to add any more components than I already have.This issue came up rather late in the development process.

I will have to try to use the K2 users table to export the information for the client. I also noticed just now that the additional fields created by the User Extended Fields for K2 plugin are all in one field in the K2 users table called "plugins". So my question now is how do you export this mess as an Excel file with separate fields for address, phone etc. I'm not a developer but I think this is a really stupid way of doing things.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #100090 by william white
Replied by william white on topic First name, last name
My reply was to use the standard fields for k2 and fetch them out for display on the website in some manner, not to export them.

I have not used user extended fields for k2, but i think thats what they are for. If they are stored in one field it would be the same way k2 stores its extra fields and would have to be seperated into first and last either before displaying them on the site or after exporting the field...with excel etc, there should be a delimiter to work with. In php you basically put the field into an array and refer to the elements of the array on the fly.

Other products like jomsocial will probably give you this ability built in and the users will be gathered by them, and then synced with jomla and k2 users

Please Log in or Create an account to join the conversation.

  • johanna
  • johanna's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #100091 by johanna
Replied by johanna on topic First name, last name
Thanks for your reply. I'm going to have to pick the data apart somehow. I'm not a programmer. Ultimately a MYSQL table or CSV export is just text so I'll find a way.

 

I think it would have been better if the K2 extended fields plugin saved the extra data in separate fields instead of one field.

 

There are components to export Joomla user table and K2 content but not K2 users.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #100092 by william white
Replied by william white on topic First name, last name
If you are wanting to display the users name in the front end take one approach, if exporting take the other

Please Log in or Create an account to join the conversation.

  • johanna
  • johanna's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #100093 by johanna
Replied by johanna on topic First name, last name
Okeydokey. Thanks

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum