Im Original lege ich dazu 2 Custom Profil Felder an, und nutze diesen Code :
Code: Alles auswählen
// MOD : MSSTI ABBC3 (custom profile fields) - Start
if ($abbc3 && @$config['ABBC3_MOD'])
{
// Load custom profile fields
if (!class_exists('custom_profile'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
}
$abbcode_cp = new custom_profile();
// Grab all profile fields from users in id cache for later use - similar to the poster cache
$abbcode_cpf = $abbcode_cp->generate_profile_fields_template('grab', $user->data['user_id']);
// Redefine the use of ABBC3 according this user preferences
$abbc3 = (isset($abbcode_cpf[$user->data['user_id']]['abbc_mod']['value'])) ? (($abbcode_cpf[$user->data['user_id']]['abbc_mod']['value'] == 1) ? true : false ) : $abbc3;
// Define the ABBC3 view, according this user preferences
global $abbcode_compact;
$abbcode_compact = (isset($abbcode_cpf[$user->data['user_id']]['abbc_short']['value'])) ? (($abbcode_cpf[$user->data['user_id']]['abbc_short']['value'] == 1) ? true : false ) : false;
}
// MOD : MSSTI ABBC3 (custom profile fields) - End
user_abbc_mod
user_abbc_short
Den jeweiligen Wert für einen Switch wird einwandfrei in die Felder übergeben. Weiss nun jemand wie ich den obigen Code umschreiben müsste, damit meine beiden Felder benutzt werden anstatt der Inhalt der Custom Felder ?
Das abschalten des Mod für den jeweiligen User könnte ich über einen Switch realisieren, ich habe aber keine Ahnung wie ich zwischen den Kompakt und Voll Modus wechseln kann.
Der Download des Mod ist hier möglich : http://www.mssti.com/phpbb3/viewtopic.php?f=39&t=383