From d32596ef866c813f2463f74a1896c19bdbf0cd01 Mon Sep 17 00:00:00 2001 From: Andrew Powers Date: Wed, 21 Mar 2012 13:20:53 -0700 Subject: [PATCH] Pro tag and new watermark handling// option --- admin/class.options.engine.php | 4 +++- admin/css/admin.css | 12 ++++++++++++ includes/config.options.php | 12 ++++++++++++ includes/library.templates.php | 16 ++++++++++------ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/admin/class.options.engine.php b/admin/class.options.engine.php index 5334974d..58e476b6 100644 --- a/admin/class.options.engine.php +++ b/admin/class.options.engine.php @@ -320,7 +320,9 @@ function get_option_title($oid, $o){ if( isset($o['docslink']) ) printf('Video Tutorial', ($o['vidtitle'] ? $o['vidtitle'] : ''), $o['docslink'], PL_ADMIN_IMAGES . '/link-docs.jpg' ); - printf('%s
%s
', $o['title'], $o['shortexp']); + $protag = ($o['version'] == 'pro') ? 'Pro' : ''; + + printf('%s %s
%s
', $o['title'], $protag, $o['shortexp']); ?> diff --git a/admin/css/admin.css b/admin/css/admin.css index a753aa7a..e3e71017 100644 --- a/admin/css/admin.css +++ b/admin/css/admin.css @@ -591,6 +591,18 @@ .optiontitle small { font-size: 11px; } + + .optiontitle .protag{ + vertical-align: top; + padding: 2px 5px; + font-size: .85em; + line-height: 1.3em; + margin-top: -1px; + display: inline-block; + background:rgba(0,0,0,.03); + color:rgba(0,0,0,.3); + border-radius:3px; + } .vidlink{float: right; background:#fff; box-shadow: 0 1px 3px #aaa;} .vidlink:hover{box-shadow: 0 1px 5px #888;} diff --git a/includes/config.options.php b/includes/config.options.php index c6362842..45f5a79f 100644 --- a/includes/config.options.php +++ b/includes/config.options.php @@ -105,6 +105,18 @@ function website_setup(){ 'shortexp' => __( 'Input Full URL to Apple touch image (.jpg, .gif, .png)', 'pagelines' ), 'exp' => __( 'Enter the full URL location of your Apple Touch Icon which is visible when your users set your site as a webclip in Apple Iphone and Touch Products. It is an image approximately 57px by 57px in either .jpg, .gif or .png format.', 'pagelines' ) ), + 'pl_watermark' => array( + 'version' => 'pro', + 'type' => 'multi_option', + 'selectvalues' => array( + 'watermark_image' => array('type' =>'image_upload', 'inputlabel' => 'Watermark Image', 'default' => PL_IMAGES.'/pagelines.png'), + 'watermark_link' => array('type' => 'text', 'inputlabel' => 'Watermark Link (Blank for None)', 'default' => 'http://www.pagelines.com'), + 'watermark_hide' => array('type' => 'check', 'inputlabel' => "Hide Watermark") + ), + 'title' => __( 'Website Watermark', 'pagelines' ), + 'shortexp' => __( 'Configure your website watermark (in footer)', 'pagelines' ), + 'exp' => __( '', 'pagelines' ) + ), 'sidebar_no_default' => array( 'default' => '', diff --git a/includes/library.templates.php b/includes/library.templates.php index acdacf2d..1766dad6 100644 --- a/includes/library.templates.php +++ b/includes/library.templates.php @@ -653,15 +653,19 @@ function pl_special_url( $t ){ */ function pagelines_cred(){ - if( !VPRO || ploption( 'partner_link' ) || ploption( 'show_credit' ) || has_action('show_pagelines_leaf') ) { - - $img = sprintf('%s by PageLines', apply_filters('pagelines_leaf_image', PL_IMAGES.'/pagelines.png'), THEMENAME); + if( !VPRO || (VPRO && !ploption('watermark_hide')) || has_action('show_pagelines_leaf') ) { + + $image = (VPRO && ploption('watermark_image')) ? ploption('watermark_image') : PL_IMAGES.'/pagelines.png'; + + $alt = (VPRO) ? get_bloginfo('name') : 'Build a website with PageLines'; - $url = load_pagelines_option('partner_link', 'http://www.pagelines.com'); + $url = (VPRO && ploption('watermark_link')) ? ploption('watermark_link') : 'http://www.pagelines.com'; + + $img = sprintf('%s', $image, $alt); - $link = (!apply_filters('no_leaf_link', '')) ? sprintf('%s', $url, 'PageLines', $img ) : $img; + $link = (!apply_filters('no_leaf_link', '')) ? sprintf('%s', $url, $alt, $img ) : $img; - $cred = sprintf('
%s
', $link); + $cred = sprintf('
%s
', $link); echo apply_filters('pagelines_leaf', $cred);