Skip to content

Instantly share code, notes, and snippets.

<?php
// See the following OnpubAPI tutorial for more info:
// http://onpubco.com/index.php?articleID=76&sectionID=2
// Establish the connection to the Onpub database.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );
// Include the OnpubAPI classes.
include 'onpub/api/onpubapi.php';
<?php
// Include the Onpub API files.
include 'onpub/api/onpubapi.php';
try {
// Connect to the Onpub database.
// Replace host, dbname, username, and password with your own DB connection
// info.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );
<?php
// See the following OnpubAPI tutorial for more info:
// http://onpubco.com/index.php?articleID=76&sectionID=2
// Establish the connection to the Onpub database.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );
// Include the OnpubAPI classes.
include 'onpub/api/onpubapi.php';
<?php
// See the following OnpubAPI tutorial for more info:
// http://onpubco.com/index.php?articleID=78&sectionID=2
// This example is based on an example by Anis uddin Ahmad, the author of
// Universal Feed Writer.
// Include the required classes.
include 'FeedWriter.php';
<?php
/* To run this tutorial on your own system, save this file as
* onpubarticles_tutorial.php in a directory where Onpub is installed (or
* adjust the include path below), then on a command line type:
* php onpubarticles_tutorial.php
*/
/* Include the OnpubAPI classes.
* Assumes Onpub is installed in the same directory as this file.
<?php
// Establish the connection to the Onpub database.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );
// Include the OnpubAPI classes.
include 'onpub/api/onpubapi.php';
// Construct an OnpubArticles object. This represents the OnpubArticles table
// in the database.
<?php
include 'onpub/api/onpubapi.php';
// Establish the connection to the Onpub database.
$pdo = new PDO("mysql:host=localhost;dbname=test", "test", "test");
$oArticles = new OnpubArticles($pdo);
$qo = new OnpubQueryOptions();
@onpubcom
onpubcom / onpub-menu.css
Created February 19, 2012 15:53
Android Design inspired CSS for Onpub frontend drop-down menus.
/* Onpub (TM)
* Copyright (C) 20112 Onpub.com <http://onpub.com/>
* Author: Corey H.M. Taylor <corey@onpub.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2.
*/
/* Android Design inspired CSS for Onpub frontend drop-down menus.
@onpubcom
onpubcom / onpub.css
Created February 19, 2012 15:51
Android Design inspired CSS for Onpub frontends.
/* Onpub (TM)
* Copyright (C) 2012 Onpub.com <http://onpub.com/>
* Author: Corey H.M. Taylor <corey@onpub.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2.
*/
/* Android Design inspired CSS for Onpub frontends.
#/usr/bin/env bash
# Install some pacakages we'll need to compile the driver below.
sudo dnf install gcc kernel-devel -y
# Create working dir for Broadcom driver files and patches.
mkdir hybrid_wl_f23
# Change to working dir.
cd hybrid_wl_f23