Keyword

Mod K2 user - redirect to userpage logged

More
12 years 2 months ago #101493 by bruno
Aanyone know how I can redirect the user to your page after login in the module K2 user ?

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

More
11 years 11 months ago #101494 by Ryan Wheale
Replied by Ryan Wheale on topic Re: Mod K2 user - redirect to userpage logged
+ 1 - I cannot believe K2 does have a menu item type of "My Page" which would have a very similar functionality to the built-in Joomla "User Profile" page. Unbelievable.

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

More
11 years 11 months ago - 11 years 11 months ago #101495 by Ryan Wheale
Replied by Ryan Wheale on topic Re: Mod K2 user - redirect to userpage logged
So after much frustration, and not really wanting to deconstruct K2 - I came up with this solution. Joomla has a menu item type of "User Profile" which redirects a user to his or her profile page. This is the functionality that is non-existent in K2. Lets leverage this functionality and redirect users to the K2 profile. The view for Joomla Users component can be found here:
/components/com_users/views/profile/tmpl/default.php

Copy that file to your template html folder:
/templates/your_template_name/html/com_user/profile/default.php

And add this code to the top:
$user = &JFactory::getUser();
if($user) {
    $url = "index.php?option=com_k2&view=itemlist&task=user&id=". $user->id;
    JApplication::redirect( JRoute::_($url) );
}

Now you can create a menu item of type "User Profile" (located under the User Manager category.

And lastly, go to the K2 Users module and set the Login Redirect page to the menu item you just created. Hope this helps someone.

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

More
11 years 8 months ago #101496 by JAck Stern
Replied by JAck Stern on topic Re: Mod K2 user - redirect to userpage logged
Thank You !!!

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

More
11 years 8 months ago #101497 by JAck Stern
Replied by JAck Stern on topic Re: Mod K2 user - redirect to userpage logged
Is it possible to do this with the 'new article' menu item. I am trying to make a main menu item to allow users to "post a new k2 article" .. but there isnt one. I know it is on the module but i just want to make it a main menu item. Thanks for any help :)

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

More
11 years 8 months ago #101498 by Ryan Wheale
Replied by Ryan Wheale on topic Re: Mod K2 user - redirect to userpage logged
Hey. I have abandoned Joomla because after only 2 projects I started to hate my life as a developer. I am now using Expression Engine, as the $250 cost greatly outweighs the days and days of frustration I experienced with Joomla. Sorry this isn't of much help, but if you are being paid for this project, then I suggest taking a day's worth of pay and getting Expression Engine.

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

More
11 years 8 months ago #101499 by william white
Replied by william white on topic Re: Mod K2 user - redirect to userpage logged
@Ryan, Thanks for your contribution. It along with different adaptions of the method will be helpfull to many here, and it is done properly with overrides. Sorry to see you leave, but wish the best for you!

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

More
11 years 1 month ago #101500 by Mary Stremmel
Replied by Mary Stremmel on topic Re: Mod K2 user - redirect to userpage logged
@Ryan... you get paid $250 a day.. way to go man

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

More
10 years 2 months ago #101501 by Fresh-Ideas
Replied by Fresh-Ideas on topic Re: Mod K2 user - redirect to userpage logged
Iam more than surprised and of cause dissapointed, that even today it seems not possible to create a "my page" menu item without a hack?!

Or is there now a solution out there i missed?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #101502 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Mod K2 user - redirect to userpage logged
Yes, you can link it to either the User's page (blog) or to the user's profile, which is a default com_users link. K2 will expand that form and the info.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum