コード例 #1
0
ファイル: news.php プロジェクト: bobozhangshao/HeartCare
						<a class="pull-left" href="#">
							<div class="cbFeedItemLogo media-object"><?php 
        echo modCBAdminHelper::descriptionIcon($item->description);
        ?>
</div>
						</a>
						<div class="media-body">
							<h4 class="cbFeedItemTitle media-heading"><a href="<?php 
        echo htmlspecialchars($item->link);
        ?>
" target="_blank"><strong><?php 
        echo $item->title;
        ?>
</strong></a></h4>
							<div class="cbFeedItemDesc"><?php 
        echo modCBAdminHelper::shortDescription($item->description, 200);
        ?>
</div>
							<small class="cbFeedItemDate"><?php 
        echo cbFormatDate($item->pubDate, true, 'timeago');
        ?>
</small>
						</div>
					</div>
				</div>
			<?php 
        if ($feedEntries) {
            if ($itemCount >= $feedEntries && $index + 1 != count($items)) {
                ?>
<button type="button" class="btn btn-primary btn-lg btn-block cbFeedShowMore"><?php 
                echo CBTxt::T('More');
コード例 #2
0
		}

		$xml						=	modCBAdminHelper::getFeedXML( 'http://www.joomlapolis.com/news?format=feed&type=rss', 'cbnewsfeed.xml', $feedDuration );

		if ( $xml ) {
			$items					=	$xml->xpath( '//channel/item' );

			/** @noinspection PhpIncludeInspection */
			require( JModuleHelper::getLayoutPath( 'mod_cbadmin', 'news' ) );
		}
		break;
	case 2:
	case 1:
	default:
		$menu						=	array();

		/** @noinspection PhpIncludeInspection */
		require( JModuleHelper::getLayoutPath( 'mod_cbadmin', 'menu' ) );

		if ( $mode == 2 ) {
			$return					=	'<div class="cb_template cb_template_' . selectTemplate( 'dir' ) . '">'
									.		modCBAdminHelper::getTable( $menu, $disabled )
									.	'</div>';

			echo $return;
		} else {
			echo modCBAdminHelper::getMenu( $menu, $disabled );
		}
		break;
}
コード例 #3
0
ファイル: helper.php プロジェクト: bobozhangshao/HeartCare
 /**
  * @param  array  $component  The parent menu node
  * @param  array  $items      The menu items to output
  * @param  bool   $disabled   If the menu item should be disabled (grayed)
  * @param  int    $depth      The depth of the menu items
  * @return null|string
  */
 private static function getMenuItems($component, $items = array(), $disabled = false, $depth = 0)
 {
     $parentTitleCleanHtml = isset($component['title']) ? $component['title'] : null;
     $parentAccess = isset($component['access']) ? $component['access'] : null;
     $return = null;
     if ($parentTitleCleanHtml && modCBAdminHelper::checkAccess($parentAccess)) {
         if (!$disabled) {
             if (!$depth) {
                 $return .= '<li class="' . (checkJversion('3.0+') ? 'dropdown' : 'node') . '">' . '<a' . (checkJversion('3.0+') ? ' class="dropdown-toggle" data-toggle="dropdown"' : null) . ' href="#">' . $parentTitleCleanHtml . (checkJversion('3.0+') ? ' <span class="caret"></span>' : null) . '</a>';
             }
             if ($items) {
                 $menu = null;
                 foreach ($items as $item) {
                     $title = isset($item['title']) ? $item['title'] : null;
                     $link = isset($item['link']) ? $item['link'] : null;
                     $access = isset($item['access']) ? $item['access'] : null;
                     $icon = isset($item['icon']) ? $item['icon'] : null;
                     $target = isset($item['target']) ? $item['target'] : null;
                     $subMenu = isset($item['submenu']) ? $item['submenu'] : array();
                     if ($title && $link && modCBAdminHelper::checkAccess($access)) {
                         $subMenu = $subMenu ? modCBAdminHelper::getMenuItems($item, $subMenu, false, $depth + 1) : null;
                         $menu .= '<li' . ($subMenu ? ' class="' . (checkJversion('3.0+') ? 'dropdown-submenu' : 'node') . '"' : null) . '>' . '<a' . ($icon ? ' class="' . (checkJversion('3.0+') ? 'menu-' : 'icon-16-') . htmlspecialchars($icon) . '"' : null) . ' href="' . htmlspecialchars($link) . '"' . ($target ? ' target="' . htmlspecialchars($target) . '"' : null) . '>' . '<span>' . $title . '</span>' . '</a>' . $subMenu . '</li>';
                     } elseif ($title == 'spacer') {
                         $menu .= '<li class="' . (checkJversion('3.0+') ? 'divider' : 'separator') . '"><span></span></li>';
                     }
                 }
                 if ($menu) {
                     $return .= '<ul' . (checkJversion('3.0+') ? ' class="dropdown-menu"' : null) . '>' . $menu . '</ul>';
                 }
             }
             if (!$depth) {
                 $return .= '</li>';
             }
         } elseif (!$depth) {
             $return .= '<li class="disabled">' . '<a href="#">' . $parentTitleCleanHtml . '</a>' . '</li>';
         }
     }
     return $return;
 }
コード例 #4
0
ファイル: news.php プロジェクト: kosmosby/medicine-prof
?>
	<div class="cb_template cb_template_<?php echo selectTemplate( 'dir' ); ?>">
		<div class="cbFeed">
<?php
		foreach ( $items as $index => $item ) {
			$itemCount++;

			?>
				<div class="cbFeedItem<?php echo ( $modalDisplay ? ' cbTooltip' : null ) . ( $feedEntries && ( $index >= $feedEntries ) ? ' cbFeedItemDisabled' : null ); ?>" <?php echo ( $modalDisplay ? cbTooltip( $_CB_framework->getUi(), modCBAdminHelper::longDescription( $item->description ), $item->title, array( $modalWidth, $modalHeight ), null, null, null, 'data-cbtooltip-modal="true" data-cbtooltip-callback-show="cbFeedShow" data-cbtooltip-callback-hide="cbFeedHide"' ) : null ); ?>>
					<div class="media">
						<a class="pull-left" href="#">
							<div class="cbFeedItemLogo media-object"><?php echo modCBAdminHelper::descriptionIcon( $item->description ); ?></div>
						</a>
						<div class="media-body">
							<h4 class="cbFeedItemTitle media-heading"><a href="<?php echo htmlspecialchars( $item->link ); ?>" target="_blank"><strong><?php echo $item->title; ?></strong></a></h4>
							<div class="cbFeedItemDesc"><?php echo modCBAdminHelper::shortDescription( $item->description, 200 ); ?></div>
							<small class="cbFeedItemDate"><?php echo cbFormatDate( $item->pubDate, true, 'timeago' ); ?></small>
						</div>
					</div>
				</div>
			<?php

			if ( $feedEntries ) {
				if ( ( $itemCount >= $feedEntries ) && ( ( $index + 1 ) != count( $items ) ) ) {
					?><button type="button" class="btn btn-primary btn-lg btn-block cbFeedShowMore"><?php echo CBTxt::T( 'More' ); ?></button><?php

					$itemCount	=	0;
				}
			}
		}
?>