Google custom search

Joomla! forum. Joomla! Questions and Answers.

Συντονιστές: WebDev Moderators, Super-Moderators, PHP Moderators

Απάντηση
john1995
Δημοσιεύσεις: 32
Εγγραφή: 24 Νοέμ 2010 20:24
Τοποθεσία: Lesvos,Gera
Επικοινωνία:

Google custom search

Δημοσίευση από john1995 » 09 Νοέμ 2011 22:04

χρειάζομαι λίγη βοήθεια...
έχω αυτό το php και είναι για την αναζήτηση στο google....
που πρέπει να προσθέσω τον κώδικα απο το google search...??

Κώδικας: Επιλογή όλων

<?php
/**
@version 1.0: mod_s5_search
Author: Shape 5 - Professional Template Community
Free extension available for download at www.shape5.com
*/



$br = strtolower($_SERVER['HTTP_USER_AGENT']); // what browser.
if(ereg("msie 6", $br)) {
$sm_ie6 = "yes";
} 
else {
$sm_ie6 = "no";
}

$br = strtolower($_SERVER['HTTP_USER_AGENT']); // what browser.
if(ereg("msie 7", $br)) {
$sm_ie7 = "yes";
} 
else {
$sm_ie7 = "no";
}


?>
<html>
<head>
	<script type="text/javascript">//<![CDATA[
	
	var s5_searchvar = 1;
	var s5_searchvar2 = 1;
	var s5_searchvar3 = 0;
	var s5_searchvar4 = 0;
	
    document.write('<link href="../../../modules/mod_s5_search/s5_search/style.css" rel="stylesheet" type="text/css" media="screen" />');
//]]></script>	
	
	<script type="text/javascript">//<![CDATA[
    document.write('<style>#mod_search_searchword, #mod_search_searchword:hover {width:356px;} #s5_mod_searchwrap {position:absolute;left:50%;margin-left:-262px;}</style>');
//]]></script>	

<script type="text/javascript" src="../../../modules/mod_s5_search/s5_search/s5_effects.js"></script>

	
<?php if ($sm_ie6 == "yes"){ ?>
	<style>	#s5_search_middle_bottom .button, #s5_search_middle_bottom .button:hover {
	height:37px;}

	#s5_search_left {
	background:none;
	filter:
	progid:dximagetransform.microsoft.alphaimageloader(src='../../../modules/mod_s5_search/s5_search/s5_searchmodule_left.png) sizingmethod='crop');}

	#s5_search_middle {
	height:81px;
	margin-top:5px;
	cursor:pointer;	
	background:url(../../modules/mod_s5_search/s5_search/s5_searchmodule_middleie6.png) repeat-x;}
	
	#s5_search_right {
	background:none;
	filter:
	progid:dximagetransform.microsoft.alphaimageloader(src='../../../modules/mod_s5_search/s5_search/s5_searchmodule_right.png) sizingmethod='crop');}
</style>
<?php } ?>

</head>


<body onload="s5_search_2();">

<FORM NAME="joe">
<INPUT TYPE="hidden" NAME="burns">
</FORM>
 
 
<SCRIPT LANGUAGE="javascript">
var locate = window.location
document.joe.burns.value = locate
var text = document.joe.burns.value
function delineate(str){
theleft = str.indexOf("=") + 1;
return(str.substring(theleft));
}
</SCRIPT>

	
<Br/>	
<div id="s5_mod_searchwrap">
	<div id="s5_search_left"></div>
		<div id="s5_search_middle">
			<div id="s5_search_middle_top">
				<ul id="s5_search_bm">
						<li onclick="window.document.location.href='../../../index.php'" id="s5_search_button" class="nonactive"><span>Home</span></li>


						<li onclick="s5_search_2();" id="s5_search_button2" class="active"><span>Google</span></li>

			
				</ul>
			</div>
			
			
			
			<div id="s5_search_middle_bottom" style="clear:both;">

				<div id="s5_search_input" >
					&nbsp;
				</div>	

				<div id="s5_search_input2" style="display:none;" >
					<form METHOD="LINK" name="s5_search_input3" action="../../../modules/mod_s5_search/s5_search/google.php">
						<input type="text" size="50" class="inputbox" alt="search" maxlength="20" id="mod_search_searchword" name="searchword"/>
						<input type="submit" class="button" value="Search"/>
					</form>
				</div>
		
	
			</div>
		</div>
	<div id="s5_search_right"></div>
</div>

<br/><br/>
<div id="s5_iframe">


<iframe id="s5frame" name="s5iframe" src ="http://www.google.com/search?hl=&q=" width="100%" height="300px" frameborder="0">
  <p>Your browser does not support iframes.</p>
</iframe>



</div>
<SCRIPT>
var yWithScroll = 0;
if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
document.getElementById("s5frame").style.height = (yWithScroll) - 140;

document.s5_search_input3.searchword.value = delineate(text);


document.all.s5frame.src="http://www.google.com/search?hl=&q=" +delineate(text); 





</SCRIPT>
</body>
</html>
&#91;code&#93;&#91;/code&#93;
http://www.john-gera.info
Greece=lesvos island=Gera=wonderful

Απάντηση

Επιστροφή στο “Joomla! γενικά”

Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 0 επισκέπτες