User posts with next rank

Discutere phpBB 3.0.x modifiche qui, e visualizzare le modifiche che sono disponibili per il download.
Regole del forum
Immagine
Rispondi
Robot Estensioni
Robot Estensioni
Robot Estensioni
Messaggi: 444
Iscritto il: 4 nov 2012, 10:12
Località: phpbb3world

User posts with next rank

Messaggio da Robot Estensioni » 8 ago 2013, 17:23

Modifica Nome: User posts with next rank (Messaggi degli utenti con grado successivo)
Autore: ameeck
Modifica Descrizione: Consente di visualizzare il numero dei tuoi messaggi sulla barra di intestazione in alto con la quantità dei messaggi necessari per il grado successivo.
total_posts.png
Modifica Versione: 1.0.1
phpBB Versione: imgdestra Modifiche necessarie per la 3.0.11 li trovate sotto: Autore Rey messa anche sul com
AutoMOD: si
Modifica Download: clicca qui


-->Modifica supporto<--

imgattention::::Modifiche per funzionare sulla 3.0.11::::imgattention

Apri: includes/functions.php
Trova questo:

Codice: Seleziona tutto

global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path; 
Sostituisci con:

Codice: Seleziona tutto

global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path, $cache; 
Codice vecchio:

Codice: Seleziona tutto

global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; 
Aggiungi dopo il codice segnalato qui sopra:

Codice: Seleziona tutto

        // BEGIN User posts with next rank MOD
        // Initialize some variables
        $ranks = array();
        $next_rank_posts = 0;
        
        // Get the ranks and split them into normal and special
        $ranks = $cache->obtain_ranks();
        $special_ranks = (array_key_exists('special', $ranks)) ? $ranks['special'] : array();
        $normal_ranks = (array_key_exists('normal', $ranks)) ? sort_ranks($ranks['normal'], 'rank_min') : array();
        
        // Check if the user has a special rank, in that case, display only number of posts
        if (sizeof($special_ranks) && array_key_exists($user->data['user_rank'], $special_ranks))
        {
            $next_rank_posts = 0;
        }
        // User has a normal rank, let's see what the next rank is!
        else
        {
            if (sizeof($normal_ranks))
            {
                // Go through the ranks from the top and see if the user has reached that level, if not, specify the rank as next
                foreach ($normal_ranks as $rank)
                {
                    if ($user->data['user_posts'] < $rank['rank_min'])
                    {
                        $next_rank_posts = (int) $rank['rank_min'];
                    }
                }
            }
        }
        // END User posts with next rank MOD               

Apri: styles/prosilver/template/overall_header.html
Trova:

Codice: Seleziona tutto

<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
Aggiungi dopo:

Codice: Seleziona tutto

&bull; {L_TOTAL_POSTS}: {USER_POSTS}<!-- IF NEXT_RANK_POSTS != 0 --> / {NEXT_RANK_POSTS}<!-- ENDIF -->
(questo è un account manager non attivo per il MOD team phpBB3 World)

Rispondi

Torna a “3.0.x Modifiche Forum”

Chi c’è in linea

Visitano il forum: Nessuno e 31 ospiti