menu_add("news aggregation","admin.php?mod=import","Content syndication through RDF/RSS feeds.",NULL,NULL,3);
menu_add("add new feed","admin.php?mod=import&op=add&type=feed","Add new news feed.",NULL,"news aggregation",2);
menu_add("add new bundle","admin.php?mod=import&op=add&type=bundle","Create a new bundle.",NULL,"news aggregation",3);
menu_add("tag news items","admin.php?mod=import&op=tag","Assign bundle attributes to a news item.",NULL,"news aggregation",4);
menu_add("help","admin.php?mod=import&op=help","More information about news aggregation.",NULL,"news aggregation",5);
menu_add("news aggregation",url("admin/import"),"Content syndication through RDF/RSS feeds.",NULL,NULL,3);
menu_add("add new feed",url("admin/import/add/feed"),"Add new news feed.",NULL,"news aggregation",2);
menu_add("add new bundle",url("admin/import/add/bundle"),"Create a new bundle.",NULL,"news aggregation",3);
menu_add("tag news items",url("admin/import/tag"),"Assign bundle attributes to a news item.",NULL,"news aggregation",4);
menu_add("help",url("admin/import/help"),"More information about news aggregation.",NULL,"news aggregation",5);
}
return$links?$links:array();
...
...
@@ -63,7 +63,7 @@ function import_format_item($item, $feed = 0) {
global$theme,$user;
if($user->uid&&user_access("maintain personal blog")){
$output.=lm("<img src=\"".$theme->image("blog.gif")."\" border=\"0\" width=\"12\" height=\"16\" alt=\"".t("Blog this item")."\" />",array("mod"=>"node","op"=>"add","type"=>"blog","iid"=>$item->iid),"",array("title"=>t("Comment on this news item in your personal blog.")));
$output.=l("<img src=\"".$theme->image("blog.gif")."\" border=\"0\" width=\"12\" height=\"16\" alt=\"".t("Blog this item")."\" />","node/add/blog&iid=$item->iid",array("title"=>t("Comment on this news item in your personal blog.")));
}
// external link
...
...
@@ -116,13 +116,13 @@ function import_block($op, $delta) {
$feed=db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%d'",$delta));
if($feed){
$block["subject"]=$feed->title;
$block["content"]=import_feed_block($feed)."<p><div align=\"right\">".lm(t("more"),array("mod"=>"import","op"=>"feed","id"=>$feed->fid),"",array("title"=>t("View this feed's recent news.")))."</div></p>";
$block["content"]=import_feed_block($feed)."<p><div align=\"right\">".l(t("more"),"import/feed/$feed->fid",array("title"=>t("View this feed's recent news.")))."</div></p>";
}
else{
// it was a bundle. this is NOT elegant
$bundle=db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%d'",$delta));
$block["subject"]=$bundle->title;
$block["content"]=import_bundle_block($bundle->attributes)."<p><div align=\"right\">".lm(t("more"),array("mod"=>"import","op"=>"bundle","id"=>$bundle->bid),"",array("title"=>t("View this bundle's recent news.")))."</div></p>";
$block["content"]=import_bundle_block($bundle->attributes)."<p><div align=\"right\">".l(t("more"),"import/bundle/$bundle->bid",array("title"=>t("View this bundle's recent news.")))."</div></p>";
}
return$block;
...
...
@@ -136,7 +136,7 @@ function import_get_bundles($attributes = 0) {
$result=db_query("SELECT * FROM bundle ORDER BY title");
while($bundle=db_fetch_object($result)){
$block[$bundle->bid]["subject"]=$bundle->title;
$block[$bundle->bid]["content"]=import_bundle_block($bundle->attributes)."<p><div align=\"right\">".lm(t("more"),array("mod"=>"import","op"=>"bundle","id"=>$bundle->bid),"",array("title"=>t("View this bundle's recent news.")))."</div></p>";
$block[$bundle->bid]["content"]=import_bundle_block($bundle->attributes)."<p><div align=\"right\">".l(t("more"),"import/bundle/$bundle->bid",array("title"=>t("View this bundle's recent news.")))."</div></p>";