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(); ?>








">

".translate("No New Submissions").""; } else { echo ""; } } CloseTable(); ?>
".translate("New Stories Submissions by NGOID")."

"; include("submissionsNgoid.php"); CloseTable(); include ("footer.php"); break; } Note: Alternatively, replace your submit.php with the modified one provided as a part of the download. 5) In theme.php For each and every theme , there is a seperate folder and each folder contain it's own theme.php. Include the following code after the given code: if($informant != "") $boxstuff = "$informant "; else $boxstuff = "$anonymous "; Code to be inserted in each and every theme.php: include("intheme.php"); Install the following files: 1) parsestories.php: This file parses the XML data provided by NGOID news network and retrieves necessary information. 2) xmlrpc.inc: This is the XMLRPC – PHP client file 3) SubmitNews.php: This file establishes a connection to the XMLRPC server and passes data to be inserted into the database. 4) submissionsNgoid.php: This file includes parsestories.php and displays all the submissions at NGOID in a tabular form 5) intheme.php: This file takes care of username displayed with sitename from which article was posted. Important Note: In stories table i.e. go to database and alter the informant field size to varchar(80); sytax on sql prompt : alter table stories change informant informant varchar(80); -------------------------------------------------------------------------------------------------------------------------- Copyright © i3Connect.net. Use of the material is covered by the i3Connect Community License. i3Connect™ is a trademark of i3Connect, Inc. All other trademarks here are properties of their respective owners.