Lionel
09-10-2007, 11:39 PM
This is a very simple hack that will display the latest 5 entries in member info.
1- Create a template (replace blogs/ with your folder name) adv_dyna_last_entrybit<li><a class="smallfont" href="blogs/showentry.php?$session[sessionurl]?e=$lastentry[entryid]">$lastentry[title]</a> <span class="smallfont">($lastentry[entrydate])</span></li>2- Create a plugin at member_complete and put in there$who=$vbulletin->GPC['userid'];
$blogs= $db->query_read("SELECT * FROM " . TABLE_PREFIX . "_adv_dyna_entries WHERE userid='$who' AND valid='1' AND private='0' ORDER BY dateline DESC LIMIT 5");
if ($db->num_rows($blogs)==0)
{
$show['bloginfo'] = false;
}
else
{
$show['bloginfo'] = true;
while ($lastentry = $db->fetch_array($blogs))
{
$lastentry['entrydate']= vbdate($vbulletin->options['dateformat'] ,$lastentry['dateline'], 1);
eval('$last_five_entries .= "' . fetch_template('adv_dyna_last_entrybit') . '";');
}
}3-Finally, in memberinfo template (put in table as per your taste) add where you want to display it
<if condition="$show[bloginfo]">
<ul>$last_five_entries</ul>
</if>
1- Create a template (replace blogs/ with your folder name) adv_dyna_last_entrybit<li><a class="smallfont" href="blogs/showentry.php?$session[sessionurl]?e=$lastentry[entryid]">$lastentry[title]</a> <span class="smallfont">($lastentry[entrydate])</span></li>2- Create a plugin at member_complete and put in there$who=$vbulletin->GPC['userid'];
$blogs= $db->query_read("SELECT * FROM " . TABLE_PREFIX . "_adv_dyna_entries WHERE userid='$who' AND valid='1' AND private='0' ORDER BY dateline DESC LIMIT 5");
if ($db->num_rows($blogs)==0)
{
$show['bloginfo'] = false;
}
else
{
$show['bloginfo'] = true;
while ($lastentry = $db->fetch_array($blogs))
{
$lastentry['entrydate']= vbdate($vbulletin->options['dateformat'] ,$lastentry['dateline'], 1);
eval('$last_five_entries .= "' . fetch_template('adv_dyna_last_entrybit') . '";');
}
}3-Finally, in memberinfo template (put in table as per your taste) add where you want to display it
<if condition="$show[bloginfo]">
<ul>$last_five_entries</ul>
</if>