<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="sidebar_column" active="1">
	<title>القائمة الجانبية</title>
	<description>تطوير VietVbb-Team .. تعريب WebCraker من الدعم العربى التطويرى</description>
	<version>3.8.002</version>
	<url />
	<versioncheckurl />
	<dependencies>
		<dependency dependencytype="vbulletin" minversion="3.7.0" maxversion="3.8.99" />
	</dependencies>
	<codes>
	</codes>
	<templates>
		<template name="sc_ads" templatetype="template" date="1234197480" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
		<td class="tcat"><strong>$vbphrase[sc_advertisement]</strong></td>
</tr>
</thead>
<tbody>
<tr>
	<td class="alt1">
            <div align="center">
			$vboptions[sc_ads_content]
            </div>
	</td>
</tr>
</tbody>
</table>
<br />]]></template>
		<template name="sc_avatar" templatetype="template" date="1234193274" username="noob" version=""><![CDATA[		<a href="$vboptions[bburl]/profile.php?do=editavatar">$sc_avatar</a>]]></template>
		<template name="sc_latest_threads" templatetype="template" date="1234194954" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
	<td class="tcat"><strong>$vbphrase[sc_latest_threads]</strong></td>
</tr>
</thead>
<tbody>
$v2b_sc_latest_threadsbits
</tbody>
</table>
<br />]]></template>
		<template name="sc_latest_threadsbits" templatetype="template" date="1234194922" username="noob" version=""><![CDATA[<tr>
    <td class="$class">
        <div class="smallfont"><a href="showthread.php?$session[sessionurl]t=$vietvbb_sclt[threadid]"><strong>$vietvbb_sclt[title]</strong></a></div>
<div class="smallfont">- $vbphrase[sclt_by] <a href="member.php?$session[sessionurl]u=$vietvbb_sclt[postuserid]">$vietvbb_sclt[postusername]</a></div>
    </td>
</tr>]]></template>
		<template name="sc_left_bottom" templatetype="template" date="1234179946" username="noob" version=""><![CDATA[</td>
</tr>
</table>
<br />]]></template>
		<template name="sc_left_top" templatetype="template" date="1234189123" username="noob" version=""><![CDATA[<br />
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr valign="top">
	<td width="$vboptions[sc_width]">
$sc_user
$sc_stats
$sc_latest_threads
$sc_poll
$sc_ads
$sc_links
	</td>
<td width="10">&nbsp;</td>
<td>]]></template>
		<template name="sc_links" templatetype="template" date="1234197528" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
		<td class="tcat"><strong>$vbphrase[sc_partner_links]</strong></td>
	</tr>
</thead>
<tbody>
<tr>
	<td class="alt1">
		<div align="center" class="smallfont">
		$vboptions[sc_links_content]
		</div>
	</td>
</tr>
</tbody>
</table>
<br />]]></template>
		<template name="sc_polloption" templatetype="template" date="1234168880" username="noob" version=""><![CDATA[<tr>
<td class="poll">
<label for="rb_optionnumber_$option[number]"><input type="radio" name="optionnumber" value="$option[number]" id="rb_optionnumber_$option[number]" />$option[question]</label></td>
</tr>]]></template>
		<template name="sc_polloptions_table" templatetype="template" date="1234200972" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat" align="right">
			<strong>$vbphrase[sc_poll]</strong>
		</td>
	</tr>
</thead>
<tbody>
<tr>
<td class="alt1" width="100%" style="padding:0px">
<form action="poll.php?do=pollvote&amp;pollid=$pollinfo[pollid]" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="pollvote" />
<input type="hidden" name="pollid" value="$pollinfo[pollid]" />
      <table cellpadding="1" cellspacing="2" border="0" width="100%">
        <tr class="alt2">
          <td class="smallfont" align="center"><a href="showthread.php?$session[sessionurl]t=$pollinfo[threadid]">$pollinfo[question]</a></td>
        </tr>
<if condition="$show['pollenddate']">
<tr>
	<td class="smallfont" align="center"><phrase 1="$pollenddate" 2="$pollendtime">$vbphrase[this_poll_will_close_on_x_at_y]</phrase></td>
</tr>
</if>
	<if condition="$show['publicwarning']">			
        <tr>
          <td class="smallfont" align="center">$vbphrase[public_poll_users_see_choices]</td>
        </tr>
</if>
$pollbits_sc
	<tr>
		<td align="center"><input type="submit" class="button" value="$vbphrase[vote_now]" /></td>
	</tr> 
      </table>
    </form>

  </td>
</tr>
</tbody>
</table><br />]]></template>
		<template name="sc_polloption_multiple" templatetype="template" date="1234168905" username="noob" version=""><![CDATA[<tr>
<td class="poll"><label for="cb_optionnumber_$option[number]"><input type="checkbox" name="optionnumber[$option[number]]" value="yes" id="cb_optionnumber_$option[number]" />$option[question]</label></td>
</tr>]]></template>
		<template name="sc_pollresult" templatetype="template" date="1234168938" username="noob" version=""><![CDATA[<tr>
	<td class="poll" colspan="2">
		<if condition="$option['uservote']">
			<em>$option[question]</em>
		<else />
			$option[question]
		</if>
		<if condition="$show['pollvoters']"><div class="alt2 smallfont" style="border:inset 1px; margin-top:$stylevar[cellpadding]px; padding:$stylevar[cellpadding]px">$names</div></if>
	</td>
</tr>
<tr>
<td class="nowrap" width="80%">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="nowrap" align="left">
<img src="$stylevar[imgdir_poll]/bar$option[graphicnumber]-$option[open].gif" alt="" width="3" height="10" /><img src="$stylevar[imgdir_poll]/bar$option[graphicnumber].gif" alt="" width="$option[percent]" height="10" /><img src="$stylevar[imgdir_poll]/bar$option[graphicnumber]-$option[close].gif" alt="" width="3" height="10" /><img src="$vboptions[cleargifurl]" alt="" width="$option[remainder]" height="10" /></td>
<td class="poll" align="right">$option[percent]%</td>
</tr></table>
</td>
</tr>]]></template>
		<template name="sc_pollresults_table" templatetype="template" date="1234168817" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat" align="left">
			<strong>$vbphrase[sc_poll]</strong>
		</td>
	</tr>
</thead>
<tr>
  <td class="alt1" width="100%" style="padding:0px">
<table cellpadding="2" cellspacing="0" border="0" width="100%">
        <tr class="alt2">
          <td class="smallfont" align="center"><a href="showthread.php?$session[sessionurl]t=$pollinfo[threadid]">$pollinfo[question]</a></td>
        </tr>
