Browse code

includes/reviewform.php: Update Number of Likes selection form

Clarissa Walker authored on 2026/09/12 12:50:24
Showing 1 changed files
... ...
@@ -38,8 +38,8 @@ $form .= "<br /><label for=\"review\">"._REVIEW.":</label><br />
38 38
 if($tinyMCE) 
39 39
 	$form .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('review');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
40 40
 if($ratings == "3"){
41
-	$form .= "<div><label for=\"rating\">"._OPINION."</label> <select id=\"rating\" name=\"rating\" class=\"textbox\">
42
-		<option value=\"1\"".($review['rating'] == 1 ? " selected" : "").">"._LIKED."</option><option value=\"0\"".($review['reviewid'] && !$review['rating'] ? " selected" : "").">"._DISLIKED."</option><option value=\"-1\"".($review['rating'] == -1 || $action == "add" ? " selected" : "").">"._NONE."</option></select></div>";
41
+	$form .= "<div><label for=\"rating\">"._LIKED."?</label> <select id=\"rating\" name=\"rating\" class=\"textbox\">
42
+		<option value=\"1\"".($review['rating'] == 1 ? " selected" : "").">"._YES."</option><option value=\"0\"".($review['reviewid'] && !$review['rating'] ? " selected" : "").">"._NO."</option><option value=\"-1\"".($review['rating'] == -1 || $action == "add" ? " selected" : "").">"._NONE."</option></select></div>";
43 43
 }
