__( 'Primary Navigation Menu' ) )); define('WP_ALLOW_MULTISITE', true); add_custom_background(); //add_custom_image_header('header_style', 'admin_header_style'); } } add_action( 'init', 'register_my_menus' ); if ( function_exists('register_sidebar') ) { // Main Sidebar register_sidebar( array( 'name'=>'Sidebar', 'description' => 'Widgets in this area will be shown on the right-hand side in the main sidebar.', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ')); // HEADER register_sidebar( array( 'name'=>'Header', 'description' => 'Widgets in this area will be shown in the center of the header.', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ' )); } //Determine the location $path = get_bloginfo( 'stylesheet_directory' ); //Add the menu to the Settings sidenav in wp-admin function adStyle_admin_menu() { //add_menu_page(page_title, menu_title, access_level/capability, file, [function], [icon_url]); add_menu_page('adStyle', 'adStyle', 8, __FILE__, 'adStyle_panel_setting', get_bloginfo( 'stylesheet_directory' ).'/images/dollar-sign.png'); //add_submenu_page(__FILE__, 'Page title', 'Gordon\'s subLink1', 8, __FILE__, 'my_magic_function'); //add_submenu_page(__FILE__, 'Page title', 'Gordon\'s subLink2', 8, __FILE__, 'my_magic_function'); } add_action('admin_menu', 'adStyle_admin_menu'); //codefor settings in admin panel function adStyle_panel_setting() { $apaOptions = get_option("apaOptions"); if ($_POST['main-Submit']) { $apaOptions['paySand'] = $_POST['paySand']; $apaOptions['payEmail'] = $_POST['payEmail']; $apaOptions['payButton'] = $_POST['payButton']; $apaOptions['payReturn'] = $_POST['payReturn']; $apaOptions['clickButton'] = $_POST['clickButton']; update_option("apaOptions", $apaOptions); echo '
    Your settings have been saved
    '; } if (empty($apaOptions['payEmail'])){ $payEmail = 'payments@1stepwebsite.com'; } else { $payEmail = $apaOptions['payEmail'];}; if (empty($apaOptions['payButton'])){ $payButton = get_bloginfo('template_url').'/images/btn_buynowCC_LG.gif'; } else { $payButton = $apaOptions['payButton'];}; if (empty($apaOptions['payReturn'])){ $payReturn = get_bloginfo('wpurl'); } else { $payReturn = $apaOptions['payReturn'];}; $paySand = $apaOptions['paySand']; if (empty($paySand)) { $paySand = 'no'; }; if ($paySand == 'yes'){ $paySandYes = 'CHECKED'; $paySandNo = ''; } if ($paySand == 'no'){ $paySandYes = ''; $paySandNo = 'CHECKED'; } if (empty($apaOptions['clickButton'])){ $clickButton = get_bloginfo('template_url').'/images/buyNow.png'; } else { $clickButton = $apaOptions['clickButton'];}; ?>

    Adstyle for Wordpress

    More great themes at Wordpress Power Themes

    Paypal Settings

    Enable Sandbox for testing?       />Enable     />Disable
    When sandbox is enabled transaction will not be processed.
    Enable this only durring testing.

    Enter the PayPal email account?
    Enter a valiad PayPal email 'payments@1stepwebsite.com' This is the email address payments will be sent to.

    Enter Thank You page URL?
    After the transaction is completed, the customer need to be redirected to a thank you page. You need to enter that url here. http:///thank-you

    You can enter a custom button graphic.
    Please enter a complete "File URL".




    How To: Paypal Settings

    PayPal integration is done with shortcodes. To add a PayPal button to your page or post, add the following code, to your post or page.

    [paypal price="12.00" name="product1" shipping="0.00"]Button[/paypal]

    As you can see it is very simple to add a "buy now" button. You will want to replace the price with the price of your product, the name with the name of your product and if you want to charge a shipping amount just change "0.00" to your shipping fees.


    Click Bank

    At this time the Clickbank is used to promote click bank products. You can not use this shortcode to create your own clickbank product. If you want to create your own product, please contact us directly at WordpressPowerThemes.

    You can enter a custom button graphic.
    Please enter a complete "File URL".




    Clickbank integration is done with shortcodes. To add a PayPal button to your page or post, add the following code, to your post or page.

    [clickbank hopURL="http://1.jon.pay.clickbank.net" ]Button[/clickbank]

    As you can see it is very simple to add a "buy now" button. You will want to replace the hopURL with the url of the product you are promoting




    Recommended Adsense Colors

    You can ad your code directly to the header widget

    #FDF4E2 Border
    #DA944A Title
    #FDF4E2 Background
    #54340D Text
    #AEC2E1 URL




    Short Code Examples

    Shortcodes are a very easy way to display lot of things on your blog posts by inserting a very simple code. Pick the sortcode you want then copy and past the example code.

    Blue Highlight

    This should be highlighted blue

    [blue]This should be highlighted blue[/blue]

    Green Highlight

    This should be highlighted green

    [green]This should be highlighted green[/green]

    Red Box

    This should be highlighted red

    [red]This should be highlighted green[/red]

    Yellow Box

    This should be highlighted yellow

    [yellow]This should be highlighted yellow[/yellow]

    Quote

    Shortcodes are a very easy way to display lot of things on your blog posts by inserting a very simple code. Pick the sortcode you want then copy and past the example code.

    Gordon French, PowerThemes

    [quote author="Gordon French, PowerThemes"]Shortcodes are a very easy way to display lot of things on your blog posts by inserting a very simple code. Pick the sortcode you want then copy and past the example code.[/quote]

    Blue Box

    This should be in a Blue Box
    [blueBox]This should be in a Blue Box[/blueBox]

    Green Box

    This should be in a Green Box
    [greenBox]This should be in a Green Box[/greenBox]

    Red Box

    This should be in a Red Box
    [redBox]This should be in a Red Box[/redBox]

    Yellow Box

    This should be in a Yellow Box
    [yellowBox]This should be in a Yellow Box[/yellowBox]

    Grey Box

    This should be in a Grey Box
    [greyBox]This should be in a Grey Box[/greyBox]
    '9.99', 'name' => 'My Product', 'shipping' => '0.00'), $atts)); return '
    '; } add_shortcode('paypal', 'paypal_shortcode'); function get_first_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('//i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ //Defines a default image $first_img = "nope"; } return $first_img; } //ClickBank function clickbank_shortcode($atts, $content = null){ $apaOptions = get_option("apaOptions"); $clickButton = $apaOptions['clickButton']; if (empty($clickButton)) {$clickButton = get_bloginfo('template_url').'/images/buyNow.png';} extract(shortcode_atts(array('hopURL' => 'http://1.gfrench.pay.clickbank.net'), $atts)); return ' '; } add_shortcode('clickbank', 'clickbank_shortcode'); //SHort Codes function blue_highlight( $atts, $content = null ) { return '' . $content . '';} add_shortcode('blue', 'blue_highlight'); function green_highlight( $atts, $content = null ) { return '' . $content . '';} add_shortcode('green', 'green_highlight'); function yellow_highlight( $atts, $content = null ) { return '' . $content . '';} add_shortcode('yellow', 'yellow_highlight'); function red_highlight( $atts, $content = null ) { return '' . $content . '';} add_shortcode('red', 'red_highlight'); function blueBox_shortcode( $atts, $content = null ) { return '
    ' . $content . '
    '; } add_shortcode('blueBox', 'blueBox_shortcode'); function yellowBox_shortcode( $atts, $content = null ) { return '
    ' . $content . '
    '; } add_shortcode('yellowBox', 'yellowBox_shortcode'); function greenBox_shortcode( $atts, $content = null ) { return '
    ' . $content . '
    '; } add_shortcode('greenBox', 'greenBox_shortcode'); function redBox_shortcode( $atts, $content = null ) { return '
    ' . $content . '
    '; } add_shortcode('redBox', 'redBox_shortcode'); function greyBox_shortcode( $atts, $content = null ) { return '
    ' . $content . '
    '; } add_shortcode('greyBox', 'greyBox_shortcode'); function quote_shortcode($atts, $content = null){ extract(shortcode_atts(array('author' => 'something'), $atts)); return '

    ' . $content . '

    '.$author.'

    '; } add_shortcode('quote', 'quote_shortcode'); class truncate{ /* Public function for truncating content * Requires an string and a length * * Structure: * $truncateString = 'text ro truncate' * * Example: * $truncateString = truncate::doTruncate($_POST['truncate'], 100); * * Returns: * return truncated string; */ public static function doTruncate($truncateString, $limit, $break=".", $pad="...") { // return with no change if string is shorter than $limit if(strlen($truncateString) <= $limit) return $truncateString; // is $break present between $limit and the end of the string? if(false !== ($breakpoint = strpos($truncateString, $break, $limit))) { if($breakpoint < strlen($truncateString) - 1) { $truncateString = substr($truncateString, 0, $breakpoint) . $pad; } } return $truncateString; } } function power(){ $powerNeeds = '
    Wordpress Theme designed and provided by Wordpress Power Themes
    '; return $powerNeeds; } ?>