2012-06-02, 18:41:49
Also I see two other problems.
1. After I click "Send" I see a new page with message:
Notice: Undefined index: tema in D:\Projects\WebSites\phpGetSimple\plugins\pages_comments\check.php on line 135 Notice: Undefined variable: ans in D:\Projects\WebSites\phpGetSimple\plugins\pages_comments\check.php on line 175 Notice: Undefined variable: ans in D:\Projects\WebSites\phpGetSimple\plugins\pages_comments\check.php on line 186
2. After this I redirected to http://localhost/index.php?id=news-20120514-1641, but I use port 86 instead of 80, so my redirected link should be http://localhost:86/index.php?id=news-20120514-1641
For fixing 1st problem:
- I changed row 135 to: if (isset($_POST['guest']['tema']) && $_POST['guest']['tema'] != '') {
- in 175 and 186 I use $answ instead of $ans
I'm right? What this 'tema'?
For 2nd after your row 81:
$server_name = getenv ("SERVER_NAME"); // Server Name
I added:
$port = ($p=$_SERVER['SERVER_PORT'])!='80'&&$p!='443'?':'.$p:''; // Server Port
$server_name = $server_name . $port . "/";
and also commented row 150:
//$server_name = getenv ("SERVER_NAME"); // Server Name
It works to me, but I havn't tested with port 80.
Note, row 151 with $request_uri = getenv ("REQUEST_URI"); also can be commented or deleted in the next version of plugin.
For get $port I see function suggest_site_path from \admin\inc\basic.php so maybe you can write own function like this, or to include existing function into your plugin.
1. After I click "Send" I see a new page with message:
Notice: Undefined index: tema in D:\Projects\WebSites\phpGetSimple\plugins\pages_comments\check.php on line 135 Notice: Undefined variable: ans in D:\Projects\WebSites\phpGetSimple\plugins\pages_comments\check.php on line 175 Notice: Undefined variable: ans in D:\Projects\WebSites\phpGetSimple\plugins\pages_comments\check.php on line 186
2. After this I redirected to http://localhost/index.php?id=news-20120514-1641, but I use port 86 instead of 80, so my redirected link should be http://localhost:86/index.php?id=news-20120514-1641
For fixing 1st problem:
- I changed row 135 to: if (isset($_POST['guest']['tema']) && $_POST['guest']['tema'] != '') {
- in 175 and 186 I use $answ instead of $ans
I'm right? What this 'tema'?
For 2nd after your row 81:
$server_name = getenv ("SERVER_NAME"); // Server Name
I added:
$port = ($p=$_SERVER['SERVER_PORT'])!='80'&&$p!='443'?':'.$p:''; // Server Port
$server_name = $server_name . $port . "/";
and also commented row 150:
//$server_name = getenv ("SERVER_NAME"); // Server Name
It works to me, but I havn't tested with port 80.
Note, row 151 with $request_uri = getenv ("REQUEST_URI"); also can be commented or deleted in the next version of plugin.
For get $port I see function suggest_site_path from \admin\inc\basic.php so maybe you can write own function like this, or to include existing function into your plugin.