details.php
search for:
if ($comment_text == "") {
$msg .= (($msg != "") ? "<br />" : "").$lang['comment_required'];
$error = 1;
}
replace with:
if ($comment_text == "") {
$msg .= (($msg != "") ? "<br />" : "").$lang['comment_required'];
$error = 1;
}
if (!$error) {
$rating = intval($HTTP_POST_VARS['rating']);
if ($rating != "" && $id) {
//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
$cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
if ($rating && $rating <= MAX_RATING && $id) {
if (!isset($session_info['rated_imgs'])) {
$session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
}
$split_list = array();
if (!empty($session_info['rated_imgs'])) {
$split_list = explode(" ", $session_info['rated_imgs']);
}
if (!in_array($id, $split_list) && !in_array($id, $cookie_rated)) {
$session_info['rated_imgs'] .= " ".$id;
$session_info['rated_imgs'] = trim($session_info['rated_imgs']);
$site_sess->set_session_var("rated_imgs", $session_info['rated_imgs']);
$cookie_rated[] = $id;
$cookie_expire = time() + 60 * 60 * 24 * 4;
setcookie($cookie_name.'rated', serialize($cookie_rated), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
update_image_rating($id, $rating);
$msg = $lang['voting_success'];
}
else {
$msg = $lang['already_voted'];
$vote_error = 1;
}
}
else {
$msg = $lang['voting_error'];
$vote_error = 1;
}
}
if ($rating != "" && $vote_error != 1) {
$comment_headline = $comment_headline." ".$lang['user_rating'].$rating;
}
}
lang/XXXX/main.php
add:
$lang['user_rating'] = " | Vote: ";
(the text you will find in the comment_headline - for example "This ist the Headline | Vote: 5")
templates/XXXXX/comment_form.html
search for:
<tr>
<td width="90" valign="top"> </td>
<td>{bbcode}</td>
</tr>
repleace with:
<tr>
<td width="90" valign="top"> </td>
<td>{bbcode}</td>
</tr>
<tr>
<td width="90" valign="top"> </td>
<td><select name="rating" class="select">
<option value="">--</option>
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
<input type="hidden" name="action" value="rateimage" />
<input type="hidden" name="id" value="{image_id}" /></td>
</tr>
templates/XXXXX/details.html
delete:
{if rate_form}
<div align="center">{rate_form}</div>
{endif rate_form}
Only quick and dirty but one hour hard work...
For donations via Paypal use spende@owl-techno.de.... *g*