<if condition="$show['pollenddate']">
<tr class="alt2">
	<td class="smallfont" align="center" colspan="4"><phrase 1="$pollenddate" 2="$pollendtime">$vbphrase[this_poll_will_close_on_x_at_y]</phrase></td>
</tr>
</if>
$pollbits_sc
<tr>
	<td class="tfoot" colspan="4" align="center"><span class="smallfont"><if condition="$show['multiple']">$vbphrase[multiple_choice_poll] </if>$vbphrase[voters]: <strong>$pollinfo[numbervotes]</strong>. $pollstatus</span></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table><br />
]]></template>
		<template name="sc_poll_headinclude" templatetype="template" date="1234168853" username="noob" version=""><![CDATA[<style type="text/css">
.poll, td.poll a:link,td.poll a:visited,td.poll a:active, td.poll a{
	font: 10px Verdana, Arial, Helvetica, sans-serif;
	color: #000;
	text-decoration:none}
.nowrap{white-space:nowrap}
</style>]]></template>
		<template name="sc_right_bottom" templatetype="template" date="1234189144" username="noob" version=""><![CDATA[<td width="10">&nbsp;</td>
	<td width="$vboptions[sc_width]">
$sc_user
$sc_stats
$sc_latest_threads
$sc_poll
$sc_ads
$sc_links
	</td>
</tr>
</table>
<br />]]></template>
		<template name="sc_right_top" templatetype="template" date="1234179959" username="noob" version=""><![CDATA[<br />
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr valign="top">
	<td>]]></template>
		<template name="sc_stats" templatetype="template" date="1234192761" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
		<td class="tcat"><strong>$vbphrase[sc_stats]</strong></td>
	</tr>
</thead>
<tbody>
<tr>
		<td class="alt1" align="right">
		<div class="smallfont">
		<strong>$vbphrase[sc_members]:</strong> $numbermembers<br />
		<strong>$vbphrase[sc_threads]:</strong> $totalthreads<br />
		<strong>$vbphrase[sc_posts]:</strong> $totalposts<br />
                <strong>$vbphrase[sc_total_online]:</strong> $totalonline<br />
		<br />
		<strong>$vbphrase[sc_newest_member]:</strong> <a href="$vboptions[bburl]/member.php?u=$newuserid"><b>$newusername</b></a> 
		</div>
</tbody>
</table>
<br />]]></template>
		<template name="sc_user" templatetype="template" date="1234194294" username="noob" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
		<td class="tcat"><strong>$vbphrase[sc_user]</strong></td>
	</tr>
</thead>
<tbody>
<tr>
	<td class="alt1">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td style="padding: 10px 0px 10px 0px;" align="center">
$templates_hook[sc_avatar]
</td>
</tr>
<tr>
<td>
<if condition="$show['member']">
	<div class="smallfont">
		<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
		<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
		<if condition="$show['notifications']">
			<div><span id="notifications"><a href="usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> <strong>$notifications_total</strong></span></div>
			<if condition="$show['popups']">
				<script type="text/javascript"> vBmenu.register("notifications"); </script>
			<else />
				<script type="text/javascript" src="clientscript/vbulletin_notifications_nopopups.js?v=$vboptions[simpleversion]"></script>
				<script type="text/javascript"> vBulletin.register_control("vB_Notifications_NoPopups", "notifications");  </script>
			</if>
		<else /><if condition="$show['pmstats']">
			<div><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></div>
		</if></if>

		<if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>
	</div>
<else />
		<!-- login form -->
		<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
		<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
		<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
		<tr>
			<td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">$vbphrase[username]</label></td>
			<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
		</tr>
		<tr>
			<td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
			<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
		</tr>
		<tr>
<td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
			<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
		</tr>
		</table>
		<input type="hidden" name="s" value="$session[sessionhash]" />
		<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
		<input type="hidden" name="do" value="login" />
		<input type="hidden" name="vb_login_md5password" />
		<input type="hidden" name="vb_login_md5password_utf" />
		</form>
		<!-- / login form -->
</if>
</div>
</td>
</tr>
</table>
	</td>
