Szukałem po forum no ale nie znalazłem nic co by mi odpowiadało. Potrzebuje wstawić wyszukiwarkę w poziome menu zaraz po wszystkich linkach. Próbowałem jakiś skryptów do wyszukiwarki ale albo wyszukiwarka była w innym miejscu albo nie wyszukiwała odpowiednio, wyszukiwała w artykułach a ja chciałem żeby domyślnie szukała na forum.
Zawartość pliku theme.php
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
define("THEME_WIDTH", "1050");
define("THEME_BULLET", "·");
//v7 sublinks function is a bit more for this, so taken from v6 and tweaked
function thesublinks($sep="·",$class="") {
$i = 0; $res = "";
$sres = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' AND ".groupaccess('link_visibility')." AND link_url!='---' ORDER BY link_order ASC");
if (dbrows($sres)) {
while($sdata = dbarray($sres)) {
if ($i != 0) { $res .= " ".$sep."\n"; } else { $res .= "\n"; }
$link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
$link_class = $class ? " class='$class'" : "";
if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
$res .= "<a href='".$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
} else {
$res .= "<a href='".BASEDIR.$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
}
$i++;
}
}
if ($i != 0) { return $res; } else { return " "; }
}
function render_page($license=false) {
global $settings, $main_style;
//Header
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'><tr><td>
<table cellpadding='60' cellspacing='0' width='".THEME_WIDTH."' style='border: 0px; margin: 0px auto'>
<tr><td class='banerek'>".showbanners()."</td></tr></table>\n";
//sublinks css
echo "<table width='".THEME_WIDTH."' border='0' cellspacing='0' cellpadding='0'><tr><td>";
echo "<div id='altlinkler'>";
echo "<ul><li>".thesublinks("</li>\n<li>");
echo "</li></ul><div class='clear-both'> </div></div>";
echo "</td></tr></table>";
//Content
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
//Footer
echo "<div id='footer'><table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' class='footermain'>
<td class='footer' align='left'><center><font color='white'>Powered by: </font><br><b><a href='http://php-fusion.co.uk/' target='_blank'><img src='http://www.spczernikowo.pl/themes/Picmic/images/fusion.gif' style='margin:5px;' align='center'></a></center><br></td>
<td class='footer' align='center'><center></center><font color='white'>".stripslashes($settings['footer'])."</font></td>
<td class='footer' align='right'><center><a href='http://www.stat24.com' target='_blank'><img src='http://www.stat24.com/logo/logoBlack2_pl.gif' width='90' height='26' style='border:0px' alt='Profesjonalne bezpłatne statystyki www' /></a></center><br></td>
<br><br></td>
</table>
</td>
<td class='righter'><img width='45' src='".THEME."images/righter.gif' height='1' alt=''></td>
</tr></font>
</table>\n";
}
function render_news($subject, $news, $info) {
echo "<div class='capmain'>$subject</div>\n";
echo "<div class='main-body floatfix'>".$news."</div>\n";
echo "<div class='news-footer'>\n";
echo newsposter($info,"·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</div>\n";
}
function render_article($subject, $article, $info) {
echo "<div class='border tablebreak'>";
echo "<div class='capmain'>$subject</div>\n";
echo "<div class='main-body floatfix'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>\n";
echo "<div class='news-footer'>\n";
echo articleposter($info,"·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</div>\n";
echo "</div>";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border tablebreak'>
<tr>
<td class='capmain'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
echo "<div class='border tablebreak'>";
global $panel_collapse; $panel_collapse = $collapse;
echo "<div class='border'>\n";
echo "<div class='scapmain'>";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<div style='float:right;'>".panelbutton($state,$boxname)."</div>";
}
echo $title."</div>\n<div class='side-body floatfix'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside($collapse = false) {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</div>\n</div>\n";
echo "</div>";
}
?>
Dowiedziałem się że za to menu odpowiada //sublinks css, ale nie wiem jak to dostosować do wyszukiwarki. Proszę nie usuwać tematu bo naprawdę chce się dowiedzieć jak to zrobić nie chodzi mi zaraz o gotowca...
PS. Widząc jak wszyscy są pomocni postanowiłem poszukać sam rozwiązania. Podziękowania dla "Fixik"
Kod theme.php
<td width='30%' align='center' class='menu2a'><form action='".BASEDIR."search.php?stype=all' enctype='multipart/form-data' '>
<input type='hidden' name='stype' value='all'/>
<input type='text' name='stext' value='".urldecode($_GET['stext'])."' class='textbox' style='width:170px; height:17px; vertical-align:middle' />
<input type='image' src='".THEME."images/szukaj.png' style='margin-left:3px; vertical-align:middle' />
</form></td>
styles:
.menu2a {
margin:0;
list-style:none;
height:36px;
background:#fff url(images/menu/button1a.jpg) repeat-x;
position:relative;
font-family:arial, verdana, sans-serif;
border-bottom: solid 1px #CCCCCC;
}
Tak to wygląda:
www.game-over.w8w.pl
Pozdrawiam temat do zamknięcia.
Edytowane przez dezmontnikus dnia 16.11.2009 20:26:52
|