Seite 1 von 1

Leichtes PHP-Problem!

Verfasst: 21.12.2005 22:08
von all-around-board
Hallo,

und zwar. Es hat eigetnlich gar nichts mit Mod zu tun, auch wenn ich einen installiert habe. Ich möchte nur wissen, wie ich die drei Zeilen (Suchtext, Suchart, Suchbutton, s. Bild) in eine Zeile bekomme, dass die Suchbox nicht 1so hoch ist. Bitte helfen. mfG

http://img251.imageshack.us/img251/5058/aab34ev.jpg

Soll alles bloß ein eine Zeile. Hier ist der Code

Code: Alles auswählen

 <script type="text/javascript">
<!--
function checkSearch()
{
if (document.search_block.search_engine.value == 'google')
{
window.open('http://www.google.com/search?q=' + document.search_block.search_keywords.value, '_google', '');
return false;
}
else
{
return true;
}
}
//-->
</script>
<form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()">
<table width="25%" cellpadding="2" cellspacing="1" class="forumline">
<tr>
<th width="126px" cellspacing="2" cellpadding="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_SEARCH}&nbsp;</th>
</tr>
<tr>
<td align="center" class="row1"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center"><input class="post" type="text" name="search_keywords" size="15" /></td>
</tr>
<tr>
<td align="center"><select class="post" name="search_engine">
<option value="site">{L_FORUM}</option>
<option value="google">Google</option>
</select></td>
</tr>
<tr>
<td align="center"><input class="mainoption" type="submit" value="{L_SEARCH}" /></td>
</tr>
</table>
<input type="hidden" name="search_fields" value="all" />
<input type="hidden" name="show_results" value="topics" />
<br />
<a href="{U_SEARCH}" class="gensmall">{L_ADVANCED_SEARCH}</a>
</td>
</tr>
</table>
</form>

Verfasst: 21.12.2005 23:41
von all-around-board
Ist doch eigentlich ganz leicht, ich steck PHP bloß nicht wirklich aus...

Verfasst: 22.12.2005 00:04
von miccom
das hat aber sowas von gar nix mit php zu tun...

Code: Alles auswählen

 <script type="text/javascript">
<!--
function checkSearch()
{
if (document.search_block.search_engine.value == 'google')
{
window.open('http://www.google.com/search?q=' + document.search_block.search_keywords.value, '_google', '');
return false;
}
else
{
return true;
}
}
//-->
</script>
<form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()">
<table width="25%" cellpadding="2" cellspacing="1" class="forumline">
<tr>
<th width="426px" cellspacing="2" cellpadding="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_SEARCH}&nbsp;</th>
</tr>
<tr>
<td align="center" class="row1">

<table cellspacing="0" cellpadding="2">
<tr><td>
<input class="post" type="text" name="search_keywords" size="15" />
<select class="post" name="search_engine">
<option value="site">{L_FORUM}</option>
<option value="google">Google</option>
</select>
<input class="mainoption" type="submit" value="{L_SEARCH}" /></td>
</td></tr>
</table>

<input type="hidden" name="search_fields" value="all" />
<input type="hidden" name="show_results" value="topics" />
<br />
<a href="{U_SEARCH}" class="gensmall">{L_ADVANCED_SEARCH}</a>
</td>
</tr>
</table>
</form>

die breite der tabelle musst du halt selbst noch anpassen...

Verfasst: 22.12.2005 00:12
von all-around-board
Danke, hat super geklappt, aber warum hat es nichts mit PHP zu tun. Der Code is doch PHP, bloß des umstellen an sich nicht!! mfG

Verfasst: 22.12.2005 02:53
von IPB_Flüchtling
all-around-board hat geschrieben:Danke, hat super geklappt, aber warum hat es nichts mit PHP zu tun. Der Code is doch PHP ...
Hallo,

gaaanz kurz gesagt: Das, was Du in einer .php-Datei findest, ist PHP. Was Du in einer .tpl-Datei findest, ist (im Großen und Ganzen) HTML.

Ein Link zu einer Seite über PHP:

http://manuals.phpforum.de/php/index.php

Und jetzt ein Link zu einer Seite über HTML:

http://de.selfhtml.org/

Und Javascript und Perl ist wieder was anderes. Aber dazu ein anderes Mal mehr. :wink:

LG, IPB_Flüchtling