e_sc -> parse_scbatch(__FILE__);
class rss_menu_shortcodes extends e_shortcode
{
function sc_rss_feed()
{
global $row, $tp;
// $url2 = e_PLUGIN."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".2".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
$url2 = e107::url('rss_menu','rss', $row);
return "".$tp->toHTML($row['rss_name'], TRUE)."";
}
function sc_rss_icon()
{
global $row, $tp;
// $url2 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".2".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
$url2 = e107::url('rss_menu','rss', $row);
return "".RSS_ICON."";
}
function sc_rss_text()
{
global $row, $tp;
return $tp->toHTML($row['rss_text'], TRUE, "defs");
}
function sc_rss_types()
{
global $row, $tp;
// $url1 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".1".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
// $url2 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".2".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
// $url3 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".3".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
// $url4 = e_PLUGIN_ABS."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".4".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
$url2 = e107::url('rss_menu','rss', $row);
$url4 = e107::url('rss_menu','atom', $row);
if(deftrue('BOOTSTRAP') === 3) // v2.x
{
$text = "
";
return $text;
}
$text = "";
// $text .= "";
$text .= "";
// $text .= "";
$text .= "";
return $text;
}
//##### ADMIN --------------------------------------------------
function sc_rss_admin_caption($parm='')
{
global $sort;
list($field,$txt) = explode(",",$parm);
$txt = constant($txt);
return "".$txt."\n";
}
function sc_rss_admin_id()
{
global $row;
return $row['rss_id'];
}
function sc_rss_admin_name()
{
global $row;
return $row['rss_name'];
}
function sc_rss_admin_path()
{
global $row;
return $row['rss_path'];
}
function sc_rss_admin_url()
{
global $row;
return "".$row['rss_url']."";
}
function sc_rss_admin_topicid()
{
global $row;
return $row['rss_topicid'];
}
function sc_rss_admin_limit()
{
global $row, $rs;
$id = $row['rss_id'];
$frm = e107::getForm();
return $frm->number("limit[$id]",$row['rss_limit']);
return "";
}
function sc_rss_admin_limitbutton()
{
$frm = e107::getForm();
return $frm->admin_button('update_limit',LAN_UPDATE,'update');
}
function sc_rss_admin_options()
{
global $row, $tp;
$delname = $row['rss_name'];
$delid = $row['rss_id'];
$options = "
".ADMIN_EDIT_ICON."
toJS(LAN_CONFIRMDEL ." [".LAN_ID.": ".$delid." : ".$delname."]\\n\\n")."')\"/>";
return $options;
}
function sc_rss_admin_form_name()
{
global $row;
return "\n";
}
function sc_rss_admin_form_url()
{
global $row,$PLUGINS_DIRECTORY;
return SITEURL.$PLUGINS_DIRECTORY."rss_menu/rss.php?".e_LANQRY." .{".LAN_TYPE."}.{".RSS_LAN_ADMIN_12."}";
}
function sc_rss_admin_form_topicid()
{
global $row;
return "";
}
function sc_rss_admin_form_path()
{
global $row;
return "";
}
function sc_rss_admin_form_text()
{
global $row;
return "\n";
}
function sc_rss_admin_form_class()
{
global $row;
$vals = array(RSS_LAN_ADMIN_21,RSS_LAN_ADMIN_22,RSS_LAN_ADMIN_23);
$text = "";
return $text;
}
function sc_rss_admin_form_limit()
{
global $row;
$frm = e107::getForm();
return $frm->number('rss_limit',$row['rss_limit'],3);
return "";
}
function sc_rss_admin_form_createbutton()
{
global $row;
$qs = explode(".", e_QUERY);
$frm = e107::getForm();
if(isset($qs[1]) && $qs[1] == "edit" && isset($qs[2]) && is_numeric($qs[2]) )
{
$text = "
";
$text .= $frm->admin_button('update_rss',LAN_UPDATE,'update');
}
else
{
$text = $frm->admin_button('create_rss',LAN_CREATE,'submit');
}
return $text;
}
function sc_rss_admin_import_check()
{
global $feed, $rs, $tp, $i;
if($feed['description'])
{
$feed['text'] = $feed['description'];
}
$text = "";
$text .= "";
$text .= "";
$text .= "";
$text .= "";
$text .= "";
$text .= "";
$text .= "";
return $text;
}
function sc_rss_admin_import_path()
{
global $feed, $i;
return "";
}
function sc_rss_admin_import_name()
{
global $feed, $i;
return "";
}
function sc_rss_admin_import_text()
{
global $feed;
return ($feed['description']) ? $feed['description'] : $feed['text'];
}
function sc_rss_admin_import_url()
{
global $feed;
return $feed['url'];
}
function sc_rss_admin_import_topicid()
{
global $feed;
return $feed['topic_id'];
}
}
$rss_shortcodes = new rss_menu_shortcodes;
?>