Skip to content

Instantly share code, notes, and snippets.

/*
* Bootstrap menu helper
* renders menu and optionally 1 sub menu deep
* Config array is same as for fuel_nav()
*/
function bootstrap_menu($config = NULL, $float = NULL, $toggle = TRUE) {
$menu = (is_array($config)) ? fuel_nav(array_merge($config, array('render_type' => 'array'))) : fuel_nav(array('render_type' => 'array'));
if (is_array($menu)) {
$container_class = isset($config['container_tag_class']) ? 'nav navbar-nav ' . $config['container_tag_class'] : 'nav navbar-nav';
$container_id = isset($config['container_tag_id']) ? ' id="' . $config['container_tag_id'] . '"' : '';
@RobertoNovelo
RobertoNovelo / Paypal Rest API Codeigniter
Last active July 28, 2020 12:59
CodeIgniter 3.x Paypal Rest API Authorize Capture Wrapper
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once(BASEPATH . '../application/libraries/PayPal-PHP-SDK/autoload.php');
use PayPal\Rest\ApiContext;
use PayPal\Auth\OAuthTokenCredential;
use PayPal\Api\Capture;
use PayPal\Api\Authorization;
use PayPal\Api\Amount;
use PayPal\Exception\PayPalConnectionException;
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">