Plugin Directory

Changeset 486921


Ignore:
Timestamp:
01/09/2012 04:13:38 PM (14 years ago)
Author:
jaroat
Message:

Unstable commit: Additional "Automatic image insertion" features

Location:
yet-another-photoblog/trunk/lib/options
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • yet-another-photoblog/trunk/lib/options/YapbCheckboxOption.class.php

    r58280 r486921  
    4444             **/
    4545            function update() {
    46                 $this->update_html_option($this->name, Params::get($this->name, ''));
     46                update_option($this->name, Params::get($this->name, ''));
    4747            }
    4848
  • yet-another-photoblog/trunk/lib/options/YapbOptionGroup.class.php

    r460340 r486921  
    144144
    145145                        break;
     146                       
     147                    case 3:
     148                    case 4:
     149                       
     150                        // Level 3 of nesting options
     151                       
     152                        $result .= '<div style="padding:0 0 5px 20px;border-left:2px dotted #efefef;">';
     153                        $result .= '<ul>';
     154                       
     155                        if (!empty($this->children)) {
     156                            foreach ($this->children as $optionInstance) {
     157                                $result .= "\n\n" . '<li>' . $optionInstance->toString() . '</li>';
     158                            }
     159                        }
     160                       
     161                        $result .= '</ul>';
     162                        $result .= '</div>';
     163                       
     164                        break;
    146165
    147166                }
  • yet-another-photoblog/trunk/lib/options/YapbOptions.php

    r486645 r486921  
    44
    55    require_once realpath(dirname(__file__) . '/YapbCheckboxInputOption.class.php');
     6    require_once realpath(dirname(__file__) . '/YapbRadioOption.class.php');
    67    require_once realpath(dirname(__file__) . '/YapbCheckboxOption.class.php');
    78    require_once realpath(dirname(__file__) . '/YapbCheckboxSelectOption.class.php');
     
    180181                        '',
    181182                        array(
    182                             new YapbCheckboxOption('yapb_display_images_activate', '<strong>' . __('Activate automatic image rendering in general.', 'yapb') . '</strong>', true),
    183                             new YapbCheckboxSelectOption('yapb_display_images_linked', __('Link thumbnails to actual post and open page #', 'yapb'), array(__('without target', 'yapb') => 'nA',  __('in the same window','yapb') => '_self', __('in a new window','yapb') => '_blank'), true, 'nA')
     183                            new YapbCheckboxOption('yapb_display_images_activate', '<strong>' . __('Activate automatic image rendering in general.', 'yapb') . '</strong>', true)
    184184                        )
    185185                    ),
     
    191191                            new YapbCheckboxOption('yapb_display_images_home', __('<strong>Display images on HOME page listing.</strong>', 'yapb'), true),
    192192                            new YapbCheckboxInputOption('yapb_display_images_home_thumbnail', __('Display as thumbnail with a width of #3 px', 'yapb'), true, '200'),
     193                            new YapbCheckboxOption('yapb_display_images_home_link', __('Enable image links:', 'yapb'), true),
     194                            new YapbOptionGroup(
     195                                __('Linking', 'yapb'),
     196                                '',
     197                                array(
     198                                   
     199                                    new YapbRadioOption('yapb_display_images_home_linktype', 'Link to actual post', 'post', true),
     200                                    new YapbRadioOption('yapb_display_images_home_linktype', 'Link to original image', 'image', false),
     201                                    new YapbOptionGroup(
     202                                        __('Link thumbnails to image'),
     203                                        '',
     204                                        array(
     205                                            new YapbCheckboxInputOption('yapb_display_images_home_linktype_image_rel', __('Add rel-attribute #15 to link', 'yapb'), false, 'lightbox'),                                 
     206                                            new YapbCheckboxInputOption('yapb_display_images_home_linktype_image_thumbnail', __('Link to thumbnail with a width of #3 px', 'yapb'), false, '600'),
     207                                        )
     208                                    ),
     209                                    new YapbCheckboxSelectOption('yapb_display_images_home_linked', __('Add link target with value #', 'yapb'), array(__('_self (Open link in same window/frame)','yapb') => '_self', __('_top (Open link in top window/frame)', 'yapb') => '_top', __('_blank (open link in new browser window/tab)','yapb') => '_blank'), true, '_self')
     210                                )
     211                            ),
    193212                            new YapbInputOption('yapb_display_images_home_inline_style', __('Inline CSS-Style for image tag: #40', 'yapb'), ''),
    194213                            new YapbTextareaOption('yapb_display_images_home_html_before', __('Custom HTML before image tag', 'yapb'), '<div style="float:left;border:10px solid silver;margin-right:10px;margin-bottom:10px;">'),
     
    203222                            new YapbCheckboxOption('yapb_display_images_single', __('<strong>Display images on SINGLE pages.</strong>', 'yapb'), true),
    204223                            new YapbCheckboxInputOption('yapb_display_images_single_thumbnail', __('Display as thumbnail with a width of #3 px', 'yapb'), true, '460'),
     224                            new YapbCheckboxOption('yapb_display_images_single_link', __('Enable image link.', 'yapb'), true),
     225                            new YapbOptionGroup(
     226                                __('Linking', 'yapb'),
     227                                '',
     228                                array(
     229                                   
     230                                    new YapbRadioOption('yapb_display_images_single_linktype', 'Link to actual post', 'post', true),
     231                                    new YapbOptionGroup(
     232                                        __('Link thumbnails to post'),
     233                                        '',
     234                                        array(
     235                                            new YapbCheckboxSelectOption('yapb_display_images_single_linked', __('Add link target with value #', 'yapb'), array(__('_self (Open link in same window/frame)','yapb') => '_self', __('_top (Open link in top window/frame)', 'yapb') => '_top', __('_blank (open link in new browser window/tab)','yapb') => '_blank'), true, '_self')
     236                                        )
     237                                    ),
     238                                    new YapbRadioOption('yapb_display_images_single_linktype', 'Link to original image', 'image', false),
     239                                    new YapbOptionGroup(
     240                                        __('Link thumbnails to image'),
     241                                        '',
     242                                        array(
     243                                            new YapbCheckboxInputOption('yapb_display_images_single_linktype_image_rel', __('Add rel-attribute #15 to link', 'yapb'), false, 'lightbox'),                                   
     244                                            new YapbCheckboxInputOption('yapb_display_images_single_linktype_image_thumbnail', __('Link to thumbnail with a width of #3 px', 'yapb'), false, '600'),
     245                                        )
     246                                    )
     247                                )
     248                            ),
    205249                            new YapbInputOption('yapb_display_images_single_inline_style', __('Inline CSS-Style for image tag: #40', 'yapb'), ''),
    206250                            new YapbTextareaOption('yapb_display_images_single_html_before', __('Custom HTML before image tag', 'yapb'), '<div style="margin-bottom:20px;">'),
     
    214258                        array(
    215259                            new YapbCheckboxOption('yapb_display_images_archive', __('<strong>Display images on ARCHIVE overview page listings.</strong>', 'yapb'), true),
    216                             new YapbCheckboxInputOption('yapb_display_images_archive_thumbnail', __('Display as thumbnail with a width of #3 px', 'yapb'), true, '100'),
     260                            new YapbCheckboxInputOption('yapb_display_images_archive_thumbnail', __('Display as thumbnail with a width of #3 px', 'yapb'), true, '100'),                           
     261                            new YapbCheckboxOption('yapb_display_images_archive_link', __('Enable image links.', 'yapb'), true),
     262                            new YapbOptionGroup(
     263                                __('Linking', 'yapb'),
     264                                '',
     265                                array(
     266                                   
     267                                    new YapbRadioOption('yapb_display_images_archive_linktype', 'Link to actual post', 'post', true),
     268                                    new YapbOptionGroup(
     269                                        __('Link thumbnails to post'),
     270                                        '',
     271                                        array(
     272                                            new YapbCheckboxSelectOption('yapb_display_images_archive_linked', __('Add link target with value #', 'yapb'), array(__('_self (Open link in same window/frame)','yapb') => '_self', __('_top (Open link in top window/frame)', 'yapb') => '_top', __('_blank (open link in new browser window/tab)','yapb') => '_blank'), true, '_self')
     273                                        )
     274                                    ),
     275                                    new YapbRadioOption('yapb_display_images_archive_linktype', 'Link to original image', 'image', false),
     276                                    new YapbOptionGroup(
     277                                        __('Link thumbnails to image'),
     278                                        '',
     279                                        array(
     280                                            new YapbCheckboxInputOption('yapb_display_images_archive_linktype_image_rel', __('Add rel-attribute #15 to link', 'yapb'), false, 'lightbox'),                                 
     281                                            new YapbCheckboxInputOption('yapb_display_images_archive_linktype_image_thumbnail', __('Link to thumbnail with a width of #3 px', 'yapb'), false, '600'),
     282                                        )
     283                                    )
     284                                )
     285                            ),
    217286                            new YapbInputOption('yapb_display_images_archive_inline_style', __('Inline CSS-Style for image tag: #40', 'yapb'), ''),
    218287                            new YapbTextareaOption('yapb_display_images_archive_html_before', __('Custom HTML before image tag', 'yapb'), '<div style="float:left;border:10px solid silver;margin-right:10px;margin-bottom:10px;">'),
     
    227296                            new YapbCheckboxOption('yapb_display_images_page', __('<strong>Display images on CONTENT pages.</strong>', 'yapb'), true),
    228297                            new YapbCheckboxInputOption('yapb_display_images_page_thumbnail', __('Display as thumbnail with a width of #3 px', 'yapb'), false, '100'),
     298                            new YapbCheckboxOption('yapb_display_images_page_link', __('Enable image link.', 'yapb'), true),
     299                            new YapbOptionGroup(
     300                                __('Linking', 'yapb'),
     301                                '',
     302                                array(
     303                                   
     304                                    new YapbRadioOption('yapb_display_images_page_linktype', 'Link to actual post', 'post', true),
     305                                    new YapbOptionGroup(
     306                                        __('Link thumbnails to post'),
     307                                        '',
     308                                        array(
     309                                            new YapbCheckboxSelectOption('yapb_display_images_page_linked', __('Add link target with value #', 'yapb'), array(__('_self (Open link in same window/frame)','yapb') => '_self', __('_top (Open link in top window/frame)', 'yapb') => '_top', __('_blank (open link in new browser window/tab)','yapb') => '_blank'), true, '_self')
     310                                        )
     311                                    ),
     312                                    new YapbRadioOption('yapb_display_images_page_linktype', 'Link to original image', 'image', false),
     313                                    new YapbOptionGroup(
     314                                        __('Link thumbnails to image'),
     315                                        '',
     316                                        array(
     317                                            new YapbCheckboxInputOption('yapb_display_images_page_linktype_image_rel', __('Add rel-attribute #15 to link', 'yapb'), false, 'lightbox'),                                 
     318                                            new YapbCheckboxInputOption('yapb_display_images_page_linktype_image_thumbnail', __('Link to thumbnail with a width of #3 px', 'yapb'), false, '600'),
     319                                        )
     320                                    )
     321                                )
     322                            ),
    229323                            new YapbInputOption('yapb_display_images_page_inline_style', __('Inline CSS-Style for image tag: #40', 'yapb'), ''),
    230324                            new YapbTextareaOption('yapb_display_images_page_html_before', __('Custom HTML before image tag', 'yapb'), '<div style="float:left;border:10px solid silver;margin-right:10px;margin-bottom:10px;">'),
Note: See TracChangeset for help on using the changeset viewer.