dat hangt er vanaf hoe die zijn ingesteld...
maar kijk voor de volgende woorden:
echo, print
alles wat daar tussen quotes staat mag je aanpassen...behalve als er een $ voor een woord staat (dat wil zeggen variabele en die haalt hij ergens uit het script...dit laat je best staan)
Link gekopieerd
anders post je een klein stukje code, zodat we een voorbeeldje kunnen geven
Link gekopieerd
Goeie vraag, want de kleur zegt alleen wat over of je het zomaar aan kan passen wanneer het script ook in zijn geheel goed is opgebouwd.
Probeer de termen die je wilt vertalen in de code eens te zoeken, en aan te passen. Steeds even opslaan en dan proberen.
Maar:
- Hoogst waarschijnlijk gaat het goed wanneer je alleen de teksten in het rood aanpast.
- Blijf van woorden die met een dollarteken beginnen af, daarmee zal je waarschijnlijk alleen maar dingen kapot maken.
Link gekopieerd
Hee wat een geweldig form zo snel bericht :D harstikke bedankt
hier een stukkie tekst.
<div class='search'>
<form action='<?php echo $_SERVER[PHP_SELF]; ?>' method='get'>
<table width='660' border='0' cellpadding='0' cellspacing='0'>
<tr>
<th width='120'><label for='category'>Category:</label></th>
<th width='120'><label for='make'>Make:</label></th>
<th width='120'><label for='model'>Model:</label></th>
<th width='150'><label for='srt'>Sort Order:</label></th>
<th width='90'><label for='p'>Per Page:</label></th>
<th width='60'></th>
</tr>
<tr>
<td>
<select id='category' name='category' style='width:110px;'>
<option value=''>[ Elke Category ]</option>
<?php
$result = mysql_query("SELECT DISTINCT category FROM $dblist ORDER BY category ASC", $link);
if(mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {
$row = safe_data($row, 'display');
echo "<option value='$row[category]'";
if($row[category] == $_GET[category]) echo "selected='selected'";
echo ">$row[category]</option>";
}
}
?>
</select>
</td>
<td>
<select id='make' name='make' style='width:110px;'>
<option value=''>[ Any Make ]</option>
<?php
$result = mysql_query("SELECT DISTINCT make FROM $dblist ORDER BY make ASC", $link);
if(mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {
$row = safe_data($row, 'display');
echo "<option value='$row[make]'";
if($row[make] == $_GET[make]) echo "selected='selected'";
echo ">$row[make]</option>";
}
}
?>
</select>
</td>
<td>
<input id='model' name='model' value='<?php echo $_GET[model]; ?>' style='width:106px;'/>
</td>
<td>
<select id='srt' name='srt' style='width:140px;'>
<option value='model_year DESC' <?php if($_GET[srt] == 'model_year DESC') echo "selected='selected'"; ?>>By Year (New to Old)</option>
<option value='model_year ASC' <?php if($_GET[srt] == 'model_year ASC') echo "selected='selected'"; ?>>By Year (Old to New)</option>
<option value='make ASC' <?php if($_GET[srt] == 'make ASC') echo "selected='selected'"; ?>>By Make (A to Z)</option>
<option value='make DESC' <?php if($_GET[srt] == 'make DESC') echo "selected='selected'"; ?>>By Make (Z to A)</option>
<option value='added DESC' <?php if($_GET[srt] == 'added DESC') echo "selected='selected'"; ?>>By Date (New to Old)</option>
<option value='added ASC' <?php if($_GET[srt] == 'added ASC') echo "selected='selected'"; ?>>By Date (Old to New)</option>
<option value='price DESC' <?php if($_GET[srt] == 'price DESC') echo "selected='selected'"; ?>>By Price (High to Low)</option>
<option value='price ASC' <?php if($_GET[srt] == 'price ASC') echo "selected='selected'"; ?>>By Price (Low to High)</option>
</select>
</td>
<td>
<select id='p' name='p' style='width:80px;'>
<?php for($n = 5; $n <= 50; $n+=5) {
echo "<option value='$n'";
if($n == $_GET[p]) echo " selected='selected'";
echo ">$n Results</option>";
} ?>
</select>
</td>
<td align='right'>
<input type='submit' name='submit' value='Search'/>
</td>
</tr>
</table>
</form>
</div>
<div class='infobar' style='margin-bottom:10px;'>
There are <strong><?php echo number_format($display_total[0]); ?></strong> listings in inventory.
(Last updated: <?php echo date($conf[dformat], $updated[updated]+(3600*$conf[toffset])); ?> at
<?php echo date($conf[tformat], $updated[updated]+(3600*$conf[toffset])); ?>)
<div class='right'>
<a href='listings.php'>Browse</a> -
<a href='search.php?<?php echo $pass_vars; ?>'>Advanced Search</a>
</div>
</div>
<form action='compare.php' method='get'>
<?php
if($conf[featured]) $first = "featured DESC,"; else $first = "";
$result = mysql_query("SELECT * FROM $dblist $where ORDER BY $first $_GET[srt] LIMIT $start, $_GET[p]", $link);
if(mysql_num_rows($result)) {
$n = 0;
while($row = mysql_fetch_array($result)) {
// determine which image to display
if($row[images]) {
$image = mysql_query("SELECT fname FROM $dbimgs WHERE listid='$row[id]' ORDER BY id ASC LIMIT 1", $link);
$image = mysql_fetch_array($image);
$image = "thumbs/".$image[fname];
} else {
$image = "common/no-photo-thumb.jpg";
}
// make data display-friendly
$row = safe_data($row, 'display');
if($n % 2) $alternate = "alt"; else $alternate = "";
// create variable string to pass
$show = "show.php?id=$row[id]";
foreach($_GET as $name => $value) if($name != 'id') $show .= "&$name=$value";
echo "<div class='listing $alternate'>";
// featured status
if($row[featured]) echo "<div class='featured'>F E A T U R E D</div>";
// photo
echo "<div class='photo'><a href='$show'><img class='none' src='$image' alt=''/></a></div>";
// general information
echo "<div class='info'>";
echo "<a href='$show'><strong>";
if($row[model_year]) echo $row[model_year]." ";
echo "$row[make] $row[model]</strong></a>";
if($row[mileage]) echo " (".number_format($row[mileage])." $conf[units])";
echo "<br/>";
if($row[stock]) echo "Stock Number: $row[stock]<br/>";
if($row[trans]) echo "Transmission: $row[trans]<br/>";
echo "</div>";
// description summary
echo "<div class='description'>";
if($row[tagline]) echo "<strong>$row[tagline]</strong>";
elseif($row[description]) echo summary($row[description], 15)." <a href='$show'>More Details</a>";
echo "</div>";
// price, availability, condition
echo "<div class='price'>";
echo "<strong>";
if($row[ebay_url]) echo "<a href='$row[ebay_url]' target='_blank'><img class='none' src='common/ebay-logo.gif'/></a>";
elseif($row[price]) echo $conf[currency].number_format($row[price]);
elseif($row[price_alt]) echo $row[price_alt];
else echo "Call for Price";
if($row[sale]) echo "<br/><span class='success'>Sale: ".$conf[currency].number_format($row[sale])."</span>";
echo "</strong><br/>";
if($row[status] == 2) echo "<span class='alert'>".$status[$row[status]]."</span><br/>";
elseif($row[status] == 3) echo "<span class='error'>".$status[$row[status]]."</span><br/>";
else echo "<strong>".$status[$row[status]]."</strong><br/>";
echo $row[cond];
echo "</div>";
// compare check box
echo "<div class='compare'>";
echo "<input class='check' type='checkbox' name='cmp$row[id]' value='1'/> Compare";
echo "</div>";
echo "</div>";
$n++;
}
} else {
echo "<div id='msg-alert'>We're sorry, no listings could be found that match your query.</div>";
}
?>
<div class='infobar' style='margin-top:10px;'>
To compare listings check up to <strong>3</strong> checkboxes above and click the <strong>Compare</strong> button.
<div class='right' style='padding-top:4px;'>
<input class='compare' type='submit' value='Compare'/>
</div>
</div>
</form>
<div class='pages'>
Page <?php echo $_GET[page]; ?> of <?php echo $pages; ?> (<?php echo $total; ?> Listings)
<?php if($pages > 1) { ?>
<div class='links'>
<?php $_GET = safe_data($_GET, 'display'); page_links($_GET, $pages, $_SERVER[PHP_SELF]); ?>
</div>
<?php } ?>
</div>
Link gekopieerd
[ignore]
zit dit even om je code heen
en voor de rest mag je alles aan passen in je wat
niet tussen de php tages staat <?php ?> [/ignore]
Link gekopieerd
zet even dit om je code heen, zodat het beter te lezen is.
[.code]
[./code]
(zonder de puntjes)
Link gekopieerd
<div class='search'>
<form action='<?php echo $_SERVER[PHP_SELF]; ?>' method='get'>
<table width='660' border='0' cellpadding='0' cellspacing='0'>
<tr>
<th width='120'><label for='category'>Category:</label></th>
<th width='120'><label for='make'>Make:</label></th>
<th width='120'><label for='model'>Model:</label></th>
<th width='150'><label for='srt'>Sort Order:</label></th>
<th width='90'><label for='p'>Per Page:</label></th>
<th width='60'></th>
</tr>
<tr>
<td>
<select id='category' name='category' style='width:110px;'>
<option value=''>[ Elke Category ]</option>
<?php
$result = mysql_query("SELECT DISTINCT category FROM $dblist ORDER BY category ASC", $link);
if(mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {
$row = safe_data($row, 'display');
echo "<option value='$row[category]'";
if($row[category] == $_GET[category]) echo "selected='selected'";
echo ">$row[category]</option>";
}
}
?>
</select>
</td>
<td>
<select id='make' name='make' style='width:110px;'>
<option value=''>[ Any Make ]</option>
<?php
$result = mysql_query("SELECT DISTINCT make FROM $dblist ORDER BY make ASC", $link);
if(mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {
$row = safe_data($row, 'display');
echo "<option value='$row[make]'";
if($row[make] == $_GET[make]) echo "selected='selected'";
echo ">$row[make]</option>";
}
}
?>
</select>
</td>
<td>
<input id='model' name='model' value='<?php echo $_GET[model]; ?>' style='width:106px;'/>
</td>
<td>
<select id='srt' name='srt' style='width:140px;'>
<option value='model_year DESC' <?php if($_GET[srt] == 'model_year DESC') echo "selected='selected'"; ?>>By Year (New to Old)</option>
<option value='model_year ASC' <?php if($_GET[srt] == 'model_year ASC') echo "selected='selected'"; ?>>By Year (Old to New)</option>
<option value='make ASC' <?php if($_GET[srt] == 'make ASC') echo "selected='selected'"; ?>>By Make (A to Z)</option>
<option value='make DESC' <?php if($_GET[srt] == 'make DESC') echo "selected='selected'"; ?>>By Make (Z to A)</option>
<option value='added DESC' <?php if($_GET[srt] == 'added DESC') echo "selected='selected'"; ?>>By Date (New to Old)</option>
<option value='added ASC' <?php if($_GET[srt] == 'added ASC') echo "selected='selected'"; ?>>By Date (Old to New)</option>
<option value='price DESC' <?php if($_GET[srt] == 'price DESC') echo "selected='selected'"; ?>>By Price (High to Low)</option>
<option value='price ASC' <?php if($_GET[srt] == 'price ASC') echo "selected='selected'"; ?>>By Price (Low to High)</option>
</select>
</td>
<td>
<select id='p' name='p' style='width:80px;'>
<?php for($n = 5; $n <= 50; $n+=5) {
echo "<option value='$n'";
if($n == $_GET[p]) echo " selected='selected'";
echo ">$n Results</option>";
} ?>
</select>
</td>
<td align='right'>
<input type='submit' name='submit' value='Search'/>
</td>
</tr>
</table>
</form>
</div>
<div class='infobar' style='margin-bottom:10px;'>
There are <strong><?php echo number_format($display_total[0]); ?></strong> listings in inventory.
(Last updated: <?php echo date($conf[dformat], $updated[updated]+(3600*$conf[toffset])); ?> at
<?php echo date($conf[tformat], $updated[updated]+(3600*$conf[toffset])); ?>)
<div class='right'>
<a href='listings.php'>Browse</a> -
<a href='search.php?<?php echo $pass_vars; ?>'>Advanced Search</a>
</div>
</div>
<form action='compare.php' method='get'>
<?php
if($conf[featured]) $first = "featured DESC,"; else $first = "";
$result = mysql_query("SELECT * FROM $dblist $where ORDER BY $first $_GET[srt] LIMIT $start, $_GET[p]", $link);
if(mysql_num_rows($result)) {
$n = 0;
while($row = mysql_fetch_array($result)) {
// determine which image to display
if($row[images]) {
$image = mysql_query("SELECT fname FROM $dbimgs WHERE listid='$row[id]' ORDER BY id ASC LIMIT 1", $link);
$image = mysql_fetch_array($image);
$image = "thumbs/".$image[fname];
} else {
$image = "common/no-photo-thumb.jpg";
}
// make data display-friendly
$row = safe_data($row, 'display');
if($n % 2) $alternate = "alt"; else $alternate = "";
// create variable string to pass
$show = "show.php?id=$row[id]";
foreach($_GET as $name => $value) if($name != 'id') $show .= "&$name=$value";
echo "<div class='listing $alternate'>";
// featured status
if($row[featured]) echo "<div class='featured'>F E A T U R E D</div>";
// photo
echo "<div class='photo'><a href='$show'><img class='none' src='$image' alt=''/></a></div>";
// general information
echo "<div class='info'>";
echo "<a href='$show'><strong>";
if($row[model_year]) echo $row[model_year]." ";
echo "$row[make] $row[model]</strong></a>";
if($row[mileage]) echo " (".number_format($row[mileage])." $conf[units])";
echo "<br/>";
if($row[stock]) echo "Stock Number: $row[stock]<br/>";
if($row[trans]) echo "Transmission: $row[trans]<br/>";
echo "</div>";
// description summary
echo "<div class='description'>";
if($row[tagline]) echo "<strong>$row[tagline]</strong>";
elseif($row[description]) echo summary($row[description], 15)." <a href='$show'>More Details</a>";
echo "</div>";
// price, availability, condition
echo "<div class='price'>";
echo "<strong>";
if($row[ebay_url]) echo "<a href='$row[ebay_url]' target='_blank'><img class='none' src='common/ebay-logo.gif'/></a>";
elseif($row[price]) echo $conf[currency].number_format($row[price]);
elseif($row[price_alt]) echo $row[price_alt];
else echo "Call for Price";
if($row[sale]) echo "<br/><span class='success'>Sale: ".$conf[currency].number_format($row[sale])."</span>";
echo "</strong><br/>";
if($row[status] == 2) echo "<span class='alert'>".$status[$row[status]]."</span><br/>";
elseif($row[status] == 3) echo "<span class='error'>".$status[$row[status]]."</span><br/>";
else echo "<strong>".$status[$row[status]]."</strong><br/>";
echo $row[cond];
echo "</div>";
// compare check box
echo "<div class='compare'>";
echo "<input class='check' type='checkbox' name='cmp$row[id]' value='1'/> Compare";
echo "</div>";
echo "</div>";
$n++;
}
} else {
echo "<div id='msg-alert'>We're sorry, no listings could be found that match your query.</div>";
}
?>
<div class='infobar' style='margin-top:10px;'>
To compare listings check up to <strong>3</strong> checkboxes above and click the <strong>Compare</strong> button.
<div class='right' style='padding-top:4px;'>
<input class='compare' type='submit' value='Compare'/>
</div>
</div>
</form>
<div class='pages'>
Page <?php echo $_GET[page]; ?> of <?php echo $pages; ?> (<?php echo $total; ?> Listings)
<?php if($pages > 1) { ?>
<div class='links'>
<?php $_GET = safe_data($_GET, 'display'); page_links($_GET, $pages, $_SERVER[PHP_SELF]); ?>
</div>
<?php } ?>
</div>
Zo??
Link gekopieerd
Yeah 500 regels code, daar zitten we allemaal op te wachten :)
@Wim: Waarom post je het nou 2 keer?
Nu is er 1 onzinnige reactie en daarna een normaal bericht met een gigantische lange code.
Je kan je post bewerken man.
Link gekopieerd
alleen dan hadt je het moeten Aanpassen en niet opnieuw posten :p
Link gekopieerd
hahaha sorry snapte het niet zo goed denk ,ben new he ;-)
Link gekopieerd