I managed to get it to work. Here's how I did it (it may not be the optimal solution, but it seems to be working fine as far as I can tell):
Create a .php file with the following code and upload it to your /modules folder (I will call it recentlikes.php for reference here):Next, from your ACP, add the following template with the name vbseo_likes_widget (this template is missing from the 3x vBSEO XML import file, if you are running vB 4x, you will need to modify the existing template):PHP Code:<tr><td class="alt1"><span class="smallfont"><?php
if(VBSEO_ENABLED)
{
vbseo_extra_inc('ui');
echo vBSEO_UI::likes_block('latest');
}
?></span></td></tr>Note that this template code is only updated for the <else> block corresponding to the recent likes. If you want to build a module for top likes or whatever, you will need to edit the template accordingly.Code:<vb:each from="likes" key="l_contentid" value="post"> <if condition="$blocktype == 'topthread'"> <h5 class="widget_post_header"><a href="showthread.php?t=$post[threadid]" class="title">$post[title]</a></h5> <div class="meta"> $vbphrase[vbseo_liked]: $post[vbseo_likes] $vbphrase[vbseo_liked_times] </div> <elseif condition="$blocktype == 'toppost'" /> $vbphrase[vbseo_like_post] $vbphrase[vbseo_by] <a class="comments_member_avatar_link" href="member.php?u=$post[userid]">$post[username]</a> <h5 class="widget_post_header"><a href="showthread.php?p=$post[postid]" class="title">$post[title]</a></h5> <div class="meta"> $vbphrase[vbseo_liked]: $post[likes] $vbphrase[vbseo_liked_times] </div> <else /> <a href="$vboptions[bburl]/member.php?u=$post[l_from_userid]">$post[l_from_username]</a> likes <a href="$vboptions[bburl]/member.php?u=$post[to_userid]">$post[to_username]</a>'s post in: <h5><a href="$vboptions[bburl]/$post[url]" class="title">$post[gtitle]</a></h5> Liked $post[likedate] @ <span class="time">$post[liketime]</span> <hr /> </if> </vb:each>
Next, create a new vBA php module. Select recentlikes.php (or whatever you called it) from the list. Add vbseo_likes_widget to the Templates Used field. Select Yes to Clean file output. Save and add to a page to test.


48Likes
LinkBack URL
About LinkBacks






Reply With Quote

