KevinL |
05-08-2009 12:30 AM |
Well you have to define $spitblogs first, right? Right now it's being defined (or looking) for adv_portal_vb_blogs...or am I wrong?
--------------- Added [DATE]1241746362[/DATE] at [TIME]1241746362[/TIME] ---------------
Quote:
Originally Posted by RLShare
(Post 1806678)
You probably need to write the queries to grab the data from the DB and fill the varialbes, not just grab the template code.
|
Yeah thats what I was getting at :)
The queries that are in the file are:
Code:
//Latest Blogs
$latestblogs = $db->query("
SELECT blogid, blog.title, blog_user.title AS blogname, comments_visible, username, dateline, userid, views
FROM " . TABLE_PREFIX . "blog AS blog
LEFT JOIN " . TABLE_PREFIX . "blog_user AS blog_user ON blog_user.bloguserid=blog.userid
WHERE blog.state='visible' and blog.pending=0 and blog_user.options_guest=3
ORDER BY dateline DESC
LIMIT 10
");
while ($showblogs=$db->fetch_array($latestblogs))
{
$counter++;
$blog_userid = $showblogs['userid'];
$blogid = $showblogs['blogid'];
$blog_title = $showblogs['title'];
$blog_views = $showblogs['views'];
$blog_username = $showblogs['username'];
$blog_dateline = vbdate($vbulletin->options['dateformat'], $showblogs['dateline']);
$spitblogs_title .= "<a href=\"{$vbulletin->options[bburl]}/blog.php?b=$blogid\">$blog_title</a>";
$spitblogs_title .= "<br /> ";
$spitblogs_views .= $blog_views;
$spitblogs_views .= "<br /> ";
$spitblogs_username .= "<a href=\"{$vbulletin->options[bburl]}/blog.php?u=$blog_userid\">$blog_username</a>";
$spitblogs_username .= "<br /> ";
$spitblogs_date .= $blog_dateline;
$spitblogs_date .= "<br /> ";
$spitblogs .= "<img src=\"{$stylevar[imgdir_misc]}/blog/blog_icon.gif\"> <a href=\"{$vbulletin->options[bburl]}/blog.php?b=$blogid\">$blog_title</a><br />$blog_dateline by <a href=\"{$vbulletin->options[bburl]}/member.php?u=$blog_userid\">$blog_username</a><br />Viewed $blog_views times<br />";
if ($counter < 10)
{
$spitblogs .= "<br /> ";
}
}
//Latest Blogs
|