Display blog posts in user profile

Permalink Browser Info Environment
I'm using problog for one of my clients site. There is a need to display blogs for problog author in their profile page. How could I do that?

Note: I'm not using user blog.

Type: Discussion
Status: New
ronyDdeveloper
View Replies:
FatTony1952 replied on at Permalink Reply
FatTony1952
I'm working on the same thing.

I'm creating categories that correspond to the username. I may ossibly use something like the code below to add a blog list and filter by that category:

$userID = $profile->getUserID();
$a = new Area('Blog Area'.$userID);
$a->display($c);


I'm unsure yet if I have to be logged in as that user to have it display the correct information.
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Yes the $profile only work properly only when you logged in with username.
FatTony1952 replied on at Permalink Reply
FatTony1952
I wonder if there is a way to make a custom template using the blog search or the blog list that gets the user ID from the URL and filter the list based on that user ID?
FatTony1952 replied on at Permalink Reply
FatTony1952
Here is what I'm working with so far that may help sort this out. I haven't figured it out yet, but I feel like I'm pretty close.

I have a user attribute called "Business Name". The business names are also the names of my blog categories.

<?php      
defined('C5_EXECUTE') or die(_("Access Denied."));
extract($blog_settings);
global $c;
$u = new User(); <!-- Get the user info -->
$memberBusinessName = $c->getAttribute('business_name'); <!-- Get the user attribute to match to the category name -->
if (count($cArray) > 0 && in_array($u->getUserID(),$memberBusinessName == $cat)) { ?>
<!-- Display page list code here -->

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.