• User Attivo

    Problema mod phpbb

    Questo mod crea una pagina che elenca tutti gli indirizzi degli iscritti a un forum.

    <?php
    ##############################################################

    MOD Title: Admin_Email_List

    MOD Version: 1.02 Final

    MOD Author: Jamer (Colin James) http://www.jamer.co.uk/scripts/phpbb2

    MOD Description: This mod will list all email addresses from your phpbb database, within the admin cp

    Installation Level: Easy

    Installation Time: 5 Minutes

    Files To Edit: file_language/lang_XXX/lang_admin.php)

    Included Files: (admin_email_list.php,admin_users_email_list_body.tpl)

    ##############################################################

    For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the

    latest version of this MOD. Downloading this MOD from other sites could cause malicious code

    to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered

    in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/

    ##############################################################

    Author Notes:

    ##############################################################

    MOD History:

    ##############################################################

    Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD

    ##############################################################

    Includes Fix by Dwing (phpBBHacks.com)

    ##############################################################

    define('IN_PHPBB', 1);
    if( !empty($setmodules) )
    {
    $filename = basename(FILE);
    $module['Users']['Email_List'] = append_sid($filename);
    return;
    }

    //
    // Load default header
    //
    $phpbb_root_path = "../";
    require($phpbb_root_path . 'extension.inc');
    require('pagestart.' . $phpEx);

    //
    // Generate page
    //
    $template->set_filenames(array(
    'body' => 'admin/admin_users_email_list_body.tpl')
    );

    $template->assign_vars(array(
    'L_ADMIN_USERS_LIST_MAIL_TITLE' => $lang['Admin_Users_List_Mail_Title'],
    'L_ADMIN_USERS_LIST_MAIL_EXPLAIN' => $lang['Admin_Users_List_Mail_Explain'],
    'L_USERNAME' => $lang['Usersname'],
    'L_EMAIL' => $lang['Email'])
    );

    // Count users
    $sql = "SELECT user_id FROM ".USERS_TABLE." WHERE user_id > 0";
    if(!$result = $db->sql_query($sql))
    {
    message_die(GENERAL_ERROR, "Could not count Users", "", LINE, FILE, $sql);
    }
    $total_users = $db->sql_numrows($result);
    //

    $query_result = mysql_query("SELECT username,user_email FROM phpbb_users WHERE user_id > 0");

    while( $row = $db->sql_fetchrow($query_result) )
    {
    $userrow[] = $row;
    }

    for ($i = 0; $i < $total_users; $i++)
    {
    if (empty($userrow*))
    {
    break;
    }

    $row_color = (($i % 2) == 0) ? "row1" : "row2";
    
    $template->assign_block_vars('userrow', array(
    	'COLOR' => $row_color,
    	'NUMBER' => ($start + $i + 1),
    	'USERNAME' => $userrow*['username'],
    	'U_ADMIN_USER' => append_sid("admin_users.$phpEx?mode=edit&amp;" . POST_USERS_URL . "=" . $userrow*['user_id']),
    	'EMAIL' => $userrow*['user_email']
    	) //end array
    );
    

    } // end for

    $template->pparse('body');
    include('./page_footer_admin.'.$phpEx);
    ?>

    Il problema è che (almeno penso) questo mod prende le email dalla tabella con prefisso phpbb_ e io, siccome sul database ho vari forum, vorrei che prendesse le email dalla tabella con prefisso fv_
    Cosa devo cambiare?

    Grazie


  • User Attivo

    @rdo said:

    Questo mod crea una pagina che elenca tutti gli indirizzi degli iscritti a un forum.

    <?php
    ##############################################################

    MOD Title: Admin_Email_List

    MOD Version: 1.02 Final

    MOD Author: Jamer (Colin James) http://www.jamer.co.uk/scripts/phpbb2

    MOD Description: This mod will list all email addresses from your phpbb database, within the admin cp

    Installation Level: Easy

    Installation Time: 5 Minutes

    Files To Edit: file_language/lang_XXX/lang_admin.php)

    Included Files: (admin_email_list.php,admin_users_email_list_body.tpl)

    ##############################################################

    For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the

    latest version of this MOD. Downloading this MOD from other sites could cause malicious code

    to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered

    in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/

    ##############################################################

    Author Notes:

    ##############################################################

    MOD History:

    ##############################################################

    Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD

    ##############################################################

    Includes Fix by Dwing (phpBBHacks.com)

    ##############################################################

    define('IN_PHPBB', 1);
    if( !empty($setmodules) )
    {
    $filename = basename(FILE);
    $module['Users']['Email_List'] = append_sid($filename);
    return;
    }

    //
    // Load default header
    //
    $phpbb_root_path = "../";
    require($phpbb_root_path . 'extension.inc');
    require('pagestart.' . $phpEx);

    //
    // Generate page
    //
    $template->set_filenames(array(
    'body' => 'admin/admin_users_email_list_body.tpl')
    );

    $template->assign_vars(array(
    'L_ADMIN_USERS_LIST_MAIL_TITLE' => $lang['Admin_Users_List_Mail_Title'],
    'L_ADMIN_USERS_LIST_MAIL_EXPLAIN' => $lang['Admin_Users_List_Mail_Explain'],
    'L_USERNAME' => $lang['Usersname'],
    'L_EMAIL' => $lang['Email'])
    );

    // Count users
    $sql = "SELECT user_id FROM ".USERS_TABLE." WHERE user_id > 0";
    if(!$result = $db->sql_query($sql))
    {
    message_die(GENERAL_ERROR, "Could not count Users", "", LINE, FILE, $sql);
    }
    $total_users = $db->sql_numrows($result);
    //

    $query_result = mysql_query("SELECT username,user_email FROM phpbb_users WHERE user_id > 0");

    while( $row = $db->sql_fetchrow($query_result) )
    {
    $userrow[] = $row;
    }

    for ($i = 0; $i < $total_users; $i++)
    {
    if (empty($userrow*))
    {
    break;
    }

    $row_color = (($i % 2) == 0) ? "row1" : "row2";

    $template->assign_block_vars('userrow', array(
    'COLOR' => $row_color,
    'NUMBER' => ($start + $i + 1),
    'USERNAME' => $userrow*['username'],
    'U_ADMIN_USER' => append_sid("admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $userrow*['user_id']),
    'EMAIL' => $userrow*['user_email']
    ) //end array
    );
    } // end for

    $template->pparse('body');
    include('./page_footer_admin.'.$phpEx);
    ?>

    Il problema è che (almeno penso) questo mod prende le email dalla tabella con prefisso phpbb_ e io, siccome sul database ho vari forum, vorrei che prendesse le email dalla tabella con prefisso fv_
    Cosa devo cambiare?

    Grazie

    devi cambiare quello in fv_users
    però mi sembra strano che gli dia il nome così, da qualche parte dovrebbe essere scritto il nome delle tabelle nel phpbb