Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal error in admin section


  • sexycatzeyez
    Participant

    @sexycatzeyez

    I just installed Buddypress on a version of wordpress 3.0.4.
    It worked fine.
    I then tried to install the album plugin and it crashed my admin section. I can’t click anythin in the admin section without getting this error message:

    Fatal error: Cannot redeclare bp_album_admin() (previously declared in /home/jaxsadul/public_html/cilcks.com/wp-content/plugins/bp-album/includes/bp-album-admin-network.php:14) in /home/jaxsadul/public_html/cilcks.com/wp-content/plugins/bp-album/includes/bp-album-admin-local.php on line 331

    since It already altered the code, I cant see what the old code looked like.
    here is what it is now (line 331 is the second to last line):

    <?php

    /***
    * This file is used to add site administration menus to the single user admin backend.
    *
    * If you need to provide configuration options for your component that can only
    * be modified by a site administrator, this is the best place to do it.
    *
    * However, if your component has settings that need to be configured on a user
    * by user basis – it’s best to hook into the front end “Settings” menu.
    */

    /**
    * bp_album_admin()
    *
    * Checks for form submission, saves component settings and outputs admin screen HTML.
    */
    function bp_album_admin() {

    global $bp;

    /* If the form has been submitted and the admin referrer checks out, save the settings */
    if ( isset( $_POST ) ) {

    check_admin_referer(‘bpa-settings’);

    if( current_user_can(‘install_plugins’) ) {

    update_site_option( ‘bp_album_slug’, $_POST );
    update_site_option( ‘bp_album_max_pictures’, $_POST==” ? false : intval($_POST) );

    foreach(array(0,2,4,6) as $i){
    $option_name = “bp_album_max_priv{$i}_pictures”;
    $option_value = $_POST[$option_name]==” ? false : intval($_POST[$option_name]);
    update_site_option($option_name , $option_value);
    }

    update_site_option( ‘bp_album_keep_original’, $_POST );
    update_site_option( ‘bp_album_require_description’, $_POST );
    update_site_option( ‘bp_album_enable_comments’, $_POST );
    update_site_option( ‘bp_album_enable_wire’, $_POST );
    update_site_option( ‘bp_album_middle_size’, $_POST );
    update_site_option( ‘bp_album_thumb_size’, $_POST );
    update_site_option( ‘bp_album_per_page’, $_POST );
    update_site_option( ‘bp_album_url_remap’, $_POST );
    update_site_option( ‘bp_album_base_url’, $_POST );

    $updated = true;

    if($_POST && !$_POST){
    bp_album_rebuild_activity();
    }

    if( !$_POST && $_POST){
    bp_album_undo_rebuild_activity();
    }
    }
    else {
    die(“You do not have the required permissions to view this page”);
    }
    }

    $bp_album_slug = get_site_option( ‘bp_album_slug’ );
    $bp_album_max_pictures = get_site_option( ‘bp_album_max_pictures’ );
    $bp_album_max_priv0_pictures = get_site_option( ‘bp_album_max_priv0_pictures’ );
    $bp_album_max_priv2_pictures = get_site_option( ‘bp_album_max_priv2_pictures’ );
    $bp_album_max_priv4_pictures = get_site_option( ‘bp_album_max_priv4_pictures’ );
    $bp_album_max_priv6_pictures = get_site_option( ‘bp_album_max_priv6_pictures’ );
    $bp_album_keep_original = get_site_option( ‘bp_album_keep_original’ );
    $bp_album_require_description = get_site_option( ‘bp_album_require_description’ );
    $bp_album_enable_comments = get_site_option( ‘bp_album_enable_comments’ );
    $bp_album_enable_wire = get_site_option( ‘bp_album_enable_wire’ );
    $bp_album_middle_size = get_site_option( ‘bp_album_middle_size’ );
    $bp_album_thumb_size = get_site_option( ‘bp_album_thumb_size’ );
    $bp_album_per_page = get_site_option( ‘bp_album_per_page’ );
    $bp_album_url_remap = get_site_option( ‘bp_album_url_remap’ );
    $bp_album_base_url = get_site_option( ‘bp_album_base_url’ );
    $bp_album_rebuild_activity = false;
    $bp_album_undo_rebuild_activity = false;

    ?>

    <?php echo "

    ” . __(‘Settings Updated.’, ‘bp-album’ ) . “

    ” ?>

    <?php
    echo ““;
    _e(“Project Calendar”, ‘bp-album’ );
    echo “
    – “;
    _e(“View our development schedule in real-time using Pivotal Tracker.”, ‘bp-album’ )
    ?>

    <?php
    echo ““;
    _e(“Support Forum”, ‘bp-album’ );
    echo “
    – “;
    _e(“Need help with the plugin? There are hundreds of other users that can answer your questions on our BuddyPress support forum.”, ‘bp-album’ )
    ?>

    <?php
    echo ““;
    _e(“Official Website”, ‘bp-album’ );
    echo “
    – “;
    _e(“Our base of operations on the internet and the only source of info that’s been checked by our dev team.”, ‘bp-album’ )
    ?>

    <?php
    echo ““;
    _e(“Features List”, ‘bp-album’ );
    echo “
    – “;
    _e(“See what features we’re adding to upcoming versions of the plugin.”, ‘bp-album’ )
    ?>

    <?php
    echo ““;
    _e(“Activity Feed”, ‘bp-album’ );
    echo “
    – “;
    _e(“Up-to-the-second bug reports and code updates via Google Code.”, ‘bp-album’ )
    ?>

    <form action="” name=”example-settings-form” id=”example-settings-form” method=”post”>

    <?php
    _e(“Bad slug names will disable the plugin. No Spaces. No punctuation. No special characters. No accents.”, ‘bp-album’ );
    echo ”
    “;
    _e(“{ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_- } ONLY.”, ‘bp-album’ )
    ?>

    <input name="bp_album_slug" type="text" id="bp_album_slug" value="” size=”10″ />

    <input type="radio" name="bp_album_require_description" type="text" id="bp_album_require_description" checked=”checked” value=”1″ />  
    <input type="radio" name="bp_album_require_description" type="text" id="bp_album_require_description" checked=”checked” value=”0″ />
    <input type="radio" name="bp_album_enable_comments" type="text" id="bp_album_enable_comments" checked=”checked” value=”1″ />  
    <input type="radio" name="bp_album_enable_comments" type="text" id="bp_album_enable_comments" checked=”checked” value=”0″ />
    <input type="radio" name="bp_album_enable_wire" type="text" id="bp_album_enable_wire" checked=”checked” value=”1″ />  
    <input type="radio" name="bp_album_enable_wire" type="text" id="bp_album_enable_wire" checked=”checked” value=”0″ />

    <?php _e( "Accepted values: EMPTY (no limit), NUMBER (value you set), 0 (disabled). The first option does not accept 0. The last option only accepts a number.”, ‘bp-album’ ) ?>

    <input name="bp_album_max_pictures" type="text" id="example-setting-one" value="” size=”10″ />
    <input name="bp_album_max_priv0_pictures" type="text" id="bp_album_max_priv0_pictures" value="” size=”10″ />
    <input name="bp_album_max_priv2_pictures" type="text" id="bp_album_max_priv2_pictures" value="” size=”10″ />
    <input name="bp_album_max_priv4_pictures" type="text" id="bp_album_max_priv4_pictures" value="” size=”10″ />
    <input name="bp_album_max_priv6_pictures" type="text" id="bp_album_max_priv6_pictures" value="” size=”10″ />
    <input name="bp_album_per_page" type="text" id="bp_album_per_page" value="” size=”10″ />

    <?php _e( "Uploaded images will be re-sized to the values you set here. Values are for both X and Y size in pixels. We strongly suggest you keep the original image files so BP-Media 0.1.9 can re-render your images during the upgrade process.”, ‘bp-album’ ) ?>

    <input name="bp_album_middle_size" type="text" id="bp_album_middle_size" value="” size=”10″ />
    <input name="bp_album_thumb_size" type="text" id="bp_album_thumb_size" value="” size=”10″ />
    <input type="radio" name="bp_album_keep_original" type="text" id="bp_album_keep_original" checked=”checked” id=”bp-disable-account-deletion” value=”1″ />  
    <input type="radio" name="bp_album_keep_original" type="text" id="bp_album_keep_original" checked=”checked” id=”bp-disable-account-deletion” value=”0″ />

    <?php
    _e( “If you get broken links when viewing images in BP-Album+, it means your server is sending the wrong base URL to the plugin. You can use the image URL re-mapping function to fix this.”,’bp-album’ );
    echo “ “;
    _e(“DOCUMENTATION”,’bp-album’ );
    echo “
    “;
    ?>

    <input type="radio" name="bp_album_url_remap" type="text" id="bp_album_url_remap" checked=”checked” value=”1″ />  
    <input type="radio" name="bp_album_url_remap" type="text" id="bp_album_url_remap" checked=”checked” value=”0″ />
    <input name="bp_album_base_url" type="text" id="bp_album_base_url" value="” size=”70″ />
    /userID/filename.xxx

    <?php _e("A defect in plugin versions before 0.1.8.5 caused all bp-album activity posts to be deleted from the site when the administrator deleted a user. Set 'Rebuild Posts' to 'yes' to add EVERY PHOTO ON YOUR SITE that users have marked as PUBLIC to the site activity stream. This will also ALLOW COMMENTS on the photos. The created posts will have random dates to avoid flooding the activity stream. Set ‘UNDO Rebuild Posts’ to ‘yes’ to remove the posts this function creates it will not harm posts that users created.”, ‘bp-album’ ) ?>

    <input type="radio" name="bp_album_rebuild_activity" type="text" id="bp_album_rebuild_activity" checked=”checked” value=”1″ />  
    <input type="radio" name="bp_album_rebuild_activity" type="text" id="bp_album_rebuild_activity" checked=”checked” value=”0″ />

    <input type="radio" name="bp_album_undo_rebuild_activity" type="text" id="bp_album_undo_rebuild_activity" checked=”checked” value=”1″ />  
    <input type="radio" name="bp_album_undo_rebuild_activity" type="text" id="bp_album_undo_rebuild_activity" checked=”checked” value=”0″ />

    <input type="submit" name="submit" value="”/>

    <?php
    /* This is very important, don’t leave it out. */
    wp_nonce_field( ‘bpa-settings’ );
    ?>

    <?php
    }
    ?>

    Any help?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error in admin section’ is closed to new replies.
Skip to toolbar