Skip to Content Skip to Menu

Author Profile URL on Blog

4 years 5 months ago #319139 by hayesjames
Author Profile URL on Blog was created by hayesjames
Hi again,
I have setup the blogs to work through Joomla so I can create a module that shows a latest post feed on various pages. I have set it up so a user can see the title and then click to see all content as a drop down. I would like to add a link to the authors profile page within the body as well but at template level. While I can get the Author's name to appear using:

<?php echo $item->displayAuthorName; ?> or
<?php echo JUser::getInstance($item->created_by)->name; ?>

I cannot work out how to add the profile url from their account to the template. Any ideas?

Many thanks

James

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 5 months ago - 4 years 5 months ago #319144 by krileon
Replied by krileon on topic Author Profile URL on Blog
If using CB Author Bot the article author should be replaced by the output for the formatname field and link to their profile. Not sure if this would work in a module though. Beyond that if you're attempting to do this with PHP you'll need to use the below getFields API to output the formatname field.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18361-obtaining-field-values-through-getfields-api


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 4 years 5 months ago by krileon.
The following user(s) said Thank You: hayesjames

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

4 years 5 months ago - 4 years 5 months ago #319151 by hayesjames
Replied by hayesjames on topic Author Profile URL on Blog
Thanks Kyle, FYI I added this into the template:

<a href="/profile/<?php echo $item->created_by; ?>">

so it would pull the author id through and creating a URL to the authors profile.Excellent stuff.

On the blogs side of things to accompany this, is it possible to setup a notification email to the author when their post has been agreed and published?

Cheers

James
Last edit: 4 years 5 months ago by hayesjames.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 5 months ago #319156 by krileon
Replied by krileon on topic Author Profile URL on Blog

On the blogs side of things to accompany this, is it possible to setup a notification email to the author when their post has been agreed and published?

That would be outside the scope of CB unless you're referring to usage of CB Blogs. For CB Blogs the only notifications available are through CB Activity and logged by CB Auto Actions and its System Actions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: hayesjames

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

4 years 5 months ago #319158 by hayesjames
Replied by hayesjames on topic Author Profile URL on Blog
That makes sense, I'll install the Auto Actions plugin and see if I can get that working.

Can I also ask a question about Members Lists. This feature is excellent, it really is. Is it possible to get a search of the members list to add a page query string? Currently in Chrome if a user completes a search and clicks on a member, if they click back then the page errors and needs to be reloaded to recreate the search?

many thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 5 months ago #319161 by krileon
Replied by krileon on topic Author Profile URL on Blog

Can I also ask a question about Members Lists. This feature is excellent, it really is. Is it possible to get a search of the members list to add a page query string? Currently in Chrome if a user completes a search and clicks on a member, if they click back then the page errors and needs to be reloaded to recreate the search?

Our search already does this, but the URL for a site has a maximum length limit allowed by browsers. If the URL would be too large and surpass this limit we don't trigger the redirect to the query string search. In short you probably have too many fields set as searchable on your userlist or the URL to your userlist is too long. You can see this working fine on our demo site below where the URL updates when a search is made.

demo.cbdemosites.com/demos/community-builder/user-lists/grid-layout

Search the firstname field for "demo". Click the user then hit browser back. You'll notice the search is restored.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: hayesjames

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

Moderators: beatnantkrileon
Powered by Kunena Forum