• User Attivo

    Plugin per Vbulletin

    Devo installare un plugin per Vbulletin, ma il fatto è che da Vbulletin mi chiede un file con estensione xml, mentre il mio è un file vbull.aemod

    Le vecchie versioni di VB usavano per caso questo tipo di file?

    Il contenuto del file è una serie di comandi PHP e MySQL. Non dei tag xml... ho provato ad uploddarlo lo stesso ma non lo prende.

    Avete qualche ipotesi o consiglio?


  • Super User

    Cavolo, dev'essere una modifica antichissima.
    Non è compatibile con le nuove.

    Mi dici che plugin ti serve e che vwersione di vbulletin hai?


  • User Attivo

    @Karapoto said:

    Cavolo, dev'essere una modifica antichissima.
    Non è compatibile con le nuove.

    Mi dici che plugin ti serve e che vwersione di vbulletin hai?

    Il plugin serve a integrare VB (ultima versione, credo sia la 3.6.8?) con Dolphin.
    Il plugin contiene il codice che segue.

    INSERT INTO `Modules` VALUES ('', 'vbull', 'global $mods;
     
    /**
    * ''ModuleDirectory''
    * Specifies name of directory, where forum is located
    * (string)
    */
     
    $mods[''vbull''][''ModuleDirectory''] = ''forum/'';
     
     
    // Miscelleneous settings
     
    /** 
    * ''CookieMember''
    * Whether or not to send cookies when login
    * (boolean)
    */
    $mods[''vbull''][''CookieMember''] = false;
     
    /** 
    * ''RedirectMethod''
    * Defines method of redirecting after login procedure.
    * (enum)
    * Possible values:
    * ''SendHeader'' - fast redirect, thru sending ''Location...'' header
    * ''SubmitForm'' - redirect thru submitting of the form. Greeting message is displayed
    */
    $mods[''vbull''][''RedirectMethod''] = ''SubmitForm'';
     
    /**
    * ''ShowEMail''
    * Whether or not to show e-mails to all members. By default depends on aeDating ''Anonymous mode'' global setting.
    * (boolean)
    */
    $mods[''vbull''][''ShowEMail''] = ! (bool)getParam(''anon_mode'');
     
    /**
    * ''ReceiveMailFromAdmin''
    * Whether or not to force members receive e-mails from forum administrator
    * (boolean)
    */
    $mods[''vbull''][''ReceiveMailFromAdmin''] = 1;
     
     
    // The following is the default member data: data that cannot be extracted from aeDating profile and will be set only
    // once: on member registration. During further updates this data will not be changed to prevent member own data loss. 
     
    /** 
    * ''ShowBirthday''
    * Whether or not to show member birthday to all members
    * (boolean)
    */
    $mods[''vbull''][''ShowBirthday''] = 1;
     
    /**
    * ''DSTMode''
    * Defines Daylight Saving Time mode
    * (enum)
    * Possible values:
    * 0 - DST corrections always off
    * 1 - DST corrections always on
    * 2 - Automatically detect DST settings
    */
    $mods[''vbull''][''DSTMode''] = 2;
     
    /**
    * ''TimeZoneOffset''
    * Defines time zone offset
    * (enum)
    * Possible values:
    * -12 - GMT -12:00
    * ...
    * 0 - GMT 
    * ...
    * 12 - GMT +12:00
    */
    $mods[''vbull''][''TimeZoneOffset''] = 0;', '/**
    * FuncAdd procedure for vBulletin module
    * 
    * @param string $UserIdentifier member ID or admin name (depend on $IsAdmin parameter)
    * 
    * @param boolean $IsAdmin Defines whether user is a simple member or admin
    */
     
    /* If you modify this function, do not forget to modify FuncUpdate in same way (these functions are almost equal) */
     
    global $dir;
    global $mods;
    global $site;
    global $PHPBIN;
     
    $CommandLineArgs = new CCommandLineArgs;
     
    $CommandLineArgs->AddArgument(''add''); // Action
    $CommandLineArgs->AddArgument((int)$IsAdmin);
     
    if ($IsAdmin)
    { 
    // $UserIdentifier is interpreted as an admin name
    $AdminInfo = db_arr("SELECT `Name`,
    `Password`
    FROM Admins
    WHERE `Name` = ''".$UserIdentifier."''");
     
    if (! $AdminInfo)
    {
    modules_err("FuncAdd error: Unknown admin ID [{$UserIdentifier}]");
    }
     
    $CommandLineArgs->AddArgument($AdminInfo[''Name'']);
    $CommandLineArgs->AddArgument($AdminInfo[''Password'']);
    $CommandLineArgs->AddArgument($site[''email'']);
     
    // Fill dummy data
    $CommandLineArgs->AddArgument(2000); // BirthYear
    $CommandLineArgs->AddArgument(1); // BirthMonth
    $CommandLineArgs->AddArgument(1); // BirthDay
    $CommandLineArgs->AddArgument(''''); // AvatarImagePath (no avatar)
    $CommandLineArgs->AddArgument(_t(''_Dolphin Administrator''));
    }
    else 
    {
    // $UserIdentifier is interpreted as a profile ID
    $UserIdentifier = (int)$UserIdentifier;
     
    $UserInfo = db_arr("SELECT `NickName`, 
    `Password`, 
    `Email`, 
    YEAR(`DateOfBirth`) AS `BirthYear`, 
    MONTH(`DateOfBirth`) AS `BirthMonth`, 
    DAYOFMONTH(`DateOfBirth`) AS `BirthDay`,
    `Pic_0_addon` AS `AvatarImagePath`
    FROM Profiles
    WHERE `ID` = {$UserIdentifier}");
     
    if (! $UserInfo)
    modules_err("FuncAdd error: Unknown user ID [{$UserIdentifier}]");
     
    $CommandLineArgs->AddArgument($UserInfo[''NickName'']);
    $CommandLineArgs->AddArgument($UserInfo[''Password'']);
    $CommandLineArgs->AddArgument($UserInfo[''Email'']);
    $CommandLineArgs->AddArgument($UserInfo[''BirthYear'']);
    $CommandLineArgs->AddArgument($UserInfo[''BirthMonth'']);
    $CommandLineArgs->AddArgument($UserInfo[''BirthDay'']);
    $CommandLineArgs->AddArgument($UserInfo[''AvatarImagePath'']);
     
    // Set membership name as user group title
    $MembershipInfo = getMemberMembershipInfo($UserIdentifier);
    $CommandLineArgs->AddArgument($MembershipInfo[''Name'']); 
    }
     
    $CommandLineArgs->AddArgument($mods[''vbull''][''ShowEMail'']);
    $CommandLineArgs->AddArgument($mods[''vbull''][''ReceiveMailFromAdmin'']);
    $CommandLineArgs->AddArgument($mods[''vbull''][''ShowBirthday'']);
    $CommandLineArgs->AddArgument($mods[''vbull''][''DSTMode'']);
    $CommandLineArgs->AddArgument($mods[''vbull''][''TimeZoneOffset'']);
     
    if (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory'']))
    {
    $scriptReturnValue = ''value was not set'';
    exec("{$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue);
    if ($scriptReturnValue !== 0)
    {
    echo "--- script output dump --- <br />\
    ";
    foreach ($scriptOutput as $outputLine)
    {
    echo $outputLine.''<br />'';
    } 
    echo "--- end --- <br />\
    ";
    modules_err("FuncAdd(): exec({$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue);
    } 
    }
    else 
    {
    modules_err("FuncAdd(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']} returned false");
    }', '/** * FuncDel procedure for vBulletin module * * @param string $UserIdentifier member ID */ global $dir; global $mods; global $PHPBIN; $CommandLineArgs = new CCommandLineArgs; $CommandLineArgs->AddArgument(''delete''); // Action $CommandLineArgs->AddArgument((int)$IsAdmin); if ($IsAdmin) { // $UserIdentifier is interpreted as an admin name $AdminInfo = db_arr("SELECT * FROM `Admins` WHERE `Name` = ''{$UserIdentifier}''"); if (! $AdminInfo) modules_err("FuncDel error: Unknown admin (''{$UserIdentifier}'')"); $CommandLineArgs->AddArgument($UserIdentifier); } else { // $UserIdentifier is interpreted as a profile ID $UserIdentifier = (int)$UserIdentifier; $UserInfo = db_arr("SELECT `NickName` FROM `Profiles` WHERE `ID` = ''{$UserIdentifier}''"); if (! $UserInfo) modules_err("FuncDel error: Unknown user ID [{$UserIdentifier}]"); $CommandLineArgs->AddArgument($UserInfo[''NickName'']); } if (chdir($dir[''root''] . $mods[''vbull''][''ModuleDirectory''])) { $scriptReturnValue = ''value was not set''; exec("{$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine(), $scriptOutput, $scriptReturnValue); if ($scriptReturnValue !== 0) { echo "--- script output dump --- <br />\
    "; foreach ($scriptOutput as $outputLine) { echo $outputLine.''<br />''; } echo "--- end --- <br />\
    "; modules_err("FuncDel(): exec({$PHPBIN} -f vbregister.php ".$CommandLineArgs->GetCommandLine().") returned ".$scriptReturnValue); } } else { modules_err("FuncDel(): chdir({$dir[''root'']}{$mods[''vbull''][''ModuleDirectory'']} returned false"); } ', '
    /**
    * FuncUpdate procedure for vBulletin module
    * 
    * @param string $UserIdentifier member ID or admin name (depend on $IsAdmin parameter)
    * 
    * @param boolean $IsAdmin Defines whether user is a simple member or admin
    */
     
    /* If you modify this function, do not forget to modify FuncAdd in same way (these functions are almost equal) */
     
    global $dir;
    global $mods;
    global $site;
    global $PHPBIN;
     
    $CommandLineArgs = new CCommandLineArgs;
     
    $CommandLineArgs->AddArgument(''update''); // Action
    $CommandLineArgs->AddArgument((int)$IsAdmin);
     
    if ($IsAdmin)
    { 
    // $UserIdentifier is interpreted as an admin name
    $AdminInfo = db_arr("SELECT `Name`,
    `Password`
    FROM Admins
    WHERE `Name` = ''".$UserIdentifier."''");
     
    if (! $AdminInfo)
    {
    modules_err("FuncUpdate error: Unknown admin ID [{$UserIdentifier}]");
    }
     
    $CommandLineArgs->AddArgument($AdminInfo[''Name'']);
    $CommandLineArgs->AddArgument($AdminInfo[''Password'']);
    $CommandLineArgs->AddArgument($site[''email'']);
     
    // Fill dummy data
    $CommandLineArgs->AddArgument(2000); // BirthYear
    $CommandLineArgs->AddArgument(1); // BirthMonth
    $CommandLineArgs->AddArgument(1); // BirthDay
    $CommandLineArgs->AddArgument(''''); // AvatarImagePath (no avatar)
    $CommandLineArgs->AddArgument(_t(''_aeDating Administrator''));
    }
    else 
    {
    // $UserIdentifier is interpreted as a profile ID
    $UserIdentifier = (int)$UserIdentifier;
     
    $UserInfo = db_arr("SELECT `NickName`, 
    `Password`, 
    `Email`, 
    YEAR(`DateOfBirth`) AS `BirthYear`, 
    MONTH(`DateOfBirth`) AS `BirthMonth`, 
    DAYOFMONTH(`DateOfBirth`) AS `BirthDay`,
    `Pic_0_addon` AS `AvatarImagePath`
    FROM Profiles
    WHERE `ID` = {$UserIdentifier}");
     
    if (! $UserInfo)
    modules_err("FuncUpdate error: Unknown user ID [{$UserIdentifier}]");
     
    $CommandLineArgs->AddArgument($UserInfo[''NickName'']);
    $CommandLineArgs->AddArgument($UserInfo[''Password'']);
    $CommandLineArgs->AddArgument($UserInfo[''Email'']);
    $CommandLineArgs->AddArgument($UserInfo[''BirthYear'']);
    $CommandLineArgs->AddArgument($UserInfo[''BirthMonth'']);
    $CommandLineArgs->AddArgument($UserInfo[''BirthDay'']);
    $CommandLineArgs->AddArgument($UserInfo[''AvatarImagePath'']);
     
    // Set membership name as user group title
    $MembershipInfo = getMemberMembershipInfo($UserIdentifier);
    $CommandLineArgs->AddArgument($MembershipInfo[''Name'']); 
    }
    [...]
    

  • Super User

    L'ho messo trai tag codice per rendere più pratica la visualizzazione.

    A prima vista dovrebbe essere rivisto completamente, ed in questo non posso aiutarti.
    Mi dispiace ma non esiste una modifica analoga per 3.6.8