User profile and blog linking

Permalink
Ok, This is turning out to be a little more complicated then I thought, hoping you guys can help shed some light on this..too many variables :)

Right, I'm making a website, and it has to feature user profiles. There will be about six members, and an admin.

I want it so that each member has their own profile with an image and a bit of text. These members will be blogging, and I want their profile name and possibly avatar to post each time they post on the blog.

Clicking on their name under the blog post will take you to each respective profile. How do I do this?!

I am using a combination of the 'blog' plugin, and the 'user profile' plugin.

have a feeling it is something to do with page and user attributes, and creating each profile page separately, but I just want the blog posts to lead to their profiles :) Very important :)

Cheers for your future help :)

View Replies:
ribenawrath replied on at Permalink Reply
ribenawrath replied on at Permalink Reply
So maybe another way to simplify this would be a way of posting a hyperlink after each blog post, that takes the user to the corresponding profile page :)
ribenawrath replied on at Permalink Reply
bump.
triplei replied on at Permalink Reply
triplei
Hi there,

I just took a look at the blog_entry.php file for the default theme and modified it slightly.

something like the following should output a link the Author's profile page.

<p class="meta">
  <a href="/profile/view/<?php print $c->getVersionObject()->getVersionAuthorUserID(); ?>">
    <?php echo t('Posted by')?> <?php echo $c->getVersionObject()->getVersionAuthorUserName(); ?>
  </a> on <?php echo $c->getCollectionDatePublic('F j, Y'); ?>
</p>


hope that helps :)
ribenawrath replied on at Permalink Reply
Thanks for your help :)

It makes a hyperlink, but it doesn't link to any right page.

Not sure if it's in the right place. I couldn't find the file you referred too, so assumed it would be blog_post.php

If not then could you state the directory? And what line the code should be going on?

Thanks,
sorry for the bother,
grateful for the help.
triplei replied on at Permalink Reply
triplei
Hi again,

Do you happen to know if you have public profiles enabled on your site? (Dashboard -> Users & Groups -> Login & Registration) Or did you create pages for each of the authors separately?

The getVersionAuthorID() will return the ID of the user who posted the article, so if you needed to instantiate the user object, you could do that.

Do you happen to have a public version of the site I could take a look at to see what's going on?

The file I had pulled that from was the default theme (/concrete/themes/default/blog_post.php), but you should drop it into your own theme where you want the link to show up.

Cheers
ribenawrath replied on at Permalink Reply
I do have users allowed.

You can view my site here at rationale.org.uk

log in with user: demo password: demo123

The theme I'm using doesn't have the file you mention...
ribenawrath replied on at Permalink Reply
Bump? Anyone?

It has changed slightly now, Iw ant to be able to make the links that appear under each post to direct to a link I specify.

Possible?
jordanlev replied on at Permalink Reply
jordanlev
If this is the paid Blog addon, you might try posting to that addon's forum or support area (go to its marketplace page and click "support" or "forums" in the sidebar).
cannonf700 replied on at Permalink Reply
cannonf700
This is an example of what we're using and it works for the author name and linking to their profile:
<?php  echo t('Posted by')?> 
          <?php  
            $u = new User();
            if ($u->isRegistered()) { ?>
               <?php   
               if (Config::get("ENABLE_USER_PROFILES")) {
                  $userName = '<a href="' . $this->url('/profile') . '">' . $u->getUserName() . '</a>';
               } else {
                  $userName = $u->getUserName();
               }
            }
            ?>
                  <?php   echo $userName; ?> on <?php  echo $c->getCollectionDatePublic('F j, Y'); ?></p>


We're trying to get the avatar worked out. I can get it to display but if you try to modify the page view Page Type > Defaults then it returns a Fatal error. I'll let you know if I get it worked out.
Fanflame replied on at Permalink Reply
Fanflame
Did you ever sort this out as I am trying to do the same on version5.7 and cannot get it to show the avatar of the user.

Thanks

Fanflame
buurvrouw replied on at Permalink Reply
buurvrouw
I use this add-on to display author information in blog posts:
https://www.concrete5.org/marketplace/addons/user-info1...

place a block on the blog page template and pick the attributes you want to display. Works great!