Installation Instructions
1. In submit.php
a) In the switch-case construct look for the below code:
The submitstory function shall include one additional parameter i.e. Cngoid.
case "Ok!":
SubmitStory($name, $address, $subject, $story, $topic, $Cngoid);
break;
b) Go to PreviewStory function in submit.php and add a checkbox for submission at ngoid after the following code:
()
Code to be inserted
( Submit to NGOID
also )
c) Insert the following files and declare the variables at the top of the file:
include("xmlrpc.inc");
include("SubmitNews.php");
include("config.php");
$url_ngoid = $nuke_url;
$site_ngoid = $sitename;
d) The function submit story’s definition will change. It will include an additional parameter
function submitStory($name, $address, $subject, $story, $topic,$Cngoid)
e) Declare the following global variables at the top of the function-SubmitStory:
global $url_ngoid, $site_ngoid;
f) Insert the following code in submitstory function,
if($Cngoid =="on")
{
if($topic=="")
{
$topic=1;
}
$resultset = mysql_query("select topictext from topics where $topic=topicid");
$topic_name=mysql_fetch_object($resultset);
$topic_name=$topic_name->topictext;
SubmitStoryNgoid($subject,$story,$topic_name,$name,$url_ngoid,$site_ngoid);
}
after the following Code:
if(!$result) {
echo mysql_errno(). ": ".mysql_error(). "
";
exit();
}
Note: Alternatively, replace your submit.php with the modified one provided as a part of the download.
2. In admin.php:
a) Insert the code below in admin.php after the following code:
case "DisplayStory":
include("admin/stories.php");
break;
Code to be inserted:
case "DisplayStoryNgoid":
include("admin/stories.php");
break;
Note: Alternatively, replace your admin.php with the modified one provided as a part of the download.
3. In stories.php:
a) The function preview story’s definition will change. It will include an additional parameter
function previewStory($qid, $uid, $author, $subject, $hometext, $bodytext, $topic, $notes,$Hsitename) {
b) Insert the given code in PreviewStory after the following code:
">
">
Code to be inserted:
c) Delete the below code in PreviewStory and add the code given:
Code to be deleted
Code to be inserted in place of the deleted code
d) The function post story’s definition will change. It will include an additional parameter
function postStory($qid, $uid, $author, $subject, $hometext, $bodytext, $topic, $notes,$Hsitename)
e) Insert the following code at the top of function called PostStory
$author=$author." ".$Hsitename;
Delete this line at the end of the function i.e. deleteStory($qid) and insert the following code instead
if($qid >= 0)
{
deleteStory($qid);
}
else { Header("Location: admin.php?op=submissions"); }
f) Insert the following function before switch - case construct preferably:
include("parsestories.php");
function displayStoryNgoid ($storyid) {
global $tempsitename;
global $sid_ng, $url_ng, $name_ng, $title_ng, $hometext_ng, $sitename_ng, $topic_name_ng;
$tempsitename=$sitename_ng[$storyid]."~".$url_ng[$storyid];
include ('header.php');
GraphicAdmin($hlpfile);
OpenTable();
?>