44 44
 if($ratings == "2"){
45 45
 	$form .= "<div><label for=\"rating\">"._OPINION."</label> <select id=\"rating\" name=\"rating\" class=\"textbox\">
Browse code

Preliminary Number of Likes functionality - it was actually missing entirely in the review form

Clarissa Walker authored on 2026/09/12 09:44:06
Showing 1 changed files
... ...
@@ -37,6 +37,10 @@ $form .= "<br /><label for=\"review\">"._REVIEW.":</label><br />
37 37
 <textarea class=\"textbox\" name=\"review\" id=\"review\" cols=\"40\" rows=\"5\">".$review['review']."</textarea>";
38 38
 if($tinyMCE) 
39 39
 	$form .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('review');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
40
+if($ratings == "3"){
41
+	$form .= "<div><label for=\"rating\">"._OPINION."</label> <select id=\"rating\" name=\"rating\" class=\"textbox\">
42
+		<option value=\"1\"".($review['rating'] == 1 ? " selected" : "").">"._LIKED."</option><option value=\"0\"".($review['reviewid'] && !$review['rating'] ? " selected" : "").">"._DISLIKED."</option><option value=\"-1\"".($review['rating'] == -1 || $action == "add" ? " selected" : "").">"._NONE."</option></select></div>";
43
+}
40 44
 if($ratings == "2"){
41 45
 	$form .= "<div><label for=\"rating\">"._OPINION."</label> <select id=\"rating\" name=\"rating\" class=\"textbox\">
42 46
 		<option value=\"1\"".($review['rating'] == 1 ? " selected" : "").">"._LIKED."</option><option value=\"0\"".($review['reviewid'] && !$review['rating'] ? " selected" : "").">"._DISLIKED."</option><option value=\"-1\"".($review['rating'] == -1 || $action == "add" ? " selected" : "").">"._NONE."</option></select></div>";
Browse code

Resize GD captcha for today's resolutions - and add forgotten set font directory

Clarissa Walker authored on 2026/09/04 14:38:39
Showing 1 changed files
... ...
@@ -48,9 +48,9 @@ if($ratings == "1") {
48 48
 	}
49 49
 	$form .= "<option value=\"-1\"".($review['rating'] == -1 || $action != "edit" ? " selected" : "").">"._NONE."</option></select></div>";
50 50
 }
51
-if(!USERUID && !empty($captcha)) $form .= "<div><span class=\"label\">"._CAPTCHANOTE."</span><input MAXLENGTH=5 SIZE=5 name=\"userdigit\" type=\"text\" value=\"\"><br /><img width=120 height=30 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div>";
51
+if(!USERUID && !empty($captcha)) $form .= "<div><span class=\"label\">"._CAPTCHANOTE."</span><input MAXLENGTH=5 SIZE=5 name=\"userdigit\" type=\"text\" value=\"\"><br /><img width=240 height=60 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div>";
52 52
 
53 53
 $form .= "<INPUT type=\"hidden\" name=\"chapid\" value=\"".(isset($chapid) ? $chapid : "")."\"><div style=\"text-align: center; margin: 1ex;\"><INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></div>";
54 54
 if(!empty($rateonly)) $form .= "<div>"._REVIEWNOTE."</div>";
55 55
 $form .= "</div></form>";
56
-?>
57 56
\ No newline at end of file
57
+?>
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,56 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// Copyright (c) 2007 by Tammy Keefer
4
+// Based on eFiction 1.1
5
+// Copyright (C) 2003 by Rebecca Smallwood.
6
+// http://efiction.sourceforge.net/
7
+// ----------------------------------------------------------------------
8
+// LICENSE
9
+//
10
+// This program is free software; you can redistribute it and/or
11
+// modify it under the terms of the GNU General Public License (GPL)
12
+// as published by the Free Software Foundation; either version 2
13
+// of the License, or (at your option) any later version.
14
+//
15
+// This program is distributed in the hope that it will be useful,
16
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
+// GNU General Public License for more details.
19
+//
20
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
21
+// ----------------------------------------------------------------------
22
+
23
+if(!defined("_CHARSET")) exit( );
24
+if(!isset($item)) $item = "";
25
+if(!isset($action)) $action == "add";
26
+$form = "<form method=\"POST\" id=\"reviewform\" enctype=\"multipart/form-data\" action=\"reviews.php?action=".($action == "edit" ? "edit&amp;reviewid=".$review['reviewid'] : "add&amp;type=$type&amp;item=$item").(!empty($nextchapter) ? "&amp;next=$nextchapter" : "")."\">
27
+<div style=\"width: 350px; margin: 0 auto; text-align: left;\"><label for=\"reviewer\">"._NAME.":</label> ";
28
+if($action != "edit") {
29
+	$review = array('reviewid' => '', 'reviewer' => '', 'review' => '', 'rating' => '-1');
30
+	if(isMEMBER)
31
+		$form .= USERPENNAME." <INPUT type=\"hidden\" name=\"reviewer\" value=\"".USERPENNAME."\"><INPUT type=\"hidden\" name=\"uid\" value=\"".USERUID."\">";
32
+	else
33
+		$form .= "<INPUT name=\"reviewer\" id=\"reviewer\" size=\"30\" maxlength=\"200\">";
34
+}
35
+else $form .= $review['reviewer']."<INPUT type=\"hidden\" name=\"reviewid\" value=\"".$review['reviewid']."\">";
36
+$form .= "<br /><label for=\"review\">"._REVIEW.":</label><br />
37
+<textarea class=\"textbox\" name=\"review\" id=\"review\" cols=\"40\" rows=\"5\">".$review['review']."</textarea>";
38
+if($tinyMCE) 
39
+	$form .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('review');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
40
+if($ratings == "2"){
41
+	$form .= "<div><label for=\"rating\">"._OPINION."</label> <select id=\"rating\" name=\"rating\" class=\"textbox\">
42
+		<option value=\"1\"".($review['rating'] == 1 ? " selected" : "").">"._LIKED."</option><option value=\"0\"".($review['reviewid'] && !$review['rating'] ? " selected" : "").">"._DISLIKED."</option><option value=\"-1\"".($review['rating'] == -1 || $action == "add" ? " selected" : "").">"._NONE."</option></select></div>";
43
+}
44
+if($ratings == "1") {
45
+	$form .= "<div><label for=\"rating\">"._REVIEWRATING.":</label> <select name=\"rating\">";
46
+	for($x=10; $x > 0; $x--) {
47
+		$form .= "<option value=\"$x\"".($review['rating'] == $x ? " selected" : "").">$x</option>";
48
+	}
49
+	$form .= "<option value=\"-1\"".($review['rating'] == -1 || $action != "edit" ? " selected" : "").">"._NONE."</option></select></div>";
50
+}
51
+if(!USERUID && !empty($captcha)) $form .= "<div><span class=\"label\">"._CAPTCHANOTE."</span><input MAXLENGTH=5 SIZE=5 name=\"userdigit\" type=\"text\" value=\"\"><br /><img width=120 height=30 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div>";
52
+
53
+$form .= "<INPUT type=\"hidden\" name=\"chapid\" value=\"".(isset($chapid) ? $chapid : "")."\"><div style=\"text-align: center; margin: 1ex;\"><INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></div>";
54
+if(!empty($rateonly)) $form .= "<div>"._REVIEWNOTE."</div>";
55
+$form .= "</div></form>";
56
+?>
0 57
\ No newline at end of file