Enhanced Recent Threads Layout
See this post - >>
https://vborg.vbsupport.ru/showpost....5&postcount=29
** ADDITIONAL CONTENT FILES **
This Post will be used to identify member submitted content files and enhancements as well as additional content files that I release.
Attached to this Post:
**UPDATED** RECENT THREADS 09-01-2008 - tabrecentthreadsexp2.php - This file includes Post ICON Column and the ability to set a specific Thread Title Character cut off amount.
The UPDATE includes both database thread marking and cookie based thread marking. Various settings at the top of the file make install/Setup a breeze.
**UPDATED** RECENT THREADs with THUMBNAIL 09-01-2008 - tabthumbs.php - This file is the same as tabrecentthreadsexp2.php with the addition of displaying a thumbnail in place of the post ICON if there is a image attached to the first post. You can see an example of this @
www.veggieblogs.com specifically the RECIPES or Cookbooks Tabs.
The UPDATE includes both database thread marking and cookie based thread marking. Various settings at the top of the file make install/Setup a breeze.
NEW vB Blogs 02-07-2008 - tab_blog.php - This content file is for use with vbulletins blog system. It is a BASIC recent blogs layout. The File contains 2 Layout Styles (Wide and Small). Wide is the default. To use small (for skinny Tab Layouts) remark out the 2 Wide Layout Areas and uncomment out the 2 ALT Layout Areas. Both display Title, Name, Data and Views.
NEW vBa Links 02-08-2008 - tab_latestlinks.php & tab_latestlinksexp.php - These 2 files are for displaying data from vba links directory (you must have vba links installed for this to work)
Member Submitted Enhancements:
Date - Attachment name - Description - Member Name
NEW GARS 02-07-2008 -
https://vborg.vbsupport.ru/showpost....&postcount=113 - GARS Content File - ZiG
What to make your own?
Here is an example of how I replicate the User CP CMPS Block in a Tab
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tabwelcome'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array('TEST');
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
//require_once('./includes/vba_cmps_include_template.php');
require_once('./includes/vba_cmps_global.php');
require_once('./includes/functions_user.php');
require_once('./includes/functions_reputation.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
?>
<?php
//Get Avatar
$avatarurl = fetch_avatar_url($vbulletin->userinfo['userid']);
if ($avatarurl[0])
{
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
else
{
$avatarurl = "/forums/images/misc/noavatar.gif"; // ADD PATH TO THE LOCATION OF YOUR NO AVATAR image
}
//Get Rep Images
fetch_reputation_image($vbulletin->userinfo, $permissions);
//Get Rep Power
$reppower = vb_number_format(fetch_reppower($vbulletin->userinfo, $permissions));
//Get Rank Image
$vbulletin->userinfo['rank'] = str_replace('src="', 'src="' . $vbulletin->options['bburl'] . '/', $vbulletin->userinfo['rank']);
// New posts
if (strlen($vbulletin->session->vars['newposts']) > 0 AND !$vbulletin->options['threadmarking'])
{
$newposts = number_format($vbulletin->session->vars['newposts']);
}
else
{
$getnewposts = $db->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "post AS post
" . iif($vbulletin->options['threadmarking'],
'LEFT JOIN ' . TABLE_PREFIX . 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' . $vbulletin->userinfo['userid'] . ')') . "
WHERE dateline >= " . $vbulletin->userinfo['lastvisit'] .
iif($vbulletin->options['threadmarking'],
' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)') . "
AND visible = 1
");
if (!$vbulletin->options['threadmarking'])
{
$db->query_write("UPDATE " . TABLE_PREFIX . "session SET newposts = '$getnewposts[count]' WHERE userid = " . $vbulletin->userinfo['userid']);
}
$newposts = vb_number_format($getnewposts['count']);
}
//Get PM Quota, PM Total and PM Unread
$permissions['pmquota'] = vb_number_format($permissions['pmquota']);
$vbulletin->userinfo['pmtotal'] = vb_number_format($vbulletin->userinfo['pmtotal']);
$vbulletin->userinfo['pmunread'] = vb_number_format($vbulletin->userinfo['pmunread']);
//Echo Content into Tab Div
echo '<table border="0" cellpadding="6" cellspacing="1" class="tborder" width=100%>';
echo '<tr> <td class="alt1"><a href="/forums/profile.php?do=editavatar"><img src="'. $avatarurl . '" border="0" alt="Edit Avatar" /></a> </td> <td class="alt2" valign="top" width="100%"> <div class="smallfont" style="float:'. $stylevar[right] . '">Rep Power: ' . $reppower . ' <div align="' . $stylevar[right] . '" style="padding-bottom:' . $stylevar[cellpadding] .'px">' . $vbulletin->userinfo['reputationdisplay'] . '</div> <div align="' . $stylevar[right] . '" style="padding-top:' . $stylevar[cellpadding] . 'px; padding-bottom:' . $stylevar[cellpadding] . 'px">' . $vbulletin->userinfo['rank'] . '</div> </div> <span class="smallfont"> Welcome back <b>' . $vbulletin->userinfo['username'] . '</b><br /> You last visited: ' . $vbulletin->userinfo['lastvisitdate'] . '<br /> <a href="/forums/search.php?do=getnew">New Posts</a>: ' . $newposts . '<br /> <a href="/forums/login.php?' . $session[sessionurl] . 'do=logout&logouthash=' . $vbulletin->userinfo['logouthash'] . '">Log Out</a> </span></td></tr>';
// Echo Private Message portion of the User CP Block
echo '<tr> <td class="thead" colspan="2"><a href="/forums/private.php">Private Messages</a></td></tr>';
echo '<tr> <td class="alt1" colspan="2"><span class="smallfont">' . $vbulletin->userinfo['pmunread'] . ' New PMs. You have ' . $vbulletin->userinfo['pmtotal'] . ' total out of ' . $permissions['pmquota'] . ' allowed.</span></td></tr>';
// End Private Message portion of the User CP Block
echo "</table>";
// The below can be removed if you don't want the Horizontal Rule and additional space for adding some custom text/sitemessage/other code..
echo "<hr>";
echo '<table cellspacing="2" cellpadding="0" width=100%>';
echo '<tr> <td class="smallfont">THIS IS WHERE YOU CAN ADD A SITE MESSEAGE OR WHAT EVER... YOU CAN ALSO JUST GET RID OF IT AS WELL. SIMPLY COMMENT OUT OR REMOVE LINE 109 THRU 115... </td></tr>';
echo'</table>';
// End additional Comment area...
?>
...