/**
  * Constructor. Set the default widget options and create widget.
  *
  * @since 0.1.8
  */
 function __construct()
 {
     $this->defaults = array('title' => '', 'posts_cat' => '', 'posts_num' => 1, 'posts_offset' => 0, 'orderby' => '', 'order' => '', 'exclude_displayed' => 0, 'show_image' => 0, 'image_alignment' => '', 'image_size' => '', 'num_cols' => 3, 'layout_style' => 'type1', 'permalink_button' => 0, 'permalink_button_style' => 'flbuilder', 'permalink_button_class' => 'default', 'permalink_button_align' => 'left', 'show_gravatar' => 0, 'gravatar_alignment' => '', 'gravatar_size' => '', 'show_title' => 0, 'show_byline' => 0, 'post_info' => '[post_date] ' . __('By', 'genesis') . ' [post_author_posts_link] [post_comments]', 'show_content' => 'excerpt', 'content_limit' => '', 'more_text' => __('[Read More...]', 'genesis'), 'extra_num' => '', 'extra_title' => '', 'more_from_category' => '', 'more_from_category_text' => __('More Posts from this Category', 'genesis'));
     $widget_ops = array('classname' => 'featured-content featuredpost', 'description' => __('Displays featured posts with thumbnails', 'genesis'));
     $control_ops = array('id_base' => 'badabing-featured-post', 'width' => 505, 'height' => 350);
     parent::__construct('badabing-featured-post', _b('Badabing - Featured Posts', 'bbessentials'), $widget_ops, $control_ops);
 }
 /**
  * Sets up the widgets name etc
  */
 public function __construct()
 {
     $this->defaults = array('title' => '', 'posts_cat' => '', 'posts_num' => 1, 'posts_offset' => 0, 'orderby' => '', 'order' => '', 'exclude_displayed' => 0, 'displayorder' => 'titlefirst');
     $widget_ops = array('classname' => 'badabing-simple-posts', 'description' => __('Displays featured posts', 'genesis'));
     $control_ops = array('id_base' => 'badabing_get_simple', 'width' => 505, 'height' => 350);
     // widget actual processes
     parent::__construct('badabing_get_simple', _b('Badabing - Simple Posts', 'bbessentials'), $widget_ops, $control_ops);
 }
 /**
  * Sets up the widgets name etc
  */
 public function __construct()
 {
     $this->defaults = array('title' => '', 'posts_cat' => '', 'posts_num' => 10, 'posts_offset' => 0, 'style' => 'style1', 'showquotes' => 1, 'orderby' => '', 'order' => '');
     $widget_ops = array('classname' => 'badabing-team-display', 'description' => _b('Displays Team Members', 'bbessentials'));
     $control_ops = array('id_base' => 'badabing_team_display', 'width' => 200, 'height' => 200);
     //add_action ('load-widgets.php' , array ( &$this , 'badabing_team_display_custom_load' ) );
     // widget actual processes
     parent::__construct('badabing_team_display', _b('Badabing - Team Display', 'bbessentials'), $widget_ops, $control_ops);
 }
 /**
  * Sets up the widgets name etc
  */
 public function __construct()
 {
     $this->defaults = array('title' => '', 'bdisplay' => 'left', 'facebookurl' => '#', 'facebooktext' => 'Facebook', 'twitterurl' => '#', 'twittertext' => 'Twitter', 'googleplusurl' => '#', 'googleplustext' => 'Google+', 'youtubeurl' => '#', 'youtubetext' => 'Youtube', 'target' => '_blank', 'order' => '', 'outcolor' => '', 'hovercolor' => '');
     $widget_ops = array('classname' => 'badabing-social-icons', 'description' => _b('Displays Social Icons', 'bbessentials'));
     $control_ops = array('id_base' => 'badabing_social_icons', 'width' => 505, 'height' => 350);
     add_action('load-widgets.php', array(&$this, 'my_custom_load'));
     // widget actual processes
     parent::__construct('badabing_social_icons', _b('Badabing - Social Icons', 'bbessentials'), $widget_ops, $control_ops);
 }
