<div id="selblogList">
	<div class="clsManageBlogHeading ">
		<div class="clsClearfix">
			<h2 id="selForumTitle" class="clsQuestionHeadingBlog clsFloatleft">
				{if $myobj->search_title.href }
					<a href="{$myobj->search_title.href}">{$myobj->search_title.href_text}</a> <span>{$myobj->search_title.page_title}</span>
				{else}
					{$myobj->search_title.page_title}
				{/if}
			</h2>
		{if isMember() && $myobj->getFormField('so') neq 'adv'}
		<div id="" class="clsBlogRight">
			<ul class="clsFloatright clsBlogListLinks">
				{if $CFG.admin.blogs_create.allowed}
				<li class="clsActiveBlogTopLink clsLastBlogInfo"><span><a href="{$myobj->getUrl('blogs')}">{$LANG.back_to_blog}</a></span></li>
				<li><span><a href="{$myobj->getUrl('manageblog')}">{$LANG.common_manage_blog}</a></span></li>
				<li><span><a href="{$myobj->getUrl('manageblog', '?add', '?add')}">{$LANG.common_add_blog}</a></span></li>
				{/if}
			</ul>
		</div>
		{/if}
	</div>
	</div>
<div class="clsBlogMain">
	  <!--rounded corners-->
 <div class="clsShadedBg">
	  <div class="lbtopanalyst">
	    <div class="rbtopanalyst">
	      <div class="bbtopanalyst">
	        <div class="blctopanalyst">
	          <div class="brctopanalyst">
	            <div class="tbtopanalyst">
	              <div class="tlctopanalyst">
	                <div class="trctopanalyst">
  	{include file='../general/information.tpl'}

  	{if $myobj->isShowPageBlock('form_advanced_search') }

					<form name="formAdvanceSearch" id="formAdvanceSearch" method="post" action="{$myobj->getUrl('blogs', '?so=adv', '?so=adv')}">
						<div id="moreSearchOptions">
							<table summary="{$LANG.common_displaying_more_search_options}" class="clsAskQuestion">
								<tr>
									<td class="{$myobj->getCSSFormLabelCellClass('subject')}">
										<label for="subject">{$LANG.common_subject}</label>
									</td>
									<td class="{$myobj->getCSSFormFieldCellClass('subject')}">
										{$myobj->getFormFieldErrorTip('subject')}
										<input type="text" class="clsCommonTextBox" name="subject" id="subject" value="{$myobj->getFormField('subject')}" tabindex="{smartyTabIndex}" />
									</td>
								</tr>
								<tr>
									<td class="{$myobj->getCSSFormLabelCellClass('dname')}">
										<label for="dname">{$LANG.search_username}</label>
									</td>
									<td class="{$myobj->getCSSFormFieldCellClass('dname')}">
										{$myobj->getFormFieldErrorTip('dname')}
										<p>
											<input type="text" class="clsCommonTextBox" name="dname" id="dname" value="{$myobj->getFormField('dname')}" tabindex="{smartyTabIndex}" />
										</p>
									</td>
								</tr>
								<tr>
									<td class="{$myobj->getCSSFormLabelCellClass('category')}">
										<label for="category">{$LANG.common_category}</label>
									</td>
									<td class="{$myobj->getCSSFormFieldCellClass('category')}">
										{$myobj->getFormFieldErrorTip('category')}
										<select class="clsCommonListBox" name="category" id="category" tabindex="{smartyTabIndex}">
			                				<option value="">{$LANG.blog_chose_category}</option>
			                				{$myobj->generalPopulateArray($myobj->form_advanced_search.populateCategories, $myobj->getFormField('category'))}
			                				{*
											{foreach key=catkey item=catvalue from=$myobj->form_advanced_search.populateCategories}
			                					<option value="{$catvalue.record.blog_category_id}" {$catvalue.selected}>{$catvalue.record.blog_category_name}</option>
			                				{/foreach}
			                				*}
			              				</select>
									</td>
								</tr>
								<tr>
									<td class="{$myobj->getCSSFormLabelCellClass('date_limits_to')}">
										<label for="date_limits_to">{$LANG.date_limits_to}</label>
									</td>
									<td class="{$myobj->getCSSFormFieldCellClass('date_limits_to')}">
										{$myobj->getFormFieldErrorTip('date_limits_to')}
										<select name="date_limits_to" id="date_limits_to" tabindex="{smartyTabIndex}">
											{$myobj->generalPopulateArray($myobj->searchOption_arr, $myobj->getFormField('date_limits_to'))}
										</select>
									</td>
								</tr>
								<tr>
								  <td  class="{$myobj->getCSSFormFieldCellClass('submitsearch')}">&nbsp;</td>
								  <td  class="{$myobj->getCSSFormFieldCellClass('submitsearch')}">
								  <div class="clsSubmitLeft">
									<div class="clsSubmitRight">
								  <input type="submit" class="clsSubmitButton" name="adv_search" id="adv_search" value="{$LANG.search}" tabindex="{smartyTabIndex}" />
								  </div></div>
								  </td>
							   </tr>

							</table>
						</div>
					</form>

		</div>
		{/if}
		{if $myobj->isShowPageBlock('selBlogsListBlock')}

			{if $myobj->isResultsFound()}
				<form name="blogsListForm" id="blogsListForm" method="post" action="{$myobj->getUrl('blogs')}" autocomplete="off">
					{if $CFG.admin.navigation.top }
						{include file='../general/pagination.tpl'}
					{/if}

					{foreach key=blog_key item=blog_details from=$myobj->selBlogsListBlock.showBlogsList}
						<div class="{$blog_details.clsOddOrEvenQuestion} clsBlogDisplay clsUserThumbDetails">
							<div class="clsUserDetails">
                            <p class="clsBlogLink"><a href="{$blog_details.blog_url}">{$blog_details.wrappedsubject}</a></p>
                            <p class="clsBlogContent">{$blog_details.wrappedmessage}</p>
							<div class="clsClearfix clsUserSubLinks">
									{if $blog_details.separator_class eq ''}
				               			<div class="clsUserUploaded clsNoLeftBgPadngMrgn">
											{if chkVideoModuleAllowed('blog') and $blog_details.record.video_id}
					                        	<a id="{$blog_details.ans_view_video.on_click}" href="{$blog_details.ans_view_video.url}" onClick="{$myobj->getBrowser($blog_details.ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusvideo.gif" alt="{$LANG.questions_video_available}" title="{$LANG.questions_video_available}" /></a>
					                    	{/if}
					                    	{if chkAudioModuleAllowed('blog') and $blog_details.record.audio_id}
					                        	<a id="{$blog_details.ans_view_audio.on_click}" href="{$blog_details.ans_view_audio.url}" onClick="{$myobj->getBrowser($blog_details.ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusaudio.gif" alt="{$LANG.common_audio_available}" title="{$LANG.common_audio_available}" /></a>
					                    	{/if}
					                    	{if chkExternalVideoModuleAllowed('blog') and $blog_details.record.external_video_id}
					                        	<a id="{$blog_details.ext_ans_view_video.on_click}" href="{$blog_details.ext_ans_view_video.url}" onClick="{$myobj->getBrowser($blog_details.ext_ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalvideo.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
					                    	{/if}
					                    	{if chkExternalAudioModuleAllowed('blog') and $blog_details.record.external_audio_id}
					                        	<a id="{$blog_details.ext_ans_view_audio.on_click}" href="{$blog_details.ext_ans_view_audio.url}" onClick="{$myobj->getBrowser($blog_details.ext_ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalaudio.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
					                    	{/if}
										</div>
									{/if}
									<div class="clsUserLinkBy {$blog_details.separator_class} clsNoBold">{$LANG.common_in}&nbsp;</div>
									<div class="clsUserCategoryBlog clsNoLeftBgPadngMrgn">
                                    	{$blog_details.blogcategoryname}
                                    </div>
									<div class="clsUserLinkBy">
                                    	{$LANG.common_comment_posted_by}{$LANG.common_title_seperator}
                                    </div>
                                    <div class="clsUserLinkImage">
                                    {if isUserImageAllowed() }
                                        <div class="">{$myobj->displayBlogUserSmallImage($blog_details.record)}</div>
                                    {/if}
                                    </div>
                                    <div class="clsUserLinkName clsNoLeftBgPadngMrgn">
                                        <a href="{$blog_details.user_url}">{$blog_details.strippedname}</a>
                                    </div>
								<div class="clsUserLinkViews">
									{$LANG.th_total_views}{$LANG.common_title_seperator}
									<b>{$blog_details.record.total_views}</b>
								</div>
								<div class="clsUserLinkDate">
									{$blog_details.record.date_added}
								</div>
                                </div>
                            </div>
						    <div class="clsBlogCount">
								<p class="clsLastBlogInfo">
									<span>{$blog_details.record.total_comments}</span>
									{$LANG.th_total_comments}
								</p>
								<!--<p>
									<span>{$blog_details.accept_comments_yes_no}</span>
									{$LANG.th_accept_comments}
								</p>-->
								{if $blog_details.record.accept_comments eq 'Yes'}
	                                <div class="clsPostCommentLeft">
										<div class="clsPostCommentRight">
	                                  	  <a href="{$blog_details.blog_post_url}#selAddComment">{$LANG.blogs_post_comments}</a>
	                                    </div>
	                                </div>
                                {else}
									<div class="clsBlogCommentNotAllow">{$LANG.blogs_comments_not_allowed}</div>
                                {/if}
							</div>
						</div>
    				{/foreach}
					{if $CFG.admin.navigation.bottom }
						{include file='../general/pagination.tpl'}
					{/if}
				</form>
		{else}
			<div id="selMsgAlert">
				{if $myobj->search_page}
				<p>{$myobj->site_name_manual}</p>
        		<p class="clsMsgAdditionalText">{$LANG.blogs_check_your_spelling}</p>
        		<p class="clsMsgAdditionalText"><a href="{$myobj->advanced_search_action}">{$LANG.blogs_click_here_tosearch}</a></p>
        		{else}
        			<p>{$LANG.blogs_not_found_error}</p>
        		{/if}
			</div>
		{/if}
	{/if}
                            	</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>