Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Prev Previous Post   Next Post Next
  #1  
Old 10-10-2008, 12:58 AM
tuaguild's Avatar
tuaguild tuaguild is offline
 
Join Date: Dec 2007
Location: Memphis TN
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default pbwow search results page help

Code:
<!-- INCLUDE overall_header.html -->

<div class="clear" style="height:55px"></div>
<div id="searchshell">
<div id="searchborder">
	<div>
		<div>
			<div>
				<div>
					<div class="padding">
	<div class="searchbox" style="height:60px">
		<div class="listbox">
			<ul>
				<li class="icon"><img src="/images/icons/arrow.gif" border="0" alt="{L_RETURN_TO}: {SEARCH_TOPIC}" /></li>
				<li class="text" style="width:400px"><span><b><!-- IF SEARCH_TOPIC --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO}: {SEARCH_TOPIC}</a><!-- ELSE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_RETURN_TO_SEARCH_ADV}</a><!-- ENDIF --></b></span>				
				</li>
			</ul>
			<!-- IF SEARCH_IN_RESULTS -->
			<form method="post" action="{S_SEARCH_ACTION}">
			<input type="hidden" name="show_results" value="posts" />
			<ul style="padding-top:5px">
				<li class="icon"><img src="/images/icons/search-text.gif" border="0" alt="Search" /></li>
				<li class="text"><span><b>{L_SEARCH_IN_RESULTS}:</b></span>
				</li>
				
				<li><span><input type="text" name="add_keywords" id="add_keywords" size="40" value="{SEARCH_WORDS}" /></span>
				</li>
			</ul>
			<div style="position: relative; clear: both; width: 1px;"><input type="submit" name="submit" value="&nbsp;" style="position: absolute; top: -38px; left: 603px; background:url(/images/en_US/search-button.gif) no-repeat; height:42px; width:82px; border:none" /></div>
			</form>
			<!-- ENDIF -->
		</div>		
	</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</div>



<div id="cover" style="position:absolute; z-index:999999; top:0px; right:10px; width:300px; height:3000px; display:none; background-color:red;"></div>
<div id="topicheader">
	<div style="float: right;"> <a href="{U_INDEX}"><img src="/images/en_US/forum-index.gif" width="104" height="41" border="0" alt="" /></a> </div>
	<div id="topicview" style="margin-top: 14px;">
		<ul>
			<li><span title="Current time"><small><font color="white"><b>&nbsp;<!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --></b><!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --><!-- IF IGNORED_WORDS --> | {L_IGNORED_TERMS}: <strong>{IGNORED_WORDS}</strong><!-- ENDIF --> | {CURRENT_TIME_CLEAN}&nbsp;</font></small></span></li>
		</ul>
	</div>
</div>



