mirror of
https://github.com/e107inc/e107.git
synced 2025-08-29 17:19:56 +02:00
e_sitelink.php now supports html as well as link array. e_sitelink.php example added to Plugin Builder and _blank plugin.
Mega-Menus will be super-easy with this enhancement.
This commit is contained in:
27
e107_plugins/_blank/css/blank.css
Normal file
27
e107_plugins/_blank/css/blank.css
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
/* e_sitelink */
|
||||
|
||||
/* this class name is auto-generated from the plugin name and function name e_sitelink */
|
||||
.-blank-megamenu { position: static !important; }
|
||||
|
||||
.mega-dropdown-menu {
|
||||
padding: 20px 15px 15px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-list { border-bottom: 0 solid #eee; }
|
||||
.nav-list > li {
|
||||
padding: 20px 15px 15px;
|
||||
|
||||
}
|
||||
.nav-list > li:last-child { border-right: 0 solid #eee; }
|
||||
.nav-list > li > a:hover { text-decoration: none; }
|
||||
.nav-list > li > a > span {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
|
102
e107_plugins/_blank/e_sitelink.php
Normal file
102
e107_plugins/_blank/e_sitelink.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Sitelinks configuration module - gsitemap
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/_blank/e_sitelink.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
/*if(!e107::isInstalled('gsitemap'))
|
||||
{
|
||||
return;
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
class _blank_sitelink // include plugin-folder in the name.
|
||||
{
|
||||
function config()
|
||||
{
|
||||
global $pref;
|
||||
|
||||
$links = array();
|
||||
|
||||
$links[] = array(
|
||||
'name' => "Drop-Down Links",
|
||||
'function' => "myCategories"
|
||||
);
|
||||
|
||||
$links[] = array(
|
||||
|
||||
'name' => 'Drop-Down MegaMenu',
|
||||
'function' => 'megaMenu'
|
||||
);
|
||||
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
|
||||
function megaMenu() // http://bootsnipp.com/snippets/33gmp
|
||||
{
|
||||
$text = '<div class="dropdown-menu mega-dropdown-menu">
|
||||
<div class="container-fluid2">
|
||||
<ul class="nav-list list-inline">
|
||||
<li><a data-filter=".89" href="#"><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Running.png"><span>BRICS</span></a></li>
|
||||
<li><a data-filter=".97" href="#"><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Basketball.png"><span>Latin America</span></a></li>
|
||||
<li><a data-filter=".96" href="#"><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Football.png"><span>USA</span></a></li>
|
||||
<li><a data-filter=".87" href="#"><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_Soccer.png"><span>Middle East</span></a></li>
|
||||
<li><a data-filter=".85" href="#"><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_MensTraining.png"><span>Asia</span></a></li>
|
||||
<li><a data-filter=".90" href="#"><img src="http://content.nike.com/content/dam/one-nike/globalAssets/menu_header_images/OneNike_Global_Nav_Icons_MensTraining.png"><span>Africa</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> ';
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function myCategories()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$sublinks = array();
|
||||
|
||||
$sql->select("_blank_info","*","faq_info_id != '' ORDER BY faq_info_order");
|
||||
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$sublinks[] = array(
|
||||
'link_name' => $tp->toHtml($row['faq_info_title'],'','TITLE'),
|
||||
'link_url' => e107::url('_blank', 'category', $row),
|
||||
'link_description' => $row['faq_info_about'],
|
||||
'link_button' => $row['faq_info_icon'],
|
||||
'link_category' => '',
|
||||
'link_order' => '',
|
||||
'link_parent' => '',
|
||||
'link_open' => '',
|
||||
'link_class' => intval($row['faq_info_class'])
|
||||
);
|
||||
}
|
||||
|
||||
return $sublinks;
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user