/**
 * Checks for activated Genesis Framework and its minimum version before allowing plugin to activate
 *
 * @author Nathan Rice, Remkus de Vries
 * @uses fst_genesis_translations_activation_check()
 * @since 1.0
 * @version 2.0.2
 */
function fst_badabing_essentials_activation_check()
{
    // Find Genesis Theme Data
    $theme = wp_get_theme('genesis');
    // Get the version
    $version = $theme->get('Version');
    // Set what we consider the minimum Genesis version
    $minimum_genesis_version = '1.9';
    // Restrict activation to only when the Genesis Framework is activated
    if (basename(get_template_directory()) != 'genesis') {
        deactivate_plugins(plugin_basename(__FILE__));
        // Deactivate ourself
        wp_die(sprintf(_b('Whoa.. this plugin only works when you have installed the %1$sGenesis Framework%2$s', 'bbessentials'), '<a href="http://forsitemedia.net/go/genesis/" target="_new">', '</a>'));
    }
    // Set a minimum version of the Genesis Framework to be activated on
    if (version_compare($version, $minimum_genesis_version, '<')) {
        deactivate_plugins(plugin_basename(__FILE__));
        // Deactivate ourself
        wp_die(sprintf(_b('Uhm, the thing of it is, you kinda need the %1$sGenesis Framework %2$s%3$s or greater for these translations to make any sense.', 'bbessentials'), '<a href="http://forsitemedia.net/go/genesis/" target="_new">', $latest, '</a>'));
    }
}
			:vb_script,
			:javascript,
			:java_applets,
			:crawler,
			:stripper,
			:wap,
			:netclr
		)';
// this line grabs a lot of useful info from the user agent and compares it with stuff php knows internally about that browser. it's easy but not great. in this case, im opting for easy.
$browser = get_browser(null, true);
if (_b('browser') == 'IE' && (int) _b('version') < 8) {
    header('Location: http://www.apple.com/safari/download/');
    exit;
    // also exist the page because php won't do it for you from a header redirect. You'll end up processing the whole thing pointlessly.
}
$values = array(':visitor_id' => $visitor_id, ':ip_guess' => guess_ip(), ':HTTP_CLIENT_IP' => _s('HTTP_CLIENT_IP'), ':HTTP_X_FORWARDED_FOR' => _s('HTTP_X_FORWARDED_FOR'), ':REMOTE_ADDR' => _s('REMOTE_ADDR'), ':platform' => _b('platform'), ':browser' => _b('browser'), ':version' => _b('version'), ':css_version' => _b('cssversion'), ':frames' => _b('frames'), ':iframes' => _b('iframes'), ':tables' => _b('tables'), ':cookies' => _b('cookies'), ':bg_sounds' => _b('backgroundsounds'), ':vb_script' => _b('vbscript'), ':javascript' => _b('javascript'), ':java_applets' => _b('javaapplets'), ':crawler' => _b('crawler'), ':stripper' => _b('stripper'), ':wap' => _b('wap'), ':netclr' => _b('netclr'));
$query = $db->prepare($sql) or die(__LINE__ . ' - ' . print_r($db->errorInfo(), true));
$query->execute($values) or die(__LINE__ . ' - ' . print_r($db->errorInfo(), true));
?>
<html>
<head>
	<title>Playing with fire, vol 2</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<style type="text/css">
		body{
			margin:0;
			padding:0;
			border:0;
		}

		*{
         if (@dba_affected_rows($db_query)) {
             $db_query = "DELETE FROM " . _DB_PREF_ . "_featureCollect_msg WHERE collect_id='{$collect_id}'";
             $del_msg = dba_affected_rows($db_query);
             $db_query = "DELETE FROM " . _DB_PREF_ . "_featureCollect_member WHERE collect_id='{$collect_id}'";
             $del_member = dba_affected_rows($db_query);
             $_SESSION['error_string'] = _('SMS collect with all its messages and members has been deleted') . " (" . _('keyword') . ": " . $collect_keyword . ")";
         }
     }
     header("Location: index.php?app=menu&inc=feature_sms_collect&op=sms_collect_list");
     exit;
     break;
 case "sms_collect_add":
     if ($err = $_SESSION['error_string']) {
         $content = "<div class=error_string>{$err}</div>";
     }
     $content .= "\n\t\t\t<h2>" . _('Manage collect') . "</h2>\n\t\t\t<h3>" . _('Add SMS collect') . "</h3>\n\t\t\t<form action=index.php?app=menu&inc=feature_sms_collect&op=sms_collect_add_yes method=post>\n\t\t\t<table width=100%>\n\t\t\t<tr>\n\t\t\t\t<td width=270>" . _('SMS collect keyword') . "</td><td><input type=text size=8 maxlength=10 name=add_collect_keyword value=\"{$add_collect_keyword}\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('SMS collect reply') . "</td><td><input type=text size=30 maxlength=200 name=add_collect_msg value=\"{$add_collect_msg}\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Forward to email') . "</td><td><input type=text size=30 maxlength=250 name=add_collect_fwd_email value=\"{$add_collect_fwd_email}\"></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<p><input type=submit class=button value=\"" . _('Save') . "\">\n\t\t\t</form>\n\t\t\t" . _b('index.php?app=menu&inc=feature_sms_collect&op=sms_collect_list');
     echo $content;
     break;
 case "sms_collect_add_yes":
     $add_collect_keyword = strtoupper($_REQUEST['add_collect_keyword']);
     $add_collect_msg = $_REQUEST['add_collect_msg'];
     $add_collect_fwd_email = $_REQUEST['add_collect_fwd_email'];
     if ($add_collect_keyword && $add_collect_msg) {
         if (checkavailablekeyword($add_collect_keyword)) {
             $db_query = "\n\t\t\t\t\tINSERT INTO " . _DB_PREF_ . "_featureCollect (uid,collect_keyword,collect_msg, collect_fwd_email)\n\t\t\t\t\tVALUES ('{$uid}','{$add_collect_keyword}','{$add_collect_msg}', '{$add_collect_fwd_email}')";
             if ($new_uid = @dba_insert_id($db_query)) {
                 $_SESSION['error_string'] = _('SMS collect has been added') . " (" . _('keyword') . ": " . $add_collect_keyword . ")";
             }
         } else {
             $_SESSION['error_string'] = _('SMS collect already exists, reserved or use by other feature') . " (" . _('keyword') . ": " . $add_collect_keyword . ")";
         }
Example #8
0
<?php

/**
 * Pi Engine (http://pialog.org)
 *
 * @link         http://code.pialog.org for the Pi Engine source repository
 * @copyright    Copyright (c) Pi Engine http://pialog.org
 * @license      http://pialog.org/license.txt BSD 3-Clause License
 */
return array('search' => array('name' => 'search', 'title' => _b('Search'), 'description' => _b('Search box.'), 'render' => array('block', 'search'), 'template' => 'search', 'config' => array('target' => array('title' => _a('Target'), 'edit' => array('type' => 'select', 'options' => array('options' => array('_self' => _a('_self'), '_blank' => _a('_blank')))), 'value' => '_self'))));
Example #9
0
 /**
  * Site infomation block
  *
  * @return array
  */
 public static function site()
 {
     return array('caption' => sprintf(_b('About %s'), Pi::config('sitename')), 'items' => array(_b('Site name') => Pi::config('sitename'), _b('Slogan') => Pi::config('slogan')));
 }
<?php

if ($_FORM->objSelectedShowcase) {
    ?>
	<h2><?php 
    _p($_FORM->objSelectedShowcase->Name);
    ?>
</h2>
	<img src="<?php 
    _p($_FORM->objSelectedShowcase->GetDialogBoxPath());
    ?>
" style="width: 300px; height: 300px; margin: 20px 45px;"/><br/>
	<?php 
    _b($_FORM->objSelectedShowcase->Description);
    ?>
<br/>
	<p>For more information, visit <a href="<?php 
    _p($_FORM->objSelectedShowcase->Url);
    ?>
"><?php 
    _p($_FORM->objSelectedShowcase->Url);
    ?>
</a></p>
	<p><?php 
    $this->btnClose->Render('Text=Close Window');
    ?>
</p>
<?php 
}
Example #11
0
 /**
  * List custom articles and with a slideshow besides article list
  * 
  * @param array   $options
  * @param string  $module
  * @return boolean 
  */
 public static function recommendedSlideshow($options = array(), $module = null)
 {
     if (!$module) {
         return false;
     }
     // Getting custom article list
     $columns = array('subject', 'summary', 'time_publish', 'image');
     $ids = explode(',', $options['articles']);
     foreach ($ids as &$id) {
         $id = trim($id);
     }
     $where = array('id' => $ids);
     $articles = Entity::getAvailableArticlePage($where, 1, 10, $columns, null, $module);
     $config = Pi::config('', $module);
     $image = $config['default_feature_thumb'];
     $image = Pi::service('asset')->getModuleAsset($image, $module);
     foreach ($articles as &$article) {
         $article['subject'] = mb_substr($article['subject'], 0, $options['max_subject_length'], 'UTF-8');
         $article['summary'] = mb_substr($article['summary'], 0, $options['max_summary_length'], 'UTF-8');
         $article['image'] = $article['image'] ? Media::getThumbFromOriginal(Pi::url($article['image'])) : $image;
     }
     // Getting image link url
     $urlRows = explode('\\n', $options['image-link']);
     $imageLinks = array();
     foreach ($urlRows as $row) {
         list($id, $url) = explode(':', trim($row), 2);
         $imageLinks[trim($id)] = trim($url);
     }
     // Fetching image ID
     $images = explode(',', $options['images']);
     $imageIds = array();
     foreach ($images as $key => &$image) {
         $image = trim($image);
         if (is_numeric($image)) {
             $imageIds[] = $image;
         } else {
             $url = $image ?: 'image/default-recommended.png';
             $image = array('url' => Pi::service('asset')->getModuleAsset($url, $module), 'link' => $imageLinks[$key + 1], 'title' => _b('This is default recommended image'), 'description' => _b('You should to add your own images and its title and description!'));
         }
     }
     if (!empty($imageIds)) {
         $images = array();
         $rowset = Pi::model('media', $module)->select(array('id' => $imageIds));
         foreach ($rowset as $row) {
             $id = $row['id'];
             $link = isset($imageLinks[$id]) ? $imageLinks[$id] : '';
             $images[] = array('url' => Pi::url($row['url']), 'link' => $link, 'title' => $row['title'], 'description' => $row['description']);
         }
     }
     return array('articles' => $articles, 'target' => $options['target'], 'style' => $options['block-style'], 'elements' => (array) $options['element'], 'height' => $options['image-height'], 'images' => $images, 'config' => Pi::config('', $module), 'rows' => $options['description_rows']);
 }
Example #12
0
_p($this->objPackage->PackageCategory->Name);
?>
</strong></a>
		</div>
		<div class="right">
			<?php 
if ($this->btnEdit) {
    $this->btnEdit->Render('Text=Edit This Package');
}
?>
		</div>
	</div>

	<div style="background-color: #ddd; padding: 5px 10px; border-bottom: 1px solid #999;">
		<?php 
_b($this->objPackage->Description);
?>
	</div>
	
	<div style="background-color: #ffd; padding: 5px 10px; border: 1px solid #cc9; margin-top: 12px; margin-bottom: 12px; width: 740px; margin-left: 100px;">
<?php 
if ($objContribution = $this->objPackage->GetMostRecentContribution()) {
    ?>
		To download and install any of the QPM packages below, use the <strong>qpm-download</strong> command in your Qcodo installation, for example:<br/>
		<strong style="font-family: monaco, courier, courier new, monospaced; position: relative; left: 50px;">
			qcodo qpm-download <?php 
    _p($objContribution->Person->Username);
    ?>
/<?php 
    _p($this->objPackage->Token);
    ?>
<?php

$_FORM->pnlContentHeadline->Render();
?>

<div style="border: 1px solid #999; padding: 0; margin: 0; overflow: auto;"><img src="<?php 
_p($_FORM->objWikiVersion->WikiImage->GetImageSourceUrl());
?>
"/></div>

<br clear="all"/>

<?php 
_b($this->objWikiVersion->WikiImage->Description);
Example #14
0
 public static function recentEvent($options = array(), $module = null)
 {
     // Set options
     $block = array();
     $block = array_merge($block, $options);
     $where = array('status' => 1);
     /* $eventModel = Pi::model('extra', 'event');
        $eventTable = $eventModel->getTable();
        $eventAdapter = $eventModel->getAdapter();
        // Set sql
        $sql = "SELECT * FROM `%s` WHERE  (`status` = 1 AND time_end > %s ) OR (`status` = 1 AND `time_end` = 0 AND time_start > %s ) ORDER BY `time_start` ASC, `id` ASC LIMIT %s";
        // Set sql
        $sql = sprintf(
            $sql,
            $eventTable,
            strtotime("-1 day"),
            strtotime("-1 day"),
            intval($block['number'])
        );
        // query
        try {
            $rowset = $eventAdapter->query($sql, 'execute');
            $rowset = $rowset->toArray();
            foreach ($rowset as $row) {
                $list[] = $row['id'];
                $block['resources'][$row['id']] = array();
            }
        } catch (\Exception $exception) {
            $where['time_publish > ?'] = strtotime("-1 day");
        } */
     $select = Pi::model('extra', 'event')->select()->where(function ($where) {
         $fromWhere = clone $where;
         $toWhere = clone $where;
         $fromWhere->equalTo('status', 1);
         $fromWhere->greaterThan('time_end', strtotime("-1 day"));
         $toWhere->equalTo('status', 1);
         $toWhere->equalTo('time_end', 0);
         $toWhere->greaterThan('time_start', strtotime("-1 day"));
         $where->andPredicate($fromWhere)->orPredicate($toWhere);
     })->order('time_start ASC, id ASC')->limit(intval($block['number']));
     $rowset = Pi::model('extra', 'event')->selectWith($select)->toArray();
     foreach ($rowset as $row) {
         $list[] = $row['id'];
         $block['resources'][$row['id']] = array();
     }
     $where = array('status' => 1);
     if (isset($block['topic-id']) && !empty($block['topic-id']) && !in_array(0, $block['topic-id'])) {
         $table = 'link';
         $where['topic'] = $block['topic-id'];
         $where['story'] = $list;
     } else {
         $table = 'story';
         $where['id'] = $list;
     }
     //$table = 'story';
     //$where['id'] = $list;
     $order = array('time_publish ASC', 'id ASC');
     // Set event
     $events = Pi::api('event', 'event')->getEventList($where, $order, '', $block['number'], 'full', $table);
     foreach ($events as $event) {
         $block['resources'][$event['id']] = $event;
     }
     // Set more link
     $block['morelink'] = Pi::url(Pi::service('url')->assemble('event', array('module' => $module, 'controller' => 'index', 'action' => 'index')));
     // Language
     _b('free!');
     _b('Toman');
     // return
     return $block;
 }
Example #15
0
 public static function random($options, $module = null)
 {
     $block = sprintf(_b('Block generated by %s through %s w/o template'), $module, __METHOD__);
     return $block;
 }
<?php

$_FORM->pnlContentHeadline->Render();
?>

<?php 
_p($this->objWikiVersion->WikiFile->DisplayDownloadLink(), false);
?>

<br clear="all"/><br clear="all"/>

<?php 
_b($this->objWikiVersion->WikiFile->Description);