<!-- IF .searchresults -->

	<div id="paging">
		<div class="lpage">
			<!-- IF PAGINATION or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->
				<!-- INCLUDE pbwow_pagination.html -->
			<!-- ENDIF -->	
		</div>
	</div>

	<!-- IF S_SHOW_TOPICS -->

	<div id="postbackground">
		<div class="right">
			<table width="90%" border="0" cellpadding="0" cellspacing="0" class="tableoutline" style="margin: 0 auto;">
				<tr>
					<td class="tableheader">
						<table cellspacing="0" cellpadding="0" border="0">
							<tr>
								<td><img src="/images/pixel.gif" border="0" width="1" height="22" alt="" /></td>
								<td style="padding: 0 0 0 5px;"><span> <a class="filter" href="#">{L_SUBJECT}</a></span></td>
							</tr>
						</table>
					</td>
					<td class="tableheader">
						<table cellspacing="0" cellpadding="0" border="0">
							<tr>
								<td><img src="/images/pixel.gif" border="0" width="1" height="22" alt="" /></td>
								<td style="padding: 0 0 0 5px;"><span> <a class="filter" href="#">{L_FORUM}</a></span></td>
							</tr>
						</table>
					</td>
					<td align="center" class="tableheader"><span> <a class="filter" href="#">{L_AUTHOR}</a></span></td>
					<td align="center" class="tableheader"><span> <a class="filter" href="#">{L_REPLIES}</a></span></td>
					<td align="center" class="tableheader"><span> <a class="filter" href="#">{L_VIEWS}</a></span></td>
					<td align="center" class="tableheader"><span> <a class="filter" href="#">{L_LAST_POST}</a></span></td>
					<td class="tableheader">
						<table cellspacing="0" cellpadding="0" border="0">
							<tr>
								<td><img src="/images/pixel.gif" border="0" width="1" height="22" alt="" /></td>
								<td style="padding: 0 0 0 5px;"><span> <a class="filter" href="#">{L_LAST_UPDATED}</a></span></td>
							</tr>
						</table>
					</td>
				</tr>

				<!-- BEGIN searchresults -->
				<tr class="rows">
					<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta2">
					<!-- ELSE --><td class="t2"><!-- ENDIF -->	
						<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED or searchresults.S_TOPIC_REPORTED or searchresults.ATTACH_ICON_IMG -->
							<div style="float:right; display:inline">
						<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a>&nbsp;<!-- ENDIF -->
						<!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}"><img src="/images/biohazard-button.gif" border="0" /></a>&nbsp;<!-- ENDIF -->
						<!-- IF searchresults.ATTACH_ICON_IMG -->{searchresults.ATTACH_ICON_IMG}&nbsp;<!-- ENDIF -->
							</div>	
						<!-- ENDIF -->				
						<!-- IF searchresults.S_UNREAD_TOPIC -->
						<a href="{searchresults.U_NEWEST_POST}"><img src="/images/square-new.gif" width="15" height="15" style="vertical-align:middle;" border="0" alt="" /></a>
						<!-- ELSE -->
						<a href="{searchresults.U_VIEW_TOPIC}"><img src="/images/square.gif" width="15" height="15" style="vertical-align:middle;" border="0" alt="" /></a>
						<!-- ENDIF -->
						<a href="{searchresults.U_VIEW_TOPIC}" class="active">{searchresults.TOPIC_TITLE}</a>
						<!-- IF searchresults.PAGINATION -->
							<small>[Page: {searchresults.PAGINATION}</small>] 
						<!-- ENDIF -->
					</td>
					<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta3"><!-- ELSE --><td class="t3"><!-- ENDIF --><!-- IF not searchresults.S_TOPIC_GLOBAL --><a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE --> ({L_GLOBAL})<!-- ENDIF --></td>
					<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta3" style="white-space:nowrap">
					<!-- ELSE --><td class="t3" style="white-space:nowrap"><!-- ENDIF --><!-- IF searchresults.U_TOPIC_AUTHOR --><!-- IF searchresults.TOPIC_AUTHOR_COLOUR --><a href="{searchresults.U_TOPIC_AUTHOR}" style="text-decoration:none; color:{searchresults.TOPIC_AUTHOR_COLOUR}"><!-- ELSE --><a href="{searchresults.U_TOPIC_AUTHOR}" style="text-decoration:none; color:#d7cea4"><!-- ENDIF -->{searchresults.TOPIC_AUTHOR}</a><!-- ELSE -->{searchresults.TOPIC_AUTHOR}<!-- ENDIF --></td>
					<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta4">
					<!-- ELSE --><td class="t4"><!-- ENDIF -->{searchresults.TOPIC_REPLIES}</td>
					<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta5">
					<!-- ELSE --><td class="t5"><!-- ENDIF -->{searchresults.TOPIC_VIEWS}</td>
					<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta6" style="white-space: nowrap">
					<!-- ELSE --><td class="t6" style="white-space: nowrap" ><!-- ENDIF -->{L_POST_BY_AUTHOR}&nbsp;<b><!-- IF searchresults.U_LAST_POST_AUTHOR --><a href="{searchresults.U_LAST_POST_AUTHOR}" style="text-decoration:none; color:#d7cea4">{searchresults.LAST_POST_AUTHOR}</a><!-- ELSE -->{searchresults.LAST_POST_AUTHOR}<!-- ENDIF --></b></td>
