548 Posts
joomleb
5 years ago
10
Topic

Hi guys, let me recap:

- With DPCalendar Users can Create Events
- When User creates the event, DPCalendar links to the Contact page if a Contact exists
- In the file /components/com_dpcalendar/views/event/tmpl/default_information.php at line 73 DPCalendar printing the contact information in DPCalendar

Instead to print the Contact informations I want print the SEBLOD User if a SEBLOD User exist.


The question is: Please, How does a SEBLOD User Profile link look like ? What is the rule appended to the SEBLOD User Profile link generation ?
Do I have to use the SEBLOD User Profile link or the standard Joomla User Profile link ?

PS Considering that also the "User Bridge plugin" can be used. So, each time a User is created, edited, a new "User" article is created and a customized "default title" ( SEO custom URL) can be applied.

Get a Book for SEBLOD
149 Posts
MtnPavlas
5 years ago
1
Level 1

I think the easiest way is to have a list view menu item (e.g. "Users" or "Community") that will list all users, and then in the DP Calendar file you listed above (assuming you'll be hacking it anyway), you may need to grab the event author's user ID, and then use it to query the Joomla d/b to get the user name (or username or any other field as needed) and the user article alias, then build the URL accordingly.

548 Posts
joomleb
5 years ago
0
Level 2

Hi MtnPavlas, 

many thanks for your answer/suggestions, too appreciated.

"assuming you'll be hacking it anyway" = much more, I have the DPCalendar developer's availability to make a stable integration between DPCalendar & SEBLOD User

This is why I asked (kowing also that SEBLOD 4.x is on developing), Please:

- How does a SEBLOD User Profile link look like ? What is the rule appended to the SEBLOD User Profile link generation ?
- Do I have to use the SEBLOD User Profile link or the standard Joomla User Profile link ?

PS Considering that also the "User Bridge plugin" can be used. So, each time a User is created, edited, a new "User" article is created and a customized "default title" ( SEO custom URL) can be applied.

149 Posts
MtnPavlas
5 years ago
1
Level 1

If you're using the user bridge, wouldn't the user profile link be something as simple as <menu item for Seblod list for content type user>/<user profile alias> ?

E.g. for the website I'm building right now, I have the user directory accessible under <site root>/community

Then each user can be found under <site root>/community/<alias>, e.g. <site root>/community/mtnpavlas

In your DP Calendar customization, you can simply grab the ID of the user making the calendar post, query Joomla's #__content table to get the user's alias (using the appropriate category and user ID and left join on #__core: the field "pk" holds the user ID while the field "pkb" holds the article ID).

I think you could also use something like these URL's for your user profile(s):

If it's the logged-in user who needs to access his/her profile: <site root>/index.php?option=com_users&view=profile

If it's any user: <site root>/index.php?option=com_content&view=article&id=xx&Itemid=yy (this is assuming you're using the user bridge, hence it's constructing the URL with "com_content", and not "com_users").

548 Posts
joomleb
5 years ago
0
Level 2

Hi MtnPavles,

many thanks for all your suggestions.

Now as far as I know a Joomla User + SEBLOD User integration means that, always, with or without User Bridge enabled, a SEBLOD User Profile page is called through a List & Search Types menu item:

/index.php?option=com_cck&view=list&search=users&task=search&Itemid=xxxx

where "xxxx" is the List & Search Types menu item ID I'm using

1 - So, the first question here is: Please, How to append directly to the List & Search Types menu item URL link the "User ID" value ?


2 - Then, if the the "User Bridge plugin" & the "Search Engine Friendly URLs" has been enabled, point to the List & Search Types menu item URL link (with User ID) the customized "default title" ( SEO custom URL) should be shown in the URL

149 Posts
MtnPavlas
5 years ago
1
Level 1

joomleb, couldn't you simply disable SEF URL's in Joomla's global config, create a Seblod list for content type Users where you put a link to "Content >> View" on one of the fields, and see the URL Seblod generates?

When I did the above, I got the following URL's (examples):

  • List of users: <site root>/index.php?option=com_cck&view=list&search=user__all&task=search&Itemid=151
  • Individual user (with bridge enabled): <site root>/index.php?option=com_content&view=article&id=51:bryan&catid=8&Itemid=203

If you don't have the user bridge enabled, I don't think you can view the individual user profiles, can you? I believe your options for this are: a) enable contact creation with Joomla user creation, or b) view individual users as a search/list with only one result, or c) use another user management extension (e.g. Community Builder, though I'm not sure you want/need it if you already have Seblod).

Sorry if I'm totally missing the point here.

548 Posts
joomleb
5 years ago
0
Level 2

Hi MtnPavlas,

with or without the User Bridge enabled by default SEBLOD "List & Search menu item > Details > Search Type (List): Users = load the logged in user (my profile)", but you can set :

- List & Search menu item > Details > Search Type (List): Users
- List & Search menu item > Overrides (Live / Variation) > User Id: 123 = by default SEBLOD list here the User Name field, but you can add the User Id field in your Search & List backend with Live value 2 setted to "User" and the logged in user is shown OR the the one with the User Id input in the Search & List menu item

-

When you disable SEF URL's in Joomla's global config, you have back the Search & List URL just with the &Itemid=1234 appended that is the Menu Item ID

-

So, What I'm looking for is the simplest URL rule link to add into DPCalendar DB, that should run with or without the Bridge. I supposed it is something realated to the User ID (that is the Joomla User ID)...

Then, if the SEF URL's in Joomla's global config in enabled it should be shown following the SEBLOD rules you have configurated in your User Bridge plugin

5 years ago
1
Level 1

Hi Joomleb,

To be able to display the SEBLOD content view of a user (Profile), the Bridge must be enabled.

The best solution is exactly the first one of MtnPavlas, thanks:

  • Enable the Bridge
  • Define how to the Article title is generated => will give you the alias of the profile
  • Create a User list (With the SEF you whant, for exemple /alias)
  • Assign this list to a menu item (You can add a redirection if you don't want to display the list, but only profiles)

Then, when you need to construct the link of a user Profile, you just need 2 things:

  • The Menu Item of the list
  • The alias of the user profile


Regards.

548 Posts
joomleb
5 years ago
0
Level 2

Hi Lionel, 

many thanks. So', the enable bridge is a must. Please, What do you mean with "You can add a redirection" ?


Then, I'm not a developer, but I have the availability of the DPCalendar developer that want integrate SEBLOD into DPCalendar. With DPCalendar Users can Create Events

- When User creates the event, DPCalendar links to the Contact page if a Contact exists
- In the file /components/com_dpcalendar/views/event/tmpl/default_information.php at line 73 DPCalendar printing the contact information in DPCalendar

Instead to print the Contact informations I want print the SEBLOD User if a SEBLOD User exist.

He asked me me "How Seblod constructs the link of a user Profile"

Can you help me with that code to give it back to him, so, Seblod will be integreted into DPCalendar ? 

5 years ago
1
Level 1

Hi Joomleb,

The Bridge is Mandatory.

It create an article linked to the user.

The name of the Profile is the name of this article and can be defined in the User Storage Location Plugin.

The content of the Profile is the Content View of the User Content Type


So, the link to the Profile is the link to this Article, like : 

index.php?view=article&option=com_cck&id={slug}&Itemid={Itemid}


Regards.

548 Posts
joomleb
5 years ago
0
Level 2

Hi Lionel, 

many thanks for your help. DPCalendar admin answered me asking:

Looks like they have not a user profile link where you can pass the user id. So my question is what is the {slug} value, where does it come from? How do you get it in DPCalendar, if it is the username field, then it should be possible? And how do you get the item id paramter too? If there is not something like

JRoute::_('index.php?view=article&option=com_cck&id={userid}');
	

or

CCKRouteHelper::getUserLink($userId); // or any other helper class to get a user route
	

then it is very unlikely that we can integrate it.

Please, Can you help on it ?

Get a VIP membership