Changeset 361

Show
Ignore:
Timestamp:
04/06/07 08:58:06 (2 years ago)
Author:
Atsutane
Message:

Update on active plugin setup.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bbpress-latest-discussion-for-wp/tags/0.8/BBpress.php

    r318 r361  
    55Description: Put bbpress Latest Discussions on your wp page. 
    66Author: Atsutane Shirane 
    7 Version: 0.8 
     7Version: 0.8.2 
    88Author URI: http://www.atsutane.net/ 
    99*/ 
    1010 
    1111### BBpress Latest Discussions Version Number 
    12 $BbLD_version = '0.8'; 
     12$BbLD_version = '0.8.2'; 
    1313 
    1414if (!defined('ABSPATH')) die("Aren't you supposed to come here via WP-Admin?"); 
     15 
     16### Function: Install BbLD Configuration 
     17$install = (basename($_SERVER['SCRIPT_NAME']) == 'plugins.php' && isset($_GET['activate']));; 
     18if ($install) { 
     19        bbld_install(); 
     20} 
     21 
     22function bbld_install() { 
     23        if (get_option('wpbb_status') == FALSE) { 
     24                $bbpath = '/bbpress'; // Adjust the path to suit your bbpress location. Example: '/forums' 
     25                $wpbburl = get_settings('home') . $bbpath; 
     26                update_option('wpbb_path', $wpbburl); 
     27                $forum_slimit = '10'; // Adjust the limit to show 
     28                update_option('wpbb_limit', $forum_slimit); 
     29                $bbdb_prefix = 'bb_'; // Set Bbpress Prefix 
     30                update_option('wpbb_bbprefix', $bbdb_prefix); 
     31                $limit = '100'; 
     32                update_option('wpbb_slimit', $limit); 
     33                update_option('wpbb_permalink', false); 
     34                update_option('wpbb_intergrated', false); 
     35                update_option('wpbb_exdb', false); 
     36                update_option('wpbb_dbuser', DB_USER); 
     37                update_option('wpbb_dbpass', DB_PASSWORD); 
     38                update_option('wpbb_dbname', DB_NAME); 
     39                update_option('wpbb_dbhost', DB_HOST); 
     40                $install_status = 'install'; 
     41                update_option('wpbb_status', $install_status); 
     42        } 
     43} 
    1544 
    1645### Function: Add Option Page 
     
    5079                update_option('wpbb_dbhost', $_POST['bbhost']); 
    5180                $update_msg = "<div id='message' class='updated fade'><p>BBpress Latest Discussions options saved successfully.</p></div>"; 
    52         } 
    53         elseif (get_option('wpbb_path') == FALSE) { 
    54                 $bbpath = '/bbpress'; // Adjust the path to suit your bbpress location. Example: '/forums' 
    55                 $wpbburl = get_settings('home') . $bbpath; 
    56                 update_option('wpbb_path', $wpbburl); 
    57         } 
    58         elseif (get_option('wpbb_limit') == FALSE) { 
    59                 $forum_slimit = '10'; // Adjust the limit to show 
    60                 update_option('wpbb_limit', $forum_slimit); 
    61         } 
    62         elseif (get_option('wpbb_bbprefix') == FALSE) { 
    63                 $bbdb_prefix = 'bb_'; // Set Bbpress Prefix 
    64                 update_option('wpbb_bbprefix', $bbdb_prefix); 
    65         } 
    66         elseif (get_option('wpbb_slimit') == FALSE) { 
    67                 $limit = '100'; 
    68                 update_option('wpbb_slimit', $limit); 
    69         } 
    70         elseif (get_option('wpbb_permalink') == FALSE) { 
    71                 update_option('wpbb_permalink', false); 
    72         } 
    73         elseif (get_option('wpbb_intergrated') == FALSE) { 
    74                 update_option('wpbb_intergrated', false); 
    75         } 
    76         elseif (get_option('wpbb_exdb') == FALSE) { 
    77                 update_option('wpbb_exdb', false); 
    78         } 
    79         elseif (get_option('wpbb_dbuser') == FALSE) { 
    80                 update_option('wpbb_dbuser', DB_USER); 
    81         } 
    82         elseif (get_option('wpbb_dbpass') == FALSE) { 
    83                 update_option('wpbb_dbpass', DB_PASSWORD); 
    84         } 
    85         elseif (get_option('wpbb_dbname') == FALSE) { 
    86                 update_option('wpbb_dbname', DB_NAME); 
    87         } 
    88         elseif (get_option('wpbb_dbhost') == FALSE) { 
    89                 update_option('wpbb_dbhost', DB_HOST); 
    9081        } 
    9182?> 
  • bbpress-latest-discussion-for-wp/tags/0.8/readme.txt

    r321 r361  
    3232 
    3333== Version History == 
     34 
     35Version 0.8.2 (2007-04-06): 
     36 
     37* Update on active plugin setup. 
    3438 
    3539Version 0.8 (2007-03-20):