<!-- IF searchresults.S_ROW_COUNT is even --><td class="ta6" style="white-space: nowrap">
					<!-- ELSE --><td class="t6" style="white-space: nowrap" ><!-- ENDIF -->{L_POSTED_ON_DATE}&nbsp;<a href="{searchresults.U_LAST_POST}"><b>{searchresults.LAST_POST_TIME}</b></a></td>
				</tr>
				<!-- END searchresults -->
			</table>
		</div>
	</div>

	<!-- ELSE -->

	<script type="text/javascript">
	//<![CDATA[
	var objGlobal;
	var startContainerHeight=0;
	var topPadding=365;
	if(Browser.safari)
		topPadding=240;
	var topScrollLocation=0;
	
	function floater(){
		try{
		var scrollTopValue=document.documentElement.scrollTop;
		if(Browser.safari)
			scrollTopValue=document.body.scrollTop;
		var divHeight=document.getElementById("floatingContainer"+previousPost).offsetHeight;
		var browserHeight=document.documentElement.clientHeight;
			if(scrollTopValue>topPadding && divHeight<browserHeight){
				if((scrollTopValue+divHeight)<(document.body.offsetHeight-260))
					objGlobal.style.top=scrollTopValue-topPadding+"px";
			}else{
				objGlobal.style.top="0px";
			}
		}catch(err){ }
	}
	
	function init(){
		objGlobal = document.getElementById("floatingContainer2");
		window.onscroll=floater;
		switchPost(postIdArray[0])
	}
	
	function testFunc(){
		alert(objGlobal.style.top)
		objGlobal.style.top=200+"px";
	}
	
	var previousPost=0;
	var previousBg=1;
	
	function hilightPost(postId) {
		var obj;
		if(postId != previousPost && postId != 0){
			obj = document.getElementById("colorMod" + postId);
			obj.style.backgroundColor="#0D242D";
		}
	}
	
	function restorePost(postId) {
		var obj;
		if(postId != previousPost && postId != 0){
			obj = document.getElementById("colorMod" + postId);
			obj.style.backgroundColor="transparent";
		}
	}
	
	function switchPost(postId, linkId) {
		var obj;
		if (postId == previousPost) {
			document.location.href=linkId;
		}else{
			if(previousPost) {
				obj = document.getElementById("colorMod" + previousPost);
				// added to avoid javascript error for no search results
				if (obj == null) {
					return;
				}
				obj.style.backgroundColor="transparent";
				
				obj = document.getElementById("floatingContainer" + previousPost);
				obj.style.display="none";		
				
				obj = document.getElementById("searchArrow" + previousPost);
				obj.style.visibility="hidden";
				
				obj = document.getElementById("miniText" + previousPost);
				obj.innerHTML='<img src="/images/en_US/button-preview-post.gif" border="0" alt="" />';
			}
	
			obj = document.getElementById("searchArrow" + postId);
			// added to avoid javascript error for no search results
			if (obj == null) {
				return;
			}
			obj.style.visibility="visible";
			obj = document.getElementById("floatingContainer" + postId);
			obj.style.display="block";
			obj = document.getElementById("colorMod" + postId);
			obj.style.backgroundColor="#063449";
			obj = document.getElementById("miniText" + postId);
			obj.innerHTML='<img src="/images/en_US/button-jumpto-post.gif" border="0" alt="" />';
	
			var divHeight=document.getElementById("floatingContainer"+postId).offsetHeight;
	
			if(startContainerHeight==0)
				startContainerHeight = document.getElementById("searchbackground").offsetHeight;
			
			obj = document.getElementById("floatingContainer");
	
			if(!Browser.opera)
			if (divHeight > startContainerHeight){
				obj.style.height=divHeight+"px";
				obj = document.getElementById("searchbackground");
				obj.style.height=divHeight+"px";
			}else{
				obj.style.height=startContainerHeight+"px";
				obj = document.getElementById("searchbackground");
				obj.style.height=startContainerHeight+"px";			
			}
			
			//alert(obj.style.height)
			previousPost = postId;
			floater();
			//testFunc();
		}
	}
	
	function checkSearchField(){
		textSearch = document.searchForm.searchText.value;
		characterName = document.searchForm.characterName.value;
		return true;
	}
	//]]>
This is code from a phpbb forum developing the same skin i am they have the search page working i was wondering if anyone can help me decypher and put the vb conditionals in the correct spots for my search results page. It was done by Paybas at pbwow.com see it there to see how it is supposed to work in vbulletin
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05415 seconds
  • Memory Usage 2,464KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete