Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Plugin Name: SMC Card
- * Plugin URI: http://connections-pro.com/
- * Description: A business directory and address book manager.
- * Version: 0.7.9.3
- * Author: Template Only, Todd Broadbent and Matt Vona
- * Author URI: http://connections-pro.com/
- * Text Domain: connections
- * Domain Path: languages
- *
- * Copyright 2009 Steven A. Zahm ( email : helpdesk@connections-pro.com )
- *
- * @package Connections
- * @subpackage Template : SMC Card
- * @copyright Copyright (c) 2013, Steven A. Zahm
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
- * @since 0.7.9
- */
- // Exit if accessed directly
- if ( ! defined( 'ABSPATH' ) ) exit;
- if ( ! class_exists( 'CN_SMC_Card' ) ) {
- class CN_SMC_Card {
- public static function register() {
- $atts = array(
- 'class' => 'CN_SMC_Card',
- 'name' => 'SMC Entry Card',
- 'slug' => 'smc-card',
- 'type' => 'all',
- 'version' => '2.0',
- 'author' => 'Steven A. Zahm',
- 'authorURL' => 'connections-pro.com',
- 'description' => 'This is the SMC template.',
- 'custom' => FALSE,
- 'path' => plugin_dir_path( __FILE__ ),
- 'url' => plugin_dir_url( __FILE__ ),
- 'thumbnail' => 'thumbnail.png',
- 'parts' => array(),
- );
- cnTemplateFactory::register( $atts );
- }
- public function __construct( $template ) {
- $this->template = $template;
- $template->part( array( 'tag' => 'smc-card', 'type' => 'action', 'callback' => array( $this, 'smc-card' ) ) );
- }
- public function smccard( $entry ) {
- ?>
- <div class="cn-entry">
- <div>
- <?php $entry->getImage(); ?>
- <div style="clear:both;"></div>
- <div style="margin-bottom: 10px;">
- <span style="font-size:larger;font-variant: small-caps"><strong><?php echo $entry->getNameBlock(); ?></strong></span>
- <?php $entry->getTitleBlock(); ?>
- <?php $entry->getOrgUnitBlock(); ?>
- <?php $entry->getContactNameBlock(); ?>
- </div>
- <?php $entry->getAddressBlock(); ?>
- </div>
- <div align="right">
- <?php $entry->getFamilyMemberBlock(); ?>
- <?php $entry->getPhoneNumberBlock(); ?>
- <?php $entry->getEmailAddressBlock(); ?>
- <?php $entry->getImBlock(); ?>
- <?php $entry->getSocialMediaBlock(); ?>
- <?php $entry->getLinkBlock(); ?>
- <?php $entry->getDateBlock(); ?>
- </div>
- <div style="clear:both"></div>
- <div class="cn-meta" align="left" style="margin-top: 6px">
- <span style="display: block; margin-bottom: 8px;"><?php $entry->getCategoryBlock( array( 'separator' => ', ', 'before' => '<span>', 'after' => '</span>' ) ); ?></span>
- <?php if ( cnSettingsAPI::get( 'connections', 'connections_display_entry_actions', 'vcard' ) ) $entry->vcard( array( 'before' => '<span>', 'after' => '</span>' ) ); ?>
- <?php
- cnTemplatePart::updated(
- array(
- 'timestamp' => $entry->getUnixTimeStamp(),
- 'style' => array(
- 'font-size' => 'x-small',
- 'font-variant' => 'small-caps',
- 'position' => 'absolute',
- 'right' => '36px',
- 'bottom' => '24px',
- )
- )
- );
- cnTemplatePart::returnToTop( array( 'style' => array( 'position' => 'absolute', 'right' => '8px', 'bottom' => '5px' ) ) );
- ?>
- </div>
- </div>
- <?php
- }
- }
- add_action( 'cn_register_template', array( 'CN_SMC_Card', 'register' ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement