Forums

[resolved] [Plugin: Alkivia Open Community] How to include user's activity stream on the user profile ? (2 posts)

  1. kReEsTaL
    Member
    Posted 2 years ago #

    Hello :)

    I'm using AOC and so far it's been working great. Nice job !

    However, I cannot find the PHP function to include in order to display the user's activity steam on their profile.

    I set up my own author template (not using AOC's), and even though I check the userwall-default.php template, when I copy and paste its code into my own author.php file, I get the following error :

    Warning: Invalid argument supplied for foreach() in /homez.20/XXX/www/wp-content/themes/sandbox/author.php on line 167

    What's the PHP function I need to call in order to display the user's activity stream on his profile, please?

    Thanks a lot for your help.

    http://wordpress.org/extend/plugins/alkivia/

  2. kReEsTaL
    Member
    Posted 2 years ago #

    I think I found the solution in profile-wall.php:

    <div id="profile-right">
    		<ul>
    			<li><h2><?php _e('Activity Wall', $text_domain); ?></h2></li>
    			<li><ul id="wall">
    		    <?php if ( aoc_is_active('activity') ) :
    	    	        $items = aoc_get_wall_items($user->ID);
                        foreach ( $items as $item ) :
                            echo '<li><p>' . $item['avatar'];
                            echo '<span class="datetime">' . aoc_time_ago($item['date'], $text_domain) . '</span><br />' . $item['text'] . '</p></li>';
                        endforeach;
                    endif; ?>
    		    </ul></li>
    		</ul>
    	</div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags