Skip to content

Commit

Permalink
Pro tag and new watermark handling// option
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Powers committed Mar 21, 2012
1 parent 63263b9 commit d32596e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
4 changes: 3 additions & 1 deletion admin/class.options.engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ function get_option_title($oid, $o){
if( isset($o['docslink']) )
printf('<a class="vidlink" title="%s" href="%s" target="_blank"><img src="%s" class="docslink-video" alt="Video Tutorial" /></a>', ($o['vidtitle'] ? $o['vidtitle'] : ''), $o['docslink'], PL_ADMIN_IMAGES . '/link-docs.jpg' );

printf('<strong>%s</strong><br/><small>%s</small><br/>', $o['title'], $o['shortexp']);
$protag = ($o['version'] == 'pro') ? '<span class="protag">Pro</span>' : '';

printf('<strong>%s %s</strong><br/><small>%s</small><br/>', $o['title'], $protag, $o['shortexp']);

?>
</div>
Expand Down
12 changes: 12 additions & 0 deletions admin/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down
12 changes: 12 additions & 0 deletions includes/config.options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <strong>webclip</strong> 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' => '',
Expand Down
16 changes: 10 additions & 6 deletions includes/library.templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('<img src="%s" alt="%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('<img src="%s" alt="%s" />', $image, $alt);

$link = (!apply_filters('no_leaf_link', '')) ? sprintf('<a class="plimage" target="_blank" href="%s" title="%s">%s</a>', $url, 'PageLines', $img ) : $img;
$link = (!apply_filters('no_leaf_link', '')) ? sprintf('<a class="plimage" target="_blank" href="%s" title="%s">%s</a>', $url, $alt, $img ) : $img;

$cred = sprintf('<div id="cred" class="pagelines">%s</div><div class="clear"></div>', $link);
$cred = sprintf('<div id="cred" class="pagelines" style="display: block; visibility: visible;">%s</div><div class="clear"></div>', $link);

echo apply_filters('pagelines_leaf', $cred);

Expand Down

0 comments on commit d32596e

Please sign in to comment.