protected function _setUpPages()
 {
     // Set the root menu.
     $this->setRootMenuPageBySlug('edit.php?post_type=amazon_auto_links');
     // Set sub menus.
     $this->addSubMenuItems(array('strPageTitle' => __('Add Unit by Category', 'amazon-auto-links'), 'strPageSlug' => 'aal_add_category_unit', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strPageTitle' => __('Add Unit by Tag', 'amazon-auto-links'), 'strPageSlug' => 'aal_add_tag_unit', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strPageTitle' => __('Add Unit by Search', 'amazon-auto-links'), 'strPageSlug' => 'aal_add_search_unit', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strMenuTitle' => __('Manage Auto Insert', 'amazon-auto-links'), 'strURL' => admin_url('edit.php?post_type=aal_auto_insert')), array('strPageTitle' => $GLOBALS['pagenow'] == 'edit.php' && isset($_GET['mode'], $_GET['page'], $_GET['post_type'], $_GET['post']) && $_GET['mode'] == 'edit' && $_GET['page'] == 'aal_define_auto_insert' ? __('Edit Auto Insert', 'amazon-auto-links') : __('Add Auto Insert', 'amazon-auto-links'), 'strPageSlug' => 'aal_define_auto_insert', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strPageTitle' => __('Settings', 'amazon-auto-links'), 'strPageSlug' => 'aal_settings', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strPageTitle' => __('Templates', 'amazon-auto-links'), 'strPageSlug' => 'aal_templates', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strPageTitle' => __('About', 'amazon-auto-links'), 'strPageSlug' => 'aal_about', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")), array('strPageTitle' => __('Help', 'amazon-auto-links'), 'strPageSlug' => 'aal_help', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")));
     if ($this->oOption->isDebugMode()) {
         $this->addSubMenuItems(array('strPageTitle' => __('Debug', 'amazon-auto-links'), 'strPageSlug' => 'aal_debug', 'strScreenIcon' => AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png")));
     }
     // In-page tabs for the Add New Category Unit page.
     $this->addInPageTabs(array('strPageSlug' => 'aal_add_category_unit', 'strTabSlug' => 'set_category_unit_options', 'strTitle' => __('Select Categories', 'amazon-auto-links'), 'fHide' => true), array('strPageSlug' => 'aal_add_category_unit', 'strTabSlug' => 'select_categories', 'strTitle' => __('Select Categories', 'amazon-auto-links'), 'strParentTabSlug' => 'set_category_unit_options', 'fHide' => true));
     // In-page tabs for the Add Search Unit page.
     $this->addInPageTabs(array('strPageSlug' => 'aal_add_search_unit', 'strTabSlug' => 'initial_search_settings', 'strTitle' => __('Initial Options', 'amazon-auto-links'), 'fHide' => true), array('strPageSlug' => 'aal_add_search_unit', 'strTabSlug' => 'search_products', 'strTitle' => __('Product Search', 'amazon-auto-links'), 'strParentTabSlug' => 'initial_search_settings', 'fHide' => true), array('strPageSlug' => 'aal_add_search_unit', 'strTabSlug' => 'item_lookup', 'strTitle' => __('Item Lookup', 'amazon-auto-links'), 'strParentTabSlug' => 'initial_search_settings', 'fHide' => true), array('strPageSlug' => 'aal_add_search_unit', 'strTabSlug' => 'similarity_lookup', 'strTitle' => __('Similarity Lookup', 'amazon-auto-links'), 'strParentTabSlug' => 'initial_search_settings', 'fHide' => true));
     // The Settings page
     $this->addInPageTabs(array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'authentication', 'strTitle' => __('Authentication', 'amazon-auto-links'), 'numOrder' => 1), array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'general', 'strTitle' => __('General', 'amazon-auto-links'), 'numOrder' => 2), array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'misc', 'strTitle' => __('Misc', 'amazon-auto-links'), 'numOrder' => 3), array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'reset', 'strTitle' => __('Reset', 'amazon-auto-links'), 'numOrder' => 4), array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'support', 'strTitle' => __('Support', 'amazon-auto-links'), 'fHide' => true), array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'import_v1_options', 'strTitle' => __('Import v1 Options', 'amazon-auto-links'), 'fHide' => true), array('strPageSlug' => 'aal_settings', 'strTabSlug' => 'create_v3_options', 'strTitle' => __('Create v3 Options', 'amazon-auto-links'), 'fHide' => true));
     // $this->addInPageTabs(
     // array(
     // 'strPageSlug'    => 'extensions',
     // 'strTabSlug'    => 'get_extensions',
     // 'strTitle'        => __( 'Get Extensions', 'amazon-auto-links' ),
     // 'numOrder'        => 10,
     // )
     // );
     $this->addInPageTabs(array('strPageSlug' => 'aal_templates', 'strTabSlug' => 'table', 'strTitle' => __('Installed Templates', 'amazon-auto-links'), 'numOrder' => 1), array('strPageSlug' => 'aal_templates', 'strTabSlug' => 'get', 'strTitle' => __('Get Templates', 'amazon-auto-links'), 'numOrder' => 10));
     $this->addInPageTabs(array('strPageSlug' => 'aal_about', 'strTabSlug' => 'features', 'strTitle' => __('Features', 'amazon-auto-links')), array('strPageSlug' => 'aal_about', 'strTabSlug' => 'get_pro', 'strTitle' => __('Get Pro!', 'amazon-auto-links')), array('strPageSlug' => 'aal_about', 'strTabSlug' => 'contact', 'strTitle' => __('Contact', 'amazon-auto-links')), array('strPageSlug' => 'aal_about', 'strTabSlug' => 'change_log', 'strTitle' => __('Change Log', 'amazon-auto-links')));
     $this->addInPageTabs(array('strPageSlug' => 'aal_help', 'strTabSlug' => 'install', 'strTitle' => __('Installation', 'amazon-auto-links')), array('strPageSlug' => 'aal_help', 'strTabSlug' => 'faq', 'strTitle' => __('FAQ', 'amazon-auto-links')), array('strPageSlug' => 'aal_help', 'strTabSlug' => 'notes', 'strTitle' => __('Other Notes', 'amazon-auto-links')));
     /*
      * HTML elements and styling
      */
     $this->showPageHeadingTabs(false);
     // disables the page heading tabs by passing false.
     $this->setInPageTabTag('h2');
     $this->setInPageTabTag('h3', 'aal_add_category_unit');
     $this->showInPageTabs(false, 'aal_add_category_unit');
     $this->showInPageTabs(false, 'aal_add_search_unit');
     $this->showInPageTabs(false, 'aal_define_auto_insert');
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/admin.css'));
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/select_categories.css'), 'aal_add_category_unit', 'select_categories');
     // $this->enqueueStyle( AmazonAutoLinks_Commons::getPluginURL( 'asset/css/aal_add_category_unit.css' ), 'aal_add_category_unit' );
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/aal_add_search_unit.css'), 'aal_add_search_unit');
     // $this->enqueueStyle( AmazonAutoLinks_Commons::getPluginURL( 'asset/css/aal_add_tag_unit.css' ), 'aal_add_tag_unit' );
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/aal_settings.css'), 'aal_settings');
     // $this->enqueueStyle( AmazonAutoLinks_Commons::getPluginURL( 'asset/css/aal_define_auto_insert.css' ), 'aal_define_auto_insert' );
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/aal_templates.css'), 'aal_templates');
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/readme.css'), 'aal_about');
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/readme.css'), 'aal_help');
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('asset/css/get_pro.css'), 'aal_about', 'get_pro');
     $this->enqueueStyle(AmazonAutoLinks_Commons::getPluginURL('template/preview/style-preview.css'), 'aal_add_category_unit', 'select_categories');
     $this->setDisallowedQueryKeys(array('aal-option-upgrade', 'bounce_url'));
 }
 public function getTemplateFields($strSectionID, $strPrefix, $fButton = true, $strUnitType = 'category')
 {
     $arrItemFormat = AmazonAutoLinks_Unit::getItemFormatArray();
     return array(array('strFieldID' => $strPrefix . 'template_id', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Template Name', 'amazon-auto-links'), 'strType' => 'select', 'strDescription' => __('Sets a default template for this unit.', 'amazon-auto-links'), 'vLabel' => $GLOBALS['oAmazonAutoLinks_Templates']->getTemplateArrayForSelectLabel(), 'vDefault' => $GLOBALS['oAmazonAutoLinks_Templates']->getPluginDefaultTemplateID($strUnitType)), array('strFieldID' => $strPrefix . 'column', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Number of Columns', 'amazon-auto-links'), 'strType' => 'number', 'vClassAttribute' => ($intMaxCol = $GLOBALS['oAmazonAutoLinks_Option']->getMaxSupportedColumnNumber()) > 1 ? '' : 'disabled', 'vDisable' => $intMaxCol > 1 ? false : true, 'vMax' => $intMaxCol, 'vAfterInputTag' => "<div style='margin:auto; width:100%; clear: both;'><img src='" . AmazonAutoLinks_Commons::getPluginURL('asset/image/columns.gif') . "' title='" . __('The number of columns', 'amazon-auto-links') . "' style='width:220px; margin-top: 8px;' /></div>", 'strDescription' => __('This option requires a column supported template to be activated.') . ($intMaxCol > 1 ? '' : ' ' . sprintf(__('Get one <a href="%1$s" target="_blank">here</a>!'), 'http://en.michaeluno.jp/amazon-auto-links-pro/')), 'vDefault' => 4, 'vDelimiter' => ''), array('strFieldID' => $strPrefix . 'item_format', 'strTitle' => __('Item Format', 'amazon-auto-links'), 'strSectionID' => $strSectionID ? $strSectionID : null, 'strType' => 'textarea', 'vClassAttribute' => $GLOBALS['oAmazonAutoLinks_Option']->isAdvancedAllowed() ? '' : 'read-only', 'vReadOnly' => $GLOBALS['oAmazonAutoLinks_Option']->isAdvancedAllowed() ? false : true, 'vCols' => 60, 'vRows' => 4, 'strDescription' => __('Sets the layout of an item. The following variables are available.', 'amazon-auto-links') . '<br />' . '<code>%href%</code> - ' . __('product link url', 'amazon-auto-links') . '<br />' . '<code>%title%</code> - ' . __('title with HTML tags defined in the Title Format option', 'amazon-auto-links') . '<br />' . '<code>%title_text%</code> - ' . __('title without HTML tags', 'amazon-auto-links') . '<br />' . '<code>%image%</code> - ' . __('thumbnail with HTML tags defined in the Image Format option', 'amazon-auto-links') . '<br />' . '<code>%description%</code> - ' . __('description with HTML tags', 'amazon-auto-links') . '<br />' . '<code>%description_text%</code> - ' . __('description without HTML tags', 'amazon-auto-links') . '<br />' . '<code>%price%</code> - ' . __('the product price (only for the search unit type).', 'amazon-auto-links'), 'vDefault' => $arrItemFormat['item_format']), array('strFieldID' => $strPrefix . 'title_format', 'strTitle' => __('Title Format', 'amazon-auto-links'), 'strSectionID' => $strSectionID ? $strSectionID : null, 'strType' => 'textarea', 'vCols' => 60, 'vRows' => 4, 'vClassAttribute' => $GLOBALS['oAmazonAutoLinks_Option']->isAdvancedAllowed() ? '' : 'read-only', 'vReadOnly' => $GLOBALS['oAmazonAutoLinks_Option']->isAdvancedAllowed() ? false : true, 'strDescription' => __('Sets the layout of a title.', 'amazon-auto-links') . '<br />' . '<code>%href%</code> - ' . __('product link url', 'amazon-auto-links') . '<br />' . '<code>%title_text%</code> - ' . __('title', 'amazon-auto-links') . '<br />' . '<code>%description_text%</code> - ' . __('description without HTML tags', 'amazon-auto-links'), 'vDefault' => $arrItemFormat['title_format']), array('strFieldID' => $strPrefix . 'image_format', 'strTitle' => __('Image Format', 'amazon-auto-links'), 'strSectionID' => $strSectionID ? $strSectionID : null, 'strType' => 'textarea', 'vCols' => 60, 'vRows' => 4, 'vClassAttribute' => $GLOBALS['oAmazonAutoLinks_Option']->isAdvancedAllowed() ? '' : 'read-only', 'vReadOnly' => $GLOBALS['oAmazonAutoLinks_Option']->isAdvancedAllowed() ? false : true, 'strDescription' => __('Sets the layout of an image.', 'amazon-auto-links') . '<br />' . '<code>%href%</code> - ' . __('product link url', 'amazon-auto-links') . '<br />' . '<code>%title_text%</code> - ' . __('title', 'amazon-auto-links') . '<br />' . '<code>%src%</code> - ' . __('image url', 'amazon-auto-links') . '<br />' . '<code>%max_width%</code> - ' . __('image size', 'amazon-auto-links') . '<br />' . '<code>%description_text%</code> - ' . __('description without HTML tags', 'amazon-auto-links'), 'vDefault' => $arrItemFormat['image_format']), array('fIf' => $fButton, 'strFieldID' => $strPrefix . 'submit_initial_options', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strType' => 'submit', 'strBeforeField' => "<div style='display: inline-block;'>" . $this->oUserAds->getTextAd() . "</div>" . "<div class='right-button'>", 'strAfterField' => "</div>", 'vLabelMinWidth' => 0, 'vLabel' => __('Create', 'amazon-auto-links'), 'vClassAttribute' => 'button button-primary', 'strAfterField' => '<input type="hidden" name="amazon_auto_links_admin[' . $this->strPageSlug . '][' . $strSectionID . '][' . $strPrefix . 'unit_type]" value="' . $strUnitType . '">'));
 }
예제 #3
0
 static function setUp($sPluginFilePath = null)
 {
     self::$sFilePath = $sPluginFilePath ? $sPluginFilePath : __FILE__;
     // 2.0.6+
     self::$sDirPath = dirname(self::$sFilePath);
     // 2.0.6+
     // These static properties are for backward compatibility.
     self::$sPluginPath = self::$sFilePath;
     // backward compat
     self::$sPluginDirPath = self::$sDirPath;
     // backward compat
     self::$sPluginName = self::Name;
     self::$sPluginVersion = self::Version;
     self::$sPluginDescription = self::Description;
     self::$sPluginAuthor = self::Author;
     self::$sPluginAuthorURI = self::AuthorURI;
     self::$sPluginStoreURI = 'http://michaeluno.jp';
     self::$sPluginTextDomain = self::TextDomain;
     self::$sPluginDomainPath = self::TextDomainPath;
     // Backward compatibility - will be deprecated
     self::$strPluginFilePath = self::$sFilePath;
     self::$strPluginDirPath = self::$sDirPath;
     // self::$strPluginURI         = plugins_url( '', self::$strPluginFilePath );   // @deprecated
     self::$strPluginName = self::Name;
     self::$strPluginVersion = self::Version;
     self::$strPluginDescription = self::Description;
     self::$strPluginAuthor = self::Author;
     self::$strPluginAuthorURI = self::AuthorURI;
     self::$strPluginTextDomain = self::TextDomain;
     self::$strPluginDomainPath = self::TextDomainPath;
     self::$strPluginNetwork = '';
     self::$strPluginSiteWide = 'Site Wide Only';
     self::$strPluginStoreURI = 'http://michaeluno.jp';
 }
 public function style_AmazonAutoLinks_PostType_AutoInsert()
 {
     $_sNone = 'none';
     return "#post-body-content {\r\n                margin-bottom: 10px;\r\n            }\r\n            #edit-slug-box {\r\n                display: {$_sNone};\r\n            }\r\n            #icon-edit.icon32.icon32-posts-" . AmazonAutoLinks_Commons::PostTypeSlugAutoInsert . " {\r\n                background:url('" . AmazonAutoLinks_Commons::getPluginURL("asset/image/screen_icon_32x32.png") . "') no-repeat;\r\n            }            \r\n        ";
 }
    protected function printPreviewTable($arrComponents, $arrArgs)
    {
        // Instantiate the core object - the fetching process should be done while rendering the HTML output
        // because it takes some time so the flush() function is used in the middle.
        $arrArgs['template_path'] = AmazonAutoLinks_Commons::$strPluginDirPath . '/template/preview/template.php';
        $arrArgs['is_preview'] = true;
        // this disables the global ASIN blacklist.
        $oAALCatPreview = new AmazonAutoLinks_Unit_Category($arrArgs);
        $oAALUnitPreview = new AmazonAutoLinks_Unit_Category($arrArgs);
        echo "<!-- page url:{$arrComponents['strPageURL']}-->";
        echo "<!-- preview url:{$arrComponents['strRSSURL']}-->";
        // Buttons
        $fReachedLimit = $this->isReachedLimit($arrArgs);
        $fIsAlreadyAdded = $this->isAddedCategory($arrComponents['strBreadcrumb'], $arrArgs['categories']);
        $fIsAlreadyAddedExcludingCategory = $this->isAddedCategory($arrComponents['strBreadcrumb'], $arrArgs['categories_exclude']);
        $fIsSubCategoryOfAddedItems = $this->isSubCategoryOfAddedItems($arrComponents['strBreadcrumb'], $arrArgs['categories']);
        $strAddDisabled = empty($arrComponents['strRSSURL']) || $fIsAlreadyAdded || $fIsAlreadyAddedExcludingCategory ? "disabled='Disabled'" : "";
        $strExcludeDisabled = empty($arrArgs['categories']) || $fIsAlreadyAdded || $fIsAlreadyAddedExcludingCategory || !$fIsSubCategoryOfAddedItems ? "disabled='Disabled'" : "";
        $strRemoveDisabled = empty($arrArgs['categories']) ? "disabled='Disabled'" : "";
        $strCreateDisabled = empty($arrArgs['categories']) ? "disabled='Disabled'" : "";
        $strCreateOrSave = $arrComponents['fNew'] ? __('Create', 'amazon-auto-links') : __('Save', 'amazon-auto-links');
        // Arrows
        $strAddArrow = $arrComponents['fNew'] && !empty($arrComponents['strRSSURL']) && empty($arrArgs['categories']) ? "<img class='category-select-right-arrow' title='" . __('Add the current selection!', 'amazon-auto-links') . "' src='" . AmazonAutoLinks_Commons::getPluginURL('asset/image/arrow_right.png') . "'/>" : "";
        $strCreateArrow = $arrComponents['fNew'] && !empty($arrComponents['strRSSURL']) && !empty($arrArgs['categories']) ? "<img class='category-select-right-arrow' title='" . __('Create the unit!', 'amazon-auto-links') . "' src='" . AmazonAutoLinks_Commons::getPluginURL('asset/image/arrow_right.png') . "'/>" : "";
        $strSelectArrow = $arrComponents['fNew'] && empty($arrComponents['strRSSURL']) && empty($arrArgs['categories']) ? "<img class='category-select-left-bottom-arrow' title='" . __('Select a category from the links!', 'amazon-auto-links') . "' src='" . AmazonAutoLinks_Commons::getPluginURL('asset/image/arrow_left_bottom.png') . "'/>" : "";
        ?>
        <form action="" method="post">        
            <?php 
        if (function_exists('wp_nonce_field')) {
            wp_nonce_field(AmazonAutoLinks_Commons::AdminOptionKey, 'nonce');
        }
        ?>
            <input type="hidden" name="amazon_auto_links_cat_select[category][breadcrumb]" value="<?php 
        echo $this->oEncrypt->encode($arrComponents['strBreadcrumb']);
        ?>
" />
            <input type="hidden" name="amazon_auto_links_cat_select[category][feed_url]" value="<?php 
        echo $arrComponents['strRSSURL'];
        ?>
" />
            <input type="hidden" name="amazon_auto_links_cat_select[category][page_url]" value="<?php 
        echo $arrComponents['strPageURL'];
        ?>
" />            
            <table class="category-select-table">
                <tbody>
                    <tr>
                        <td class="category-select-first-column">                
                            <h3><?php 
        _e('Current Selection', 'amazon-auto-links');
        ?>
</h3>
                            <p class="category-select-breadcrumb"><?php 
        echo $arrComponents['strBreadcrumb'];
        ?>
</p>
                        </td>
                        <td class="category-select-second-column" colspan="2">        
                            <div class="category-select-submit-buttons">
                                <span><a class="button button-primary" href="<?php 
        echo $arrComponents['strBounceURL'];
        ?>
"><?php 
        _e('Go Back', 'amazon-auto-links');
        ?>
</a></span>
                                <span><?php 
        echo $strCreateArrow;
        ?>
<input type="submit" name="amazon_auto_links_cat_select[save]" class="button button-primary" value="<?php 
        echo $strCreateOrSave;
        ?>
" <?php 
        echo $strCreateDisabled;
        ?>
 /></span>
                                <span><?php 
        echo $strAddArrow;
        ?>
<input type="submit" name="amazon_auto_links_cat_select[add]" class="button button-secondary" value="<?php 
        _e('Add Category', 'amazon-auto-links');
        ?>
" <?php 
        echo $strAddDisabled;
        ?>
 /></span>
                                <span><input type="submit" name="amazon_auto_links_cat_select[exclude]" class="button button-secondary" value="<?php 
        _e('Add Excluding Category', 'amazon-auto-links');
        ?>
" <?php 
        echo $strExcludeDisabled;
        ?>
 /></span>                                
                                <span><input type="submit" name="amazon_auto_links_cat_select[remove]" class="button button-secondary" value="<?php 
        _e('Remove Checked', 'amazon-auto-links');
        ?>
" <?php 
        echo $strRemoveDisabled;
        ?>
 /></span>
                            </div>
                            <div>
                                <h3><?php 
        _e('Added Categories', 'amazon-auto-links');
        ?>
</h3>
                                <?php 
        echo $arrComponents['strSelectedCategories'];
        ?>
                                <h3><?php 
        _e('Added Excluding Sub-categories', 'amazon-auto-links');
        ?>
</h3>
                                <?php 
        echo $arrComponents['strSelectedExcludingCategories'];
        ?>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="category-select-first-column">
                            <h3><?php 
        _e('Select Category', 'amazon-auto-links');
        ?>
</h3>
                            <?php 
        echo $strSelectArrow;
        ?>
                            <?php 
        echo $arrComponents['strSidebarHTML'];
        ?>
                        </td>
                        <td class="category-select-second-column category-select-preview-left">
                            <h3>
                                <?php 
        echo $arrComponents['strRSSURL'] ? __('Preview of This Category', 'amazon-auto-links') : __('No Preview', 'amazon-auto-links');
        ?>
                            </h3>                        
                            <div class="widthfixer" style="width:<?php 
        echo $arrArgs['image_size'];
        ?>
px;"></div>
                            <?php 
        if ($arrComponents['strRSSURL']) {
            $oAALCatPreview->render(array($arrComponents['strRSSURL']));
            // flush();
        } else {
            _e('Please select a category from the list on the left.', 'amazon-auto-links');
        }
        ?>
                        </td>
                        <td class="category-select-third-column category-select-preview-right">
                            <h3><?php 
        _e('Unit Preview', 'amazon-auto-links');
        ?>
</h3>                            
                            <div class="widthfixer" style="width:<?php 
        echo $arrArgs['image_size'];
        ?>
px;"></div>
                            <?php 
        if (!empty($arrComponents['arrSelectedRSSURLs'])) {
            $oAALUnitPreview->render($arrComponents['arrSelectedRSSURLs']);
            flush();
        } else {
            _e('Please add a category from the list after selecting it.', 'amazon-auto-links');
        }
        ?>
                        </td>
                    </tr>
                </tbody>
            </table>    
        </form>
        <?php 
    }
    protected function printBuyNowButton()
    {
        $_sLink = 'http://en.michaeluno.jp/amazon-auto-links/amazon-auto-links-pro';
        $_sLang = defined('WPLANG') ? WPLANG : 'en';
        ?>
            <div class="get-now-button">
                <a href="<?php 
        echo esc_url($_sLink);
        ?>
?lang=<?php 
        echo $_sLang;
        ?>
" title="<?php 
        _e('Get Now!', 'amazon-auto-links');
        ?>
">
                    <img src="<?php 
        echo AmazonAutoLinks_Commons::getPluginURL('asset/image/buynowbutton.gif');
        ?>
" />
                </a>
            </div>    
            <?php 
    }