</tr>
</tbody>
</table>
<br />]]></template>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[VietVBB.VN] - Sidebar Column Cache Templates]]></title>
			<hookname>cache_templates</hookname>
			<phpcode><![CDATA[if ($vbulletin->options['vietvbb_sc_on'])
	{
		$globaltemplates = array_merge($globaltemplates, array(
			'sc_ads',
			'sc_avatar',
			'sc_latest_threads',
			'sc_latest_threadsbits',
			'sc_left_bottom',
			'sc_left_top',
			'sc_links',
			'sc_polloption',
			'sc_polloptions_table',
			'sc_polloption_multiple',
			'sc_pollresult',
			'sc_pollresults_table',
			'sc_poll_headinclude',
			'sc_right_bottom',
			'sc_right_top',
			'sc_stats',
			'sc_user'
		));
	}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[VietVBB.VN] - Sidebar Column Parse Templates]]></title>
			<hookname>parse_templates</hookname>
			<phpcode><![CDATA[$sc_styleid = preg_split('#\s+#s', $vbulletin->options['vietvbb_sc_styleid'], -1, PREG_SPLIT_NO_EMPTY);
if ($vbulletin->options['vietvbb_sc_on'] AND in_array($style['styleid'],$sc_styleid) AND $vbulletin->options['vietvbb_sc_index'] == '1')
{
	if (THIS_SCRIPT=='index' AND $vbulletin->options['sc_lor'] == 1)
		{
				if ($vbulletin->options['vietvbb_scu_on'])
				{
					if ($vbulletin->options['vietvbb_scu_avatar'])
					{
						if ($vbulletin->userinfo['avatarid']) 
					{ 
						// using a predefined avatar 
						$avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . ""); 
						$avatarid = $avatar['avatarid']; 
						$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />"; 
					} 
					else 
					{ 
						// not using a predefined avatar, check for custom 
						if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . "")) 
						{ 
							// using a custom avatar 
							$navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&amp;dateline=" . $avatar['dateline'] . "";
							$sc_avatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
						} 
						else
						{ 
							// no avatar specified
							$noavatarurl = $vbulletin->options['default_noavatar_url'];
							$nouseavatarchecked = HTML_CHECKED; 
							$avatarchecked[0] = ''; 
							$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$noavatarurl\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
						} 
					} 
					eval('$templates_hook[sc_avatar] = "' . fetch_template('sc_avatar') . '";');
					}
				eval('$sc_user .="' . fetch_template('sc_user') . '";');
				}
				if ($vbulletin->options['vietvbb_scs_on'])
				{
				// forum stats start  
				$numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user");  
				$numbermembers = number_format($numbersmembers['users']);  
				$counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post"); 
				$totalposts=number_format($counter['posts']);  
				$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread"); 
				$totalthreads=number_format($countthreads['threads']);  
				// forum stats end  

				// total online start  
				$datecut = TIMENOW - $vbulletin->options['cookietimeout'];  
				$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");  
				$headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE " . TABLE_PREFIX . "session.userid>0 AND " . TABLE_PREFIX . "session.lastactivity>$datecut");  
				$headerguests=$headerguests[count];  
				$headerusers=$headerusers[count];  
				$totalonline=$headerguests+$headerusers;  
				// total online end 

				// get newest member name and userid start  
				$getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid=$numbersmembers[max]");  
				$newusername = $getnewestmember['username'];  
				$newuserid = $getnewestmember['userid'];  
				// get newest member name and userid end 
				eval('$sc_stats .="' . fetch_template('sc_stats') . '";');
				}
				if ($vbulletin->options['vietvbb_sclt_on'])
				{
						$v2b_rn = $vbulletin->options['vietvbb_sclt_rn'];
						$vietvbb_sclts = $vbulletin->db->query_read("
							SELECT threadid, title, dateline, lastpost, visible, open, postusername, postuserid	  
							FROM " . TABLE_PREFIX . "thread AS thread
							WHERE NOT ISNULL(threadid) AND forumid IN (".$vbulletin->options['vietvbb_sclt_forumid'].") AND visible = '1' AND open!='10'
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 1, "ORDER BY dateline DESC") . "
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 2, "ORDER BY lastpost DESC") . "
							LIMIT 0, $v2b_rn
							");
						$i = 0;
						while ($vietvbb_sclt = $db->fetch_array($vietvbb_sclts))	{
							$i++;
							if ($i%2==0) {$class='alt2';} else {$class='alt1';} 
							$vietvbb_sclt[title] = unhtmlspecialchars($vietvbb_sclt[title]);
							eval('$v2b_sc_latest_threadsbits .= "' . $vbulletin->templatecache['sc_latest_threadsbits'] . '";');
						}
						$db->free_result($vietvbb_sclts);
						eval('$sc_latest_threads .="' . fetch_template('sc_latest_threads') . '";');
				}
				if ($vbulletin->options['vietvbb_scp_on'])
				{
					if ($vbulletin->options['vietvbb_scp_display']==1)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;

					$pollid = $vbulletin->options['vietvbb_scp_forumid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, forumid, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.forumid IN ($pollid)
						ORDER BY thread.threadid DESC
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{	
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.forumid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
					elseif ($vbulletin->options['vietvbb_scp_display']==2)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;
					$pollid = $vbulletin->options['vietvbb_scp_threadid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.threadid IN ($pollid)
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.threadid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
				}
				if ($vbulletin->options['vietvbb_sca_on'])
				{
					eval('$sc_ads .= "' . fetch_template('sc_ads') . '";');
				}
				if ($vbulletin->options['vietvbb_scl_on'])
				{
					eval('$sc_links .= "' . fetch_template('sc_links') . '";');
				}
			$find1 = '$navbar';
			$vbulletin->templatecache['FORUMHOME'] = str_replace($find1,$find1.fetch_template('sc_left_top'),$vbulletin->templatecache['FORUMHOME']);
			$find2 = '<!-- / icons and login code -->';
			$vbulletin->templatecache['FORUMHOME'] = str_replace($find2,$find2.fetch_template('sc_left_bottom'),$vbulletin->templatecache['FORUMHOME']);
			$vbulletin->templatecache['headinclude'] .= $vbulletin->templatecache['sc_poll_headinclude'];
		}
	elseif (THIS_SCRIPT=='index' AND $vbulletin->options['sc_lor'] == 2)
		{
				if ($vbulletin->options['vietvbb_scu_on'])
				{
					if ($vbulletin->options['vietvbb_scu_avatar'])
					{
						if ($vbulletin->userinfo['avatarid']) 
					{ 
						// using a predefined avatar 
						$avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . ""); 
						$avatarid = $avatar['avatarid']; 
						$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />"; 
					} 
					else 
					{ 
						// not using a predefined avatar, check for custom 
						if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . "")) 
						{ 
							// using a custom avatar 
							$navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&amp;dateline=" . $avatar['dateline'] . "";
							$sc_avatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
						} 
						else
						{ 
							// no avatar specified 
							$noavatarurl = $vbulletin->options['default_noavatar_url'];
							$nouseavatarchecked = HTML_CHECKED; 
							$avatarchecked[0] = ''; 
							$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$noavatarurl\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
						} 
					} 
					eval('$templates_hook[sc_avatar] = "' . fetch_template('sc_avatar') . '";');
					}
				eval('$sc_user .="' . fetch_template('sc_user') . '";');
				}
				if ($vbulletin->options['vietvbb_scs_on'])
				{
				// forum stats start  
				$numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user");  
				$numbermembers = number_format($numbersmembers['users']);  
				$counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post"); 
				$totalposts=number_format($counter['posts']);  
				$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread"); 
				$totalthreads=number_format($countthreads['threads']);  
				// forum stats end  

				// total online start  
				$datecut = TIMENOW - $vbulletin->options['cookietimeout'];  
				$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");  
				$headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE " . TABLE_PREFIX . "session.userid>0 AND " . TABLE_PREFIX . "session.lastactivity>$datecut");  
				$headerguests=$headerguests[count];  
				$headerusers=$headerusers[count];  
				$totalonline=$headerguests+$headerusers;  
				// total online end 

				// get newest member name and userid start  
				$getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid=$numbersmembers[max]");  
				$newusername = $getnewestmember['username'];  
				$newuserid = $getnewestmember['userid'];  
				// get newest member name and userid end 
				eval('$sc_stats .="' . fetch_template('sc_stats') . '";');
				}
				if ($vbulletin->options['vietvbb_sclt_on'])
				{
						$v2b_rn = $vbulletin->options['vietvbb_sclt_rn'];
						$vietvbb_sclts = $vbulletin->db->query_read("
							SELECT threadid, title, dateline, lastpost, visible, open, postusername, postuserid	  
							FROM " . TABLE_PREFIX . "thread AS thread
							WHERE NOT ISNULL(threadid) AND forumid IN (".$vbulletin->options['vietvbb_sclt_forumid'].") AND visible = '1' AND open!='10'
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 1, "ORDER BY dateline DESC") . "
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 2, "ORDER BY lastpost DESC") . "
							LIMIT 0, $v2b_rn
							");
						$i = 0;
						while ($vietvbb_sclt = $db->fetch_array($vietvbb_sclts))	{
							$i++;
							if ($i%2==0) {$class='alt2';} else {$class='alt1';} 
							$vietvbb_sclt[title] = unhtmlspecialchars($vietvbb_sclt[title]);
							eval('$v2b_sc_latest_threadsbits .= "' . $vbulletin->templatecache['sc_latest_threadsbits'] . '";');
						}
						$db->free_result($vietvbb_sclts);
						eval('$sc_latest_threads .="' . fetch_template('sc_latest_threads') . '";');
				}
				if ($vbulletin->options['vietvbb_scp_on'])
				{
					if ($vbulletin->options['vietvbb_scp_display']==1)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;

					$pollid = $vbulletin->options['vietvbb_scp_forumid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, forumid, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.forumid IN ($pollid)
						ORDER BY thread.threadid DESC
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{	
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.forumid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
					elseif ($vbulletin->options['vietvbb_scp_display']==2)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;
					$pollid = $vbulletin->options['vietvbb_scp_threadid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.threadid IN ($pollid)
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.threadid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
				}
				if ($vbulletin->options['vietvbb_sca_on'])
				{
					eval('$sc_ads .= "' . fetch_template('sc_ads') . '";');
				}
				if ($vbulletin->options['vietvbb_scl_on'])
				{
					eval('$sc_links .= "' . fetch_template('sc_links') . '";');
				}
				$find1 = '$navbar';
				$vbulletin->templatecache['FORUMHOME'] = str_replace($find1,$find1.fetch_template('sc_right_top'),$vbulletin->templatecache['FORUMHOME']);
				$find2 = '<!-- / icons and login code -->';
				$vbulletin->templatecache['FORUMHOME'] = str_replace($find2,$find2.fetch_template('sc_right_bottom'),$vbulletin->templatecache['FORUMHOME']);
				$vbulletin->templatecache['headinclude'] .= $vbulletin->templatecache['sc_poll_headinclude'];
		}
}
elseif ($vbulletin->options['vietvbb_sc_on']  AND in_array($style['styleid'],$sc_styleid) AND $vbulletin->options['vietvbb_sc_index'] == '2')
{
	if ($vbulletin->options['sc_lor'] == 1)
		{
				if ($vbulletin->options['vietvbb_scu_on'])
				{
					if ($vbulletin->options['vietvbb_scu_avatar'])
					{
						if ($vbulletin->userinfo['avatarid']) 
					{ 
						// using a predefined avatar 
						$avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . ""); 
						$avatarid = $avatar['avatarid']; 
						$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />"; 
					} 
					else 
					{ 
						// not using a predefined avatar, check for custom 
						if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . "")) 
						{ 
							// using a custom avatar 
							$navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&amp;dateline=" . $avatar['dateline'] . "";
							$sc_avatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
						} 
						else
						{ 
							// no avatar specified 
							$noavatarurl = $vbulletin->options['default_noavatar_url'];
							$nouseavatarchecked = HTML_CHECKED; 
							$avatarchecked[0] = ''; 
							$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$noavatarurl\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
						} 
					} 
					eval('$templates_hook[sc_avatar] = "' . fetch_template('sc_avatar') . '";');
					}
				eval('$sc_user .="' . fetch_template('sc_user') . '";');
				}
				if ($vbulletin->options['vietvbb_scs_on'])
				{
				// forum stats start  
				$numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user");  
				$numbermembers = number_format($numbersmembers['users']);  
				$counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post"); 
				$totalposts=number_format($counter['posts']);  
				$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread"); 
				$totalthreads=number_format($countthreads['threads']);  
				// forum stats end  

				// total online start  
				$datecut = TIMENOW - $vbulletin->options['cookietimeout'];  
				$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");  
				$headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE " . TABLE_PREFIX . "session.userid>0 AND " . TABLE_PREFIX . "session.lastactivity>$datecut");  
				$headerguests=$headerguests[count];  
				$headerusers=$headerusers[count];  
				$totalonline=$headerguests+$headerusers;  
				// total online end 

				// get newest member name and userid start  
				$getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid=$numbersmembers[max]");  
				$newusername = $getnewestmember['username'];  
				$newuserid = $getnewestmember['userid'];  
				// get newest member name and userid end 
				eval('$sc_stats .="' . fetch_template('sc_stats') . '";');
				}
				if ($vbulletin->options['vietvbb_sclt_on'])
				{
						$v2b_rn = $vbulletin->options['vietvbb_sclt_rn'];
						$vietvbb_sclts = $vbulletin->db->query_read("
							SELECT threadid, title, dateline, lastpost, visible, open, postusername, postuserid	  
							FROM " . TABLE_PREFIX . "thread AS thread
							WHERE NOT ISNULL(threadid) AND forumid IN (".$vbulletin->options['vietvbb_sclt_forumid'].") AND visible = '1' AND open!='10'
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 1, "ORDER BY dateline DESC") . "
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 2, "ORDER BY lastpost DESC") . "
							LIMIT 0, $v2b_rn
							");
						$i = 0;
						while ($vietvbb_sclt = $db->fetch_array($vietvbb_sclts))	{
							$i++;
							if ($i%2==0) {$class='alt2';} else {$class='alt1';} 
							$vietvbb_sclt[title] = unhtmlspecialchars($vietvbb_sclt[title]);
							eval('$v2b_sc_latest_threadsbits .= "' . $vbulletin->templatecache['sc_latest_threadsbits'] . '";');
						}
						$db->free_result($vietvbb_sclts);
						eval('$sc_latest_threads .="' . fetch_template('sc_latest_threads') . '";');
				}
				if ($vbulletin->options['vietvbb_scp_on'])
				{
					if ($vbulletin->options['vietvbb_scp_display']==1)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;

					$pollid = $vbulletin->options['vietvbb_scp_forumid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, forumid, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.forumid IN ($pollid)
						ORDER BY thread.threadid DESC
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{	
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.forumid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
					elseif ($vbulletin->options['vietvbb_scp_display']==2)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;
					$pollid = $vbulletin->options['vietvbb_scp_threadid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.threadid IN ($pollid)
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.threadid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
				}
				if ($vbulletin->options['vietvbb_sca_on'])
				{
					eval('$sc_ads .= "' . fetch_template('sc_ads') . '";');
				}
				if ($vbulletin->options['vietvbb_scl_on'])
				{
					eval('$sc_links .= "' . fetch_template('sc_links') . '";');
				}
				$find1 = '$ad_location[ad_navbar_below]';
				$vbulletin->templatecache['navbar'] = str_replace($find1,$find1.fetch_template('sc_left_top'),$vbulletin->templatecache['navbar']);
				$find2 = '$ad_location[ad_footer_start]';
				$vbulletin->templatecache['footer'] = str_replace($find2,$find2.fetch_template('sc_left_bottom'),$vbulletin->templatecache['footer']);
				$vbulletin->templatecache['headinclude'] .= $vbulletin->templatecache['sc_poll_headinclude'];
		}
	elseif ($vbulletin->options['sc_lor'] == 2)
		{
				if ($vbulletin->options['vietvbb_scu_on'])
				{
					if ($vbulletin->options['vietvbb_scu_avatar'])
					{
						if ($vbulletin->userinfo['avatarid']) 
					{ 
						// using a predefined avatar 
						$avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . ""); 
						$avatarid = $avatar['avatarid']; 
						$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />"; 
					} 
					else 
					{ 
						// not using a predefined avatar, check for custom 
						if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . "")) 
						{ 
							// using a custom avatar 
							$navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&amp;dateline=" . $avatar['dateline'] . "";
							$sc_avatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
						} 
						else
						{ 
							// no avatar specified 
							$noavatarurl = $vbulletin->options['default_noavatar_url'];
							$nouseavatarchecked = HTML_CHECKED; 
							$avatarchecked[0] = ''; 
							$sc_avatar = "<img src=\"" . $vbulletin->options[bburl] . "/$noavatarurl\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
						} 
					} 
					eval('$templates_hook[sc_avatar] = "' . fetch_template('sc_avatar') . '";');
					}
				eval('$sc_user .="' . fetch_template('sc_user') . '";');
				}
				if ($vbulletin->options['vietvbb_scs_on'])
				{
				// forum stats start  
				$numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user");  
				$numbermembers = number_format($numbersmembers['users']);  
				$counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post"); 
				$totalposts=number_format($counter['posts']);  
				$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread"); 
				$totalthreads=number_format($countthreads['threads']);  
				// forum stats end  

				// total online start  
				$datecut = TIMENOW - $vbulletin->options['cookietimeout'];  
				$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");  
				$headerusers=$db->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " . TABLE_PREFIX . "session WHERE " . TABLE_PREFIX . "session.userid>0 AND " . TABLE_PREFIX . "session.lastactivity>$datecut");  
				$headerguests=$headerguests[count];  
				$headerusers=$headerusers[count];  
				$totalonline=$headerguests+$headerusers;  
				// total online end 

				// get newest member name and userid start  
				$getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid=$numbersmembers[max]");  
				$newusername = $getnewestmember['username'];  
				$newuserid = $getnewestmember['userid'];  
				// get newest member name and userid end 
				eval('$sc_stats .="' . fetch_template('sc_stats') . '";');
				}
				if ($vbulletin->options['vietvbb_sclt_on'])
				{
						$v2b_rn = $vbulletin->options['vietvbb_sclt_rn'];
						$vietvbb_sclts = $vbulletin->db->query_read("
							SELECT threadid, title, dateline, lastpost, visible, open, postusername, postuserid	  
							FROM " . TABLE_PREFIX . "thread AS thread
							WHERE NOT ISNULL(threadid) AND forumid IN (".$vbulletin->options['vietvbb_sclt_forumid'].") AND visible = '1' AND open!='10'
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 1, "ORDER BY dateline DESC") . "
							" . iif($vbulletin->options['vietvbb_sclt_order'] == 2, "ORDER BY lastpost DESC") . "
							LIMIT 0, $v2b_rn
							");
						$i = 0;
						while ($vietvbb_sclt = $db->fetch_array($vietvbb_sclts))	{
							$i++;
							if ($i%2==0) {$class='alt2';} else {$class='alt1';} 
							$vietvbb_sclt[title] = unhtmlspecialchars($vietvbb_sclt[title]);
							eval('$v2b_sc_latest_threadsbits .= "' . $vbulletin->templatecache['sc_latest_threadsbits'] . '";');
						}
						$db->free_result($vietvbb_sclts);
						eval('$sc_latest_threads .="' . fetch_template('sc_latest_threads') . '";');
				}
				if ($vbulletin->options['vietvbb_scp_on'])
				{
					if ($vbulletin->options['vietvbb_scp_display']==1)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;

					$pollid = $vbulletin->options['vietvbb_scp_forumid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, forumid, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.forumid IN ($pollid)
						ORDER BY thread.threadid DESC
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{	
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.forumid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
					elseif ($vbulletin->options['vietvbb_scp_display']==2)
					{
					$sc_poll = '';
					$pollbits_sc = '';
					$counter = 1;
					$pollid = $vbulletin->options['vietvbb_scp_threadid'];

					$pollinfo = $db->query_first("
						SELECT thread.pollid, open, thread.threadid, replycount, question, poll.dateline, options, votes, active, numberoptions, timeout, multiple, voters, public
						FROM " . TABLE_PREFIX . "poll AS poll
						INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
						WHERE thread.threadid IN ($pollid)
						LIMIT 1
					");
					require_once(DIR . '/includes/class_bbcode.php');
					$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
					$pollinfo['question'] = $parser->do_parse($pollinfo['question'], 0, 1, 1, 1, 1);
					$pollinfo['option'] = $parser->do_parse($pollinfo['option'], 0, 1, 1, 1, 1);

					$splitoptions = explode('|||', $pollinfo['options']);
					$splitvotes = explode('|||', $pollinfo['votes']);
					$splitoptions[0]."<br>".$splitoptions[1];
					$showresults = 0;
					$uservoted = 0;
					if (!$pollinfo['active'] OR ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW AND $pollinfo['timeout'] != 0))
					{
						$showresults = 1;
					}
					else
					{
						$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
						if ($voted)
						{
							$uservoted = 1;
						}
					}

					if ($pollinfo['timeout'] AND !$showresults)
					{
						$pollendtime = vbdate($vbulletin->options['timeformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$pollenddate = vbdate($vbulletin->options['dateformat'], $pollinfo['dateline'] + ($pollinfo['timeout'] * 86400));
						$show['pollenddate'] = true;
					}
					else
					{
						$show['pollenddate'] = false;
					}

					foreach ($splitvotes AS $index => $value)
					{
						$pollinfo['numbervotes'] += $value;
					}

					if ($vbulletin->userinfo['userid'] > 0 AND $pollinfo['numbervotes'] > 0)
					{
						$pollvotes = $db->query_read("
							SELECT voteoption
							FROM " . TABLE_PREFIX . "pollvote
							INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (pollid)
							WHERE userid = " . $vbulletin->userinfo['userid'] . " AND thread.threadid IN ($pollid)
						");
						if ($db->num_rows($pollvotes) > 0)
						{
							$uservoted = 1;
						}
					}

					if ($showresults OR $uservoted)
					{
						if ($uservoted)
						{
							$uservote = array();
							while ($pollvote = $db->fetch_array($pollvotes))
							{
								$uservote["$pollvote[voteoption]"] = 1;
							}
						}
					}
					$option['open'] = $stylevar['left'][0];
					$option['close'] = $stylevar['right'][0];

					foreach ($splitvotes AS $index => $value)
					{
						$arrayindex = $index + 1;
						$option['uservote'] = iif($uservote["$arrayindex"], true, false);
						$option['question'] = $parser->do_parse($splitoptions["$index"], $forum['forumid'], true);

						if ($pollinfo['public'] AND $value)
						{
							$option['votes'] = '<a href="poll.php?' . $vbulletin->session->vars['sessionurl'] . 'do=showresults&amp;pollid=' . $pollinfo['pollid'] . '">' . $value . '</a>';
						}
						else
						{
							$option['votes'] = $value;
						}

						$option['number'] = $counter;

						if ($showresults OR $uservoted)
						{

							if ($value <= 0)
							{
								$option['percent'] = 0;
							}
							else {
								$option['percent'] = vb_number_format(($value < $pollinfo['numbervotes']) ? $value / $pollinfo['numbervotes'] * 100 : 100, 2);
							}

							$option['graphicnumber'] = $option['number'] % 6 + 1;
							$option['barnumber'] = round($option['percent']) * 2;

							if ($nopermission)
							{
								$pollstatus = $vbphrase['you_may_not_vote_on_this_poll'];
							}
							else if ($showresults)
							{
								$pollstatus = $vbphrase['this_poll_is_closed'];
							}
							else if ($uservoted)
							{
								$pollstatus = $vbphrase['you_have_already_voted_on_this_poll'];
							}
							eval('$pollbits_sc .= "' . fetch_template('sc_pollresult') . '";');
						}
						else
						{

							if ($pollinfo['multiple'])
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption_multiple') . '";');
							}
							else
							{
								eval('$pollbits_sc .= "' . fetch_template('sc_polloption') . '";');
							}
						}
						$counter++;
					}
					if ($pollinfo['multiple'])
					{
						$pollinfo['numbervotes'] = $pollinfo['voters'];
						$show['multiple'] = true;
					}

					if ($pollinfo['public'])
					{
						$show['publicwarning'] = true;
					}
					else
					{
						$show['publicwarning'] = false;
					}
					if ($showresults OR $uservoted)
					{
						eval('$sc_poll .= "' . fetch_template('sc_pollresults_table') . '";');
					}
					else
					{
						eval('$sc_poll .= "' . fetch_template('sc_polloptions_table') . '";');
					}
				 
					$voted = intval(fetch_bbarray_cookie('poll_voted', $pollid));
					}
				}
				if ($vbulletin->options['vietvbb_sca_on'])
				{
					eval('$sc_ads .= "' . fetch_template('sc_ads') . '";');
				}
				if ($vbulletin->options['vietvbb_scl_on'])
				{
					eval('$sc_links .= "' . fetch_template('sc_links') . '";');
				}
				$find1 = '$ad_location[ad_navbar_below]';
				$vbulletin->templatecache['navbar'] = str_replace($find1,$find1.fetch_template('sc_right_top'),$vbulletin->templatecache['navbar']);
				$find2 = '$ad_location[ad_footer_start]';
				$vbulletin->templatecache['footer'] = str_replace($find2,$find2.fetch_template('sc_right_bottom'),$vbulletin->templatecache['footer']);
				$vbulletin->templatecache['headinclude'] .= $vbulletin->templatecache['sc_poll_headinclude'];
		}
}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title><![CDATA[[VietVBB.VN] - Sidebar Column Template Groups]]></title>
			<hookname>template_groups</hookname>
			<phpcode><![CDATA[$only['sc_'] = 'Sidebar Column';]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
		<phrasetype name="GLOBAL" fieldname="global">
			<phrase name="sc_advertisement" date="1234199687" username="noob" version=""><![CDATA[إعلانات]]></phrase>
			<phrase name="sc_latest_threads" date="1234194820" username="noob" version=""><![CDATA[أخر الموضوعات]]></phrase>
			<phrase name="sc_members" date="1234192495" username="noob" version=""><![CDATA[الأعضاء]]></phrase>
			<phrase name="sc_newest_member" date="1234191874" username="noob" version=""><![CDATA[نرحب بالعضو]]></phrase>
			<phrase name="sc_partner_links" date="1234199711" username="noob" version=""><![CDATA[لوحة اعلانية]]></phrase>
			<phrase name="sc_poll" date="1234202656" username="noob" version=""><![CDATA[استطلاع]]></phrase>
			<phrase name="sc_posts" date="1234191834" username="noob" version=""><![CDATA[المشاركات]]></phrase>
			<phrase name="sc_stats" date="1234191743" username="noob" version=""><![CDATA[احصائيات المنتدى]]></phrase>
			<phrase name="sc_threads" date="1234191817" username="noob" version=""><![CDATA[الموضوعات]]></phrase>
			<phrase name="sc_total_online" date="1234191850" username="noob" version=""><![CDATA[المتواجدين الآن]]></phrase>
			<phrase name="sc_user" date="1234193377" username="noob" version=""><![CDATA[معلومات العضو]]></phrase>
			<phrase name="sclt_by" date="1234194937" username="noob" version=""><![CDATA[بواسطة]]></phrase>
			<phrase name="yes_sc_allpages" date="1321151674" username="WebCraker" version="3.8.002"><![CDATA[كافة الصفحات]]></phrase>
			<phrase name="yes_sc_index" date="1321151644" username="WebCraker" version="3.8.002"><![CDATA[الرئيسية فقط]]></phrase>
			<phrase name="yes_sc_left" date="1321151772" username="WebCraker" version="3.8.002"><![CDATA[يسار]]></phrase>
			<phrase name="yes_sc_right" date="1321151778" username="WebCraker" version="3.8.002"><![CDATA[يمين]]></phrase>
		</phrasetype>
		<phrasetype name="vBulletin Settings" fieldname="vbsettings">
			<phrase name="setting_Arabization2011_desc" date="1321153113" username="WebCraker" version="3.8.002"><![CDATA[برمجة : <a href="http://www.vbulletin.org/forum/member.php?u=140639" target="_new">ry215</a> .. <br />
تعريب : <a href="http://www.support-ar.com/vb/member.php?u=4" target="_new">WebCraker</a> ..<br />]]></phrase>
			<phrase name="setting_Arabization2011_title" date="1321153113" username="WebCraker" version="3.8.002"><![CDATA[الحقوق التطويرية ©]]></phrase>
			<phrase name="setting_default_noavatar_url_desc" date="1321151971" username="WebCraker" version="3.8.002"><![CDATA[اكتب مسار رابط الصورة المراد وضعها للأعضاء بدون صورة رمزية.]]></phrase>
			<phrase name="setting_default_noavatar_url_title" date="1321151971" username="WebCraker" version="3.8.002"><![CDATA[رابط عدم وجود صورة رمزية]]></phrase>
			<phrase name="setting_sc_ads_content_desc" date="1321152679" username="WebCraker" version="3.8.002"><![CDATA[ضع اعلاناتك هنا.<br />
ملاحظة : يمكنك استخدام HTML]]></phrase>
			<phrase name="setting_sc_ads_content_title" date="1321152679" username="WebCraker" version="3.8.002"><![CDATA[محتوى اعلانى]]></phrase>
			<phrase name="setting_sc_links_content_desc" date="1321152812" username="WebCraker" version="3.8.002"><![CDATA[ضع اعلاناتك هنا.
ملاحظة : يمكنك استخدام HTML]]></phrase>
			<phrase name="setting_sc_links_content_title" date="1321152812" username="WebCraker" version="3.8.002"><![CDATA[محتوى اعلانى 2]]></phrase>
			<phrase name="setting_sc_lor_desc" date="1321153192" username="WebCraker" version="3.8.002"><![CDATA[اذا اردت عرض القائمة على اليسار اختر "يسار".<br />
اذا اردت عرض القائمة على اليمين اختر "يمين".]]></phrase>
			<phrase name="setting_sc_lor_title" date="1321153192" username="WebCraker" version="3.8.002"><![CDATA[يمين او يسار؟]]></phrase>
			<phrase name="setting_sc_width_desc" date="1321151869" username="WebCraker" version="3.8.002"><![CDATA[اكتب عرض القائمة بالبكسل]]></phrase>
			<phrase name="setting_sc_width_title" date="1321151869" username="WebCraker" version="3.8.002"><![CDATA[عرض القائمة]]></phrase>
			<phrase name="setting_vietvbb_sc_index_desc" date="1321151611" username="WebCraker" version="3.8.002"><![CDATA[إذا اردت ان يعمل الهاك بالصفحة الرئيسية فقط اختر "الرئيسية فقط". <br />
إذا اردت ان يعمل الهاك بكافة الصفحات اختر "كل الصفحات".]]></phrase>
			<phrase name="setting_vietvbb_sc_index_title" date="1321151611" username="WebCraker" version="3.8.002"><![CDATA[الصفحة الرئيسية او كل الصفحات؟]]></phrase>
			<phrase name="setting_vietvbb_sc_on_desc" date="1321151498" username="WebCraker" version="3.8.002"><![CDATA[استخدم هذا الخيار لتفعيل او عدم تفعيل عمل الهاك. اختر "<b>نعم</b>" لتفعيل الهاك]]></phrase>
			<phrase name="setting_vietvbb_sc_on_title" date="1321151498" username="WebCraker" version="3.8.002"><![CDATA[تفعيل الهاك]]></phrase>
			<phrase name="setting_vietvbb_sc_styleid_desc" date="1321151847" username="WebCraker" version="3.8.002"><![CDATA[اكتب ارقام الاستايلات التى تريد استخدامها لهذا الهاك.<br> اكتب الارقام مفصوله بمسافة مثال: 1 3 28 35]]></phrase>
			<phrase name="setting_vietvbb_sc_styleid_title" date="1321151847" username="WebCraker" version="3.8.002"><![CDATA[أرقام الاستايلات]]></phrase>
			<phrase name="setting_vietvbb_sca_on_desc" date="1321152616" username="WebCraker" version="3.8.002"><![CDATA[هذا الخيار يتيح لك عرض اعلانات]]></phrase>
			<phrase name="setting_vietvbb_sca_on_title" date="1321152616" username="WebCraker" version="3.8.002"><![CDATA[عمود الاعلانات]]></phrase>
			<phrase name="setting_vietvbb_scl_on_desc" date="1321152840" username="WebCraker" version="3.8.002"><![CDATA[هذا الخيار يتيح لك عرض اعلانات]]></phrase>
			<phrase name="setting_vietvbb_scl_on_title" date="1321152840" username="WebCraker" version="3.8.002"><![CDATA[عمود الاعلانات 2]]></phrase>
			<phrase name="setting_vietvbb_sclt_forumid_desc" date="1321152187" username="WebCraker" version="3.8.002"><![CDATA[المنتديات المراد تضمينها بالعمود الجانبى. اكتب ارقام الاقسام مفصولا بفاصلة <br> مثال: 1,2,3,4]]></phrase>
			<phrase name="setting_vietvbb_sclt_forumid_title" date="1321152187" username="WebCraker" version="3.8.002"><![CDATA[أرقام المنتديات]]></phrase>
			<phrase name="setting_vietvbb_sclt_on_desc" date="1321152082" username="WebCraker" version="3.8.002"><![CDATA[هذا الخيار سوف يتيح امكانية عرض آخر المواضيع]]></phrase>
			<phrase name="setting_vietvbb_sclt_on_title" date="1321152082" username="WebCraker" version="3.8.002"><![CDATA[عمود اخر المواضيع؟]]></phrase>
			<phrase name="setting_vietvbb_sclt_order_desc" date="1321152509" username="WebCraker" version="3.8.002"><![CDATA[إذا اخترت الترتيب بواسطة "تاريخ الموضوع" سيتم عرض الموضوعات حسب تاريخ الموضوعات.<br>
إذا اخترت الترتيب بواسطة "تاريخ اخر مشاركة" سيتم عرض الموضوعات مرتبة حسب آخر رد.]]></phrase>
			<phrase name="setting_vietvbb_sclt_order_title" date="1321152509" username="WebCraker" version="3.8.002"><![CDATA[الترتيب بـ ؟]]></phrase>
			<phrase name="setting_vietvbb_sclt_rn_desc" date="1321152127" username="WebCraker" version="3.8.002"><![CDATA[عدد النتائج المراد عرضها بالعمود]]></phrase>
			<phrase name="setting_vietvbb_sclt_rn_title" date="1321152127" username="WebCraker" version="3.8.002"><![CDATA[عدد النتائج]]></phrase>
			<phrase name="setting_vietvbb_scp_display_desc" date="1321152552" username="WebCraker" version="3.8.002"><![CDATA[اختر رقم القسم او رقم الموضوع]]></phrase>
			<phrase name="setting_vietvbb_scp_display_title" date="1321152552" username="WebCraker" version="3.8.002"><![CDATA[رقم القسم او رقم الموضوع؟]]></phrase>
			<phrase name="setting_vietvbb_scp_forumid_desc" date="1321152367" username="WebCraker" version="3.8.002"><![CDATA[اذا قمت بأختيار الخيار بالاعلى, تفضل بكتابة رقم القسم.<br> والهاك سيقوم اوتوماتيكيا بجلب أخر استطلاع.]]></phrase>
			<phrase name="setting_vietvbb_scp_forumid_title" date="1321152367" username="WebCraker" version="3.8.002"><![CDATA[رقم المنتدى]]></phrase>
			<phrase name="setting_vietvbb_scp_on_desc" date="1321152291" username="WebCraker" version="3.8.002"><![CDATA[هذا الخيار يعرض استطلاع معين من منتدى او موضوع.]]></phrase>
			<phrase name="setting_vietvbb_scp_on_title" date="1321152291" username="WebCraker" version="3.8.002"><![CDATA[عمود الاستطلاع]]></phrase>
			<phrase name="setting_vietvbb_scp_threadid_desc" date="1321152583" username="WebCraker" version="3.8.002"><![CDATA[اذا اخترت من الخيار بالاعلى "رقم الموضوع" تفضل بكتابة رقم الموضوع هنا.]]></phrase>
			<phrase name="setting_vietvbb_scp_threadid_title" date="1321152583" username="WebCraker" version="3.8.002"><![CDATA[رقم الموضوع]]></phrase>
			<phrase name="setting_vietvbb_scs_on_desc" date="1321151997" username="WebCraker" version="3.8.002"><![CDATA[هذا الخيار سوف يظهر احصائيات المنتدى.]]></phrase>
			<phrase name="setting_vietvbb_scs_on_title" date="1321151997" username="WebCraker" version="3.8.002"><![CDATA[عمود احصائيات المنتدى؟]]></phrase>
			<phrase name="setting_vietvbb_scu_avatar_desc" date="1321151933" username="WebCraker" version="3.8.002"><![CDATA[هل تريد عرض الصورة الرمزية للعضو ؟]]></phrase>
			<phrase name="setting_vietvbb_scu_avatar_title" date="1321151933" username="WebCraker" version="3.8.002"><![CDATA[عرض الصورة الرمزية للعضو؟]]></phrase>
			<phrase name="setting_vietvbb_scu_on_desc" date="1321151903" username="WebCraker" version="3.8.002"><![CDATA[هذا الخيار يعرض معلومات الأعضاء.]]></phrase>
			<phrase name="setting_vietvbb_scu_on_title" date="1321151903" username="WebCraker" version="3.8.002"><![CDATA[عمود العضو؟]]></phrase>
			<phrase name="settinggroup_sidebar_column" date="1321151443" username="WebCraker" version="3.8.002"><![CDATA[اعدادات القوائم الجانبية]]></phrase>
		</phrasetype>
	</phrases>
	<options>
		<settinggroup name="sidebar_column" displayorder="65535">
			<setting varname="vietvbb_sc_on" displayorder="10">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_sc_index" displayorder="20">
				<datatype>free</datatype>
				<optioncode>radio:piped
1|yes_sc_index
2|yes_sc_allpages</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="sc_lor" displayorder="30">
				<datatype>free</datatype>
				<optioncode>radio:piped
1|يمين
2|يسار</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_sc_styleid" displayorder="35">
				<datatype>free</datatype>
				<validationcode><![CDATA[return (preg_match('#^(\d+ *)*$#', $data) > 0);]]></validationcode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="sc_width" displayorder="40">
				<datatype>number</datatype>
				<defaultvalue>180</defaultvalue>
			</setting>
			<setting varname="vietvbb_scu_on" displayorder="50">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_scu_avatar" displayorder="60">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="default_noavatar_url" displayorder="65">
				<datatype>free</datatype>
				<defaultvalue>images/avatars/noavatar.jpg</defaultvalue>
			</setting>
			<setting varname="vietvbb_scs_on" displayorder="70">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_sclt_on" displayorder="80">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_sclt_rn" displayorder="90">
				<datatype>number</datatype>
				<defaultvalue>5</defaultvalue>
			</setting>
			<setting varname="vietvbb_sclt_forumid" displayorder="100">
				<datatype>free</datatype>
				<defaultvalue>1,2,3</defaultvalue>
			</setting>
			<setting varname="vietvbb_sclt_order" displayorder="110">
				<datatype>free</datatype>
				<optioncode>radio:piped
1|تاريخ الموضوع
2|تاريخ اخر مشاركة</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_scp_on" displayorder="120">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_scp_display" displayorder="130">
				<datatype>free</datatype>
				<optioncode>radio:piped
1|رقم القسم
2|رقم الموضوع</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_scp_forumid" displayorder="140">
				<datatype>number</datatype>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_scp_threadid" displayorder="150">
				<datatype>number</datatype>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="vietvbb_sca_on" displayorder="160">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="sc_ads_content" displayorder="170">
				<datatype>free</datatype>
				<optioncode>textarea</optioncode>
				<defaultvalue><![CDATA[<a href="http://www.support-ar.com/">الدعم العربى التطويرى</a>]]></defaultvalue>
			</setting>
			<setting varname="vietvbb_scl_on" displayorder="180">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="sc_links_content" displayorder="190">
				<datatype>free</datatype>
				<optioncode>textarea</optioncode>
				<defaultvalue><![CDATA[<a href="http://www.support-ar.com/">الدعم العربى التطويرى</a>]]></defaultvalue>
			</setting>
			<setting varname="Arabization2011" displayorder="200">
				<datatype>free</datatype>
				<optioncode> </optioncode>
			</setting>
		</settinggroup>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>
