Keyword

Disabling Author Page View

  • Scott Oman
  • Scott Oman's Avatar Topic Author
  • Offline
  • Senior Member
More
3 years 6 months ago #159923 by Scott Oman
Disabling Author Page View was created by Scott Oman
Dear K2 Developers and Community,

Originally I had planned to use the K2 author page as the public profile for users by customizing the layout, but I've decided to use a different component to do the job now. Eventually I'll have to modify/integrate K2 comments, K2 latest comments' module, and K2 top comments' module (username and images) to direct users to this component's profile.

However, I don't know how to disable the K2 Author Page. I hid all layout & view options for user (author) pages in K2 backend parameters, but the K2 author page is still accessible.

Is it possible to unpublish this page or disable this feature?

Thanks.

Kind regards,

Scott

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

More
3 years 6 months ago #159925 by Krikor Boghossian
Replied by Krikor Boghossian on topic Disabling Author Page View
Hello Scott,

I would try a different approach.
If the URLs have a similar pattern eg: the username, you can create a redirect rule in the component's overrides or your htaccess files.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

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

  • Scott Oman
  • Scott Oman's Avatar Topic Author
  • Offline
  • Senior Member
More
3 years 6 months ago #159929 by Scott Oman
Replied by Scott Oman on topic Disabling Author Page View
That's interesting. I hadn't thought of that, but it might be beyond the scope of my skill-set/knowledge-base.

This would be an example of a user's K2 author page url:

www.mysite.com/component/k2/author/1863?Itemid=495

and the other component's profile page I'm hoping to redirect them to:

www.mysite.com/profile/page/1863?task=page.display&page_id=6

The only thing I see that is similar is the "1863", the user's ID #.

Do you think such a configuration would be possible given that users' ID #s are provided in the URLs?

If so, any additional information about creating a redirect would be greatly appreciated.

Many thanks.

Kind regards,

Scott

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

More
3 years 6 months ago #159944 by Krikor Boghossian
Replied by Krikor Boghossian on topic Disabling Author Page View
Hello Scott,

This does require some regex knowledge.
StackOverflow to the rescue :)
stackoverflow.com/questions/28643170/htaccess-redirecting-rewriting-pages-based-on-partial-url-pattern

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

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

  • Scott Oman
  • Scott Oman's Avatar Topic Author
  • Offline
  • Senior Member
More
3 years 6 months ago #159951 by Scott Oman
Replied by Scott Oman on topic Disabling Author Page View
Not sure, but seems that would involve making an individual redirect for each and every user, which isn't practical.

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

  • Scott Oman
  • Scott Oman's Avatar Topic Author
  • Offline
  • Senior Member
More
3 years 6 months ago - 3 years 6 months ago #159961 by Scott Oman
Replied by Scott Oman on topic Disabling Author Page View
I solved this problem with the use of Metamod by inserting the following recipe in the module backend PHP area:

$url = $core_genius->info("url");
$c = preg_match('#^http://www\.mysite\.com/component/k2/author/([0-9]+)#', $url, $matches);
if ($c) {
$newurl = " www.mysite.com/profile/page/ " . $matches[1] . "?task=page.display&page_id=6";
$app = JFactory::getApplication();
$app->redirect($newurl);
}

Now all avatars and links in the K2 comments area, K2 comments module, and K2 top commenters module all redirect to a different component's profile page. So if you're using K2 and have a similar problem (you'd like to redirect users to their custom profile pages or another component's page), you can use Metamod + that recipe. Just change "mysite" to your site url and change the destination "(new url) profile/page/" and "?task=page.display&page_id=6" according to your needs.

Kind regards,

Scott
Last edit: 3 years 6 months ago by Scott Oman.

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

More
3 years 6 months ago #159971 by Krikor Boghossian
Replied by Krikor Boghossian on topic Disabling Author Page View
Nice one Scott,

Kudos :)

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

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

More
1 week 6 days ago #176392 by webdesign
Replied by webdesign on topic Disabling Author Page View
Hi Scott,

where can i find the module backend PHP?

Thanks

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 week 5 days ago #176399 by Fotis
Replied by Fotis on topic Disabling Author Page View
This is the module www.metamodpro.com but I doubt it's updated anymore...

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum