Plugin Directory

Changeset 653557


Ignore:
Timestamp:
01/16/2013 12:18:32 PM (13 years ago)
Author:
codebycarter
Message:

Fixes admin menu page position, should fix bug where file is not created in theme directory. Fixes some strings that were not setup for translation

Location:
wp-bulletin-board/tags/1.1.1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-bulletin-board/tags/1.1.1/php/admin/wpbb-admin-settings.php

    r639235 r653557  
    132132                    <input type="radio" name="wpbbmaintenancemode" value="on" <?php checked($options['maintenance_mode'], 'on');?>> <?php _e('On', 'wp-bb'); ?>
    133133                    <input type="radio" name="wpbbmaintenancemode" value="off" <?php checked($options['maintenance_mode'], 'off');?>> <?php _e('Off', 'wp-bb'); ?>
    134                     <p class="description">If enabled this will display the message below to all users and they won't be able to do anything in the forum. Useful for upgrades, cleaning up, moving host, etc. Admins are still allowed to view the forum as usual but a message is displayed on the forum to warn them that maintenance mode is enabled.</p>
     134                    <p class="description"><?php _e('If enabled this will display the message below to all users and they won\'t be able to do anything in the forum. Useful for upgrades, cleaning up, moving host, etc. Admins are still allowed to view the forum as usual but a message is displayed on the forum to warn them that maintenance mode is enabled.', 'wp-bb'); ?></p>
    135135                </td>
    136136            </tr>
     
    141141                <td>
    142142                    <textarea name="wpbbmaintenancemessage" cols="50" rows="2"><?php echo $options['maintenance_message']; ?></textarea>
    143                     <p class="description">The message you want to display to all users when you have enabled maintenance mode i.e. disabled the forum.</p>
     143                    <p class="description"><?php _e('The message you want to display to all users when you have enabled maintenance mode i.e. disabled the forum.', 'wp-bb'); ?></p>
    144144                </td>
    145145            </tr>
     
    150150                <td>
    151151                    <input maxlength="32" size="25" name="wpbbname" value="<?php if($options['forum_name']) echo $options['forum_name'];?>" />
    152                     <p class="description">Your WPBB forum name which is displayed on every page.</p>
     152                    <p class="description"><?php _e('Your WPBB forum name which is displayed on every page.', 'wp-bb'); ?></p>
    153153                </td>
    154154            </tr>
     
    160160                    <input type="radio" name="wpbballowguests" value="yes" <?php checked($options['allow_guests'], 'yes');?>/> <?php _e('Yes', 'wp-bb'); ?>
    161161                    <input type="radio" name="wpbballowguests" value="no" <?php checked($options['allow_guests'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    162                     <p class="description">If enabled you will be able to set guest permissions in every forum and subforum. Disable if you want to force guests to login or register.</p>
     162                    <p class="description"><?php _e('If enabled you will be able to set guest permissions in every forum and subforum. Disable if you want to force guests to login or register.', 'wp-bb'); ?></p>
    163163                </td>
    164164            </tr>
     
    170170                    <input type="radio" name="wpbballowsubforums" value="yes" <?php checked($options['allow_subforums'], 'yes');?>/> <?php _e('Yes', 'wp-bb'); ?>
    171171                    <input type="radio" name="wpbballowsubforums" value="no" <?php checked($options['allow_subforums'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    172                     <p class="description">If enabled and you have a subforum inside a forum, you will be able to see it displayed below the forum on the first WPBB page. If disabled, any subforums within forums are not shown on the first page.</p>
     172                    <p class="description"><?php _e('If enabled and you have a subforum inside a forum, you will be able to see it displayed below the forum on the first WPBB page. If disabled, any subforums within forums are not shown on the first page.', 'wp-bb'); ?></p>
    173173                </td>
    174174            </tr>
     
    180180                    <input type="radio" name="wpbbenablequickreply" value="yes" <?php if (isset($options['enable_quick_reply'])) checked($options['enable_quick_reply'], 'yes');?>/> <?php _e('Yes', 'wp-bb'); ?>
    181181                    <input type="radio" name="wpbbenablequickreply" value="no" <?php if (isset($options['enable_quick_reply'])) checked($options['enable_quick_reply'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    182                     <p class="description">If enabled, a quick reply box is displayed at the bottom of a topic for everyone. Enabled by default.</p>
     182                    <p class="description"><?php _e('If enabled, a quick reply box is displayed at the bottom of a topic for everyone. Enabled by default.', 'wp-bb'); ?></p>
    183183                </td>
    184184            </tr>
     
    193193                <td>
    194194                    <input type="number" name="wpbbtopicsperpage" value="<?php echo $topics_per_page; ?>" />
    195                     <p class="description">The amount of topics to display on a single page inside a forum or subforum</p>
     195                    <p class="description"><?php _e('The amount of topics to display on a single page inside a forum or subforum', 'wp-bb'); ?></p>
    196196                </td>
    197197            </tr>
     
    202202                <td>
    203203                    <input type="number" name="wpbbpostsperpage" value="<?php echo $posts_per_page; ?>" />
    204                     <p class="description">The amount of posts to display on a single page inside a topic</p>
     204                    <p class="description"><?php _e('The amount of posts to display on a single page inside a topic', 'wp-bb'); ?></p>
    205205                </td>
    206206            </tr>
     
    215215                <td>
    216216                    <input type="number" name="wpbbtopiccutoff" min="0" value="<?php echo $topic_cutoff_value; ?>" />
    217                     <p class="description">The amount of time in seconds everyone must wait before being allowed to create a new topic. Prevents spamming.</p>
     217                    <p class="description"><?php _e('The amount of time in seconds everyone must wait before being allowed to create a new topic. Prevents spamming.', 'wp-bb'); ?></p>
    218218                </td>
    219219            </tr>
     
    224224                <td>
    225225                    <input type="number" name="wpbbpostcutoff" min="0" value="<?php echo $post_cutoff_value; ?>" />
    226                     <p class="description">The amount of time in seconds everyone must wait before being allowed to create a new post. Prevents spamming.</p>
     226                    <p class="description"><?php _e('The amount of time in seconds everyone must wait before being allowed to create a new post. Prevents spamming.', 'wp-bb'); ?></p>
    227227                </td>
    228228            </tr>
     
    234234                    <input type="radio" name="wpposttowpbb" value="yes" <?php checked($options['post_to_forum'], 'yes');?>/> <?php _e('Yes', 'wp-bb'); ?>
    235235                    <input type="radio" name="wpposttowpbb" value="no" <?php checked($options['post_to_forum'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    236                     <p class="description">If you want to enable the ability to also choose what forum you want to send a copy of your wordpress post to in Posts -> Add New</p>
     236                    <p class="description"><?php _e('If you want to enable the ability to also choose what forum you want to send a copy of your wordpress post to in Posts -> Add New', 'wp-bb'); ?></p>
    237237                </td>
    238238            </tr>
     
    244244                    <input type="radio" name="wpbb-show-footer" value="yes" <?php if (isset($options['show_footer'])) checked($options['show_footer'], 'yes');?>/> <?php _e('Yes', 'wp-bb'); ?>
    245245                    <input type="radio" name="wpbb-show-footer" value="no" <?php if (isset($options['show_footer'])) checked($options['show_footer'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    246                     <p class="description">Displays a "powered by" message at the bottom of your forum.</p>
     246                    <p class="description"><?php _e('Displays a "powered by" message at the bottom of your forum.', 'wp-bb'); ?></p>
    247247                </td>
    248248            </tr>
     
    259259            <tr>
    260260                <th>
    261                     <label for="wpbb-theme-type">Theme</label>
     261                    <label for="wpbb-theme-type"><?php _e('Theme', 'wp-bb'); ?></label>
    262262                </th>
    263263                <td>
    264264                    <input type="radio" name="wpbb-theme-type" value="light" <?php checked($theme_options['theme'], 'light');?> /> <?php _e('Light', 'wp-bb'); ?>
    265265                    <input type="radio" name="wpbb-theme-type" value="dark" <?php checked($theme_options['theme'], 'dark');?>/> <?php _e('Dark', 'wp-bb'); ?>
    266                     <p class="description">The dark theme uses slightly darker CSS colors and images. You can use either setting depending on your theme and your liking so we recommend experimenting with this.</p>
     266                    <p class="description"><?php _e('The dark theme uses slightly darker CSS colors and images. You can use either setting depending on your theme and your liking so we recommend experimenting with this.', 'wp-bb'); ?></p>
    267267                </td>
    268268            </tr>
     
    284284                    <input type="radio" name="wpbbfacebooksupport" value="yes" <?php checked($facebook_options['allow_facebook'], 'yes');?> /> <?php _e('Yes', 'wp-bb'); ?>
    285285                    <input type="radio" name="wpbbfacebooksupport" value="no" <?php checked($facebook_options['allow_facebook'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    286                     <p class="description">This must be enabled before you can change the settings below. If enabled, allows your users to signup using facebook.</p>
     286                    <p class="description"><?php _e('This must be enabled before you can change the settings below. If enabled, allows your users to signup using facebook.', 'wp-bb'); ?></p>
    287287                </td>
    288288            </tr>
     
    305305                    ?>
    306306                    <input type='text' name='wpbbfacebookappid' value="<?php echo $facebook_app_id_value; ?>"/>
    307                     <p class="description">Required. You can get this from your facebook app settings.</p>
     307                    <p class="description"><?php _e('Required. You can get this from your facebook app settings.', 'wp-bb'); ?></p>
    308308                </td>
    309309            </tr>
     
    314314                <td>
    315315                    <input type="text" name="wpbbfacebookappsecretkey" value="<?php echo $facebook_app_secret_key_value; ?>" />
    316                     <p class="description">Required. You can get this from your facebook app settings.</p>
     316                    <p class="description"><?php _e('Required. You can get this from your facebook app settings.', 'wp-bb'); ?></p>
    317317                </td>
    318318            </tr>
     
    323323                <td>
    324324                    <input type='text' name="wpbbfacebookredirecturi" value="<?php echo $facebook_redirect_uri_value; ?>"/>
    325                     <p class="description">Must match your facebook redirect URL. It is the link to your WPBB forum.</p>
     325                    <p class="description"><?php _e('Must match your facebook redirect URL. It is the link to your WPBB forum.', 'wp-bb'); ?></p>
    326326                </td>
    327327            </tr>
     
    332332                <td>
    333333                    <input type="text" name="wpbbfacebookstate" value="<?php echo $facebook_state_value; ?>" />
    334                     <p class="description">This is required. Enter a random alphanumeric string (letters and numbers only)</p>
     334                    <p class="description"><?php _e('This is required. Enter a random alphanumeric string (letters and numbers only)', 'wp-bb'); ?></p>
    335335                </td>
    336336            </tr>
     
    341341                <td>
    342342                    <input type="text" name="wpbbfacebookdefaultrole" value="<?php echo strtolower($facebook_default_role); ?>"/>
    343                     <p class="description">Required. Enter a role or leave the textbox blank.</p>
     343                    <p class="description"><?php _e('Required. Enter a role or leave the textbox blank.', 'wp-bb'); ?></p>
    344344                </td>
    345345            </tr>
     
    359359                    <input type="radio" name="wpbbtwittersupport" value="yes" <?php if (isset($twitter_options['allow_twitter'])) checked($twitter_options['allow_twitter'], 'yes');?>/> <?php _e('Yes', 'wp-bb'); ?>
    360360                    <input type="radio" name="wpbbtwittersupport" value="no" <?php if (isset($twitter_options['allow_twitter'])) checked($twitter_options['allow_twitter'], 'no');?>/> <?php _e('No', 'wp-bb'); ?>
    361                     <p class="description">Enable to change settings below. If enabled, displays a button on your forum that your users can click on to visit your twitter profile, message you, follow you, etc.</p>
     361                    <p class="description"><?php _e('Enable to change settings below. If enabled, displays a button on your forum that your users can click on to visit your twitter profile, message you, follow you, etc.', 'wp-bb'); ?></p>
    362362                </td>
    363363            </tr>
     
    376376                    ?>
    377377                    <input type="text" name="wpbbtwitteraccount" value="<?php echo $twitter_account; ?>"/>
    378                     <p class="description">Enter your twitter username here. Get this from twitter when you signup.</p>
     378                    <p class="description"><?php _e('Enter your twitter username here. Get this from twitter when you signup.', 'wp-bb'); ?></p>
    379379                </td>
    380380            </tr>
  • wp-bulletin-board/tags/1.1.1/php/wpbb-view-forum.php

    r639235 r653557  
    137137        ?>
    138138        <table class="wpbb-table">
    139             <th><?php _e('Status'); ?></th>
    140             <th><?php _e('Topic'); ?></th>
    141             <th><?php _e('Author'); ?></th>
    142             <th><?php _e('Posts'); ?></th>
    143             <th><?php _e('Last Reply'); ?></th>
    144             <th><?php _e('Action'); ?></th>
     139            <th><?php _e('Status', 'wp-bb'); ?></th>
     140            <th><?php _e('Topic', 'wp-bb'); ?></th>
     141            <th><?php _e('Author', 'wp-bb'); ?></th>
     142            <th><?php _e('Posts', 'wp-bb'); ?></th>
     143            <th><?php _e('Last Reply', 'wp-bb'); ?></th>
     144            <th><?php _e('Action', 'wp-bb'); ?></th>
    145145            <?php
    146146            foreach ($topics as $topic) {
  • wp-bulletin-board/tags/1.1.1/wp-bb.php

    r639297 r653557  
    433433
    434434        // Main WPBB page
    435         add_menu_page('WPBB Overview', 'WPBB', 'manage_options', 'wpbb_admin', 'wpbb_admin_display', '', 27.7);
     435        add_object_page('WPBB Overview', 'WPBB', 'manage_options', 'wpbb_admin', 'wpbb_admin_display', '');
    436436   
    437437        // Create/Edit Category
     
    474474        if (!file_exists($template_directory.'/wpbb-template.php'))
    475475        {
    476             // Check directory is writable
    477             if (is_writable($template_directory))
    478             {
    479                 // Copys wp-bb template file to your current theme
    480                 $template_file_path = WPBB_DIR.'/wpbb-template.php';
    481                 $move_template_file = copy($template_file_path, $template_directory.'/wpbb-template.php');
    482                 if (!$move_template_file)
    483                 {
    484                     $move_template_file_failed = sprintf(__('Failed to move required wp-bb template file %s to theme directory %s. Please make sure both the file and directory exist or move the wp-bb template file to your current theme directory manually'), $template_file_path, $template_directory);
    485                     error_log($move_template_file_failed);
    486                 }
     476            // Retreive folder permissions for use later on
     477            $folder_permissions = substr(sprintf('%o', fileperms($template_directory)), -4);
     478            if (!is_writable($template_directory))
     479            {
     480                // Try to chmod folder
     481                chmod($template_directory, 0644);
    487482            }
    488             else
    489             {
    490                 // Is not writable and user should change permissions accordingly
    491                 $template_write_failed = sprintf(__('%s is not writable. Could not create required WPBB template file forum.php. Please change the folders permissions and visit your Wordpress site again or copy the file forum.php from your wp-bb plugin folder to your template folders directory manually.'), $template_directory);
    492                 error_log($template_write_failed);
     483            $template_file_path = WPBB_DIR.'/wpbb-template.php';
     484            $move_template_file = copy($template_file_path, $template_directory.'/wpbb-template.php');
     485            if (!$move_template_file)
     486            {
     487                $move_template_file_failed = sprintf(__('Failed to move required wp-bb template file %s to theme directory %s. Please make sure both the file and directory exist or move the wp-bb template file to your current theme directory manually'), $template_file_path, $template_directory);
     488                error_log($move_template_file_failed);
    493489            }
     490            // Chmod folder back to original permissions
     491            chmod($template_directory, $folder_permissions);
    494492        }
    495493    }
Note: See TracChangeset for help on using the changeset viewer.