Source for file newsfeed_link.class.php
Documentation is available at newsfeed_link.class.php
* @copyright Refer to copyright.php
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author Mambo Foundation Inc see README.php
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
* Newsfeed item link class
function edit( &$uid, $menutype, $option ) {
global $database, $my, $mainframe;
global $mosConfig_absolute_path;
// fail if checked out not by 'me'
if ($menu->checked_out &&
$menu->checked_out <>
$my->id) {
echo
"<script>alert('".
sprintf(T_('The module % is currently being edited by another administrator'), $menu->title).
"'); document.location.href='index2.php?option=$option'</script>\n";
$menu->checkout( $my->id );
// load values for new entry
$menu->type =
'newsfeed_link';
$menu->menutype =
$menutype;
$temp =
explode( 'feedid=', $menu->link );
$query =
"SELECT *, c.title AS category"
.
"\n FROM #__newsfeeds AS a"
.
"\n INNER JOIN #__categories AS c ON a.catid = c.id"
.
"\n WHERE a.id = '".
$temp[1] .
"'"
$database->setQuery( $query );
$newsfeed =
$database->loadObjectlist();
// outputs item name, category & section instead of the select list
'.
$newsfeed[0]->category .
'
$lists['newsfeed'] .=
'<input type="hidden" name="newsfeed_link" value="'.
$temp[1] .
'" />';
$query =
"SELECT a.id AS value, CONCAT( c.title, ' - ', a.name ) AS text, a.catid "
.
"\n FROM #__newsfeeds AS a"
.
"\n INNER JOIN #__categories AS c ON a.catid = c.id"
.
"\n WHERE a.published = '1'"
.
"\n ORDER BY a.catid, a.name"
$database->setQuery( $query );
$newsfeeds =
$database->loadObjectList( );
// Create a list of links
$lists['newsfeed'] =
mosHTML::selectList( $newsfeeds, 'newsfeed_link', 'class="inputbox" size="10"', 'value', 'text', '' );
// build html select list for target window
// build the html select list for ordering
// build the html select list for the group access
// build the html select list for paraent item
// build published button option
// build the url link output
// get params definitions
$params =
& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' );
Documentation generated on Mon, 05 May 2008 16:21:40 +0400 by phpDocumentor 1.4.0