Tag (Acceptat/Respins) in anumite sectiuni

Pentru întrebări legate de facilităţile forumului phpBB 3.0.x, acest loc este cel mai potrivit.
Reguli forum
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
Închis
JAYceon
Nou venit
Mesaje: 6
Membru din: 24-Oct-2014, 23:08:27
Versiune: 3
Ext: Da
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu

Tag (Acceptat/Respins) in anumite sectiuni

Mesaj de JAYceon »

Salut.

Cum as putea pune,un tag la un topic.
Spre exemplu:
http://s30.postimg.org/swkygt5b5/Snapsh ... 193753.png

Insa, doar moderatorul acelui forum, inclusiv fondatorul sa poata modifica acel tag si sa nu poata fi pus de catre alti utilizatori sau de alti utilizatori din diferite grupe.
Sau nu neaparat cum este in poza, ci simplu TEXT colorat (doar tagul acela color, restul culoare normala).
Avatar utilizator
Anișor
AdministratorAdministrator
Mesaje: 2987
Membru din: 08-Aug-2012, 20:46:05
Versiune: 4.0.0-a1
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Experimentat
Nivel php: Mediu
Localitate: Arbroath, Angus
Contact:

Re: Tag (Acceptat/Respins) in anumite sectiuni

Mesaj de Anișor »

Cred că acela este IPB nu phpBB3.
Dar se poate face cu un tag la titlu.

Ceva de genul ..

Cod: Selectaţi tot

                // Inlocuieste "[ACCEPTAT]" cu o imagine
                $is_acceptat = false;

                if (strtolower(substr($row['topic_title'], 0, 7)) == '[acceptat]')
                {
                        $row['topic_title'] = substr($row['topic_title'], 7);
                        $is_acceptat = true;
                } 
Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
JAYceon
Nou venit
Mesaje: 6
Membru din: 24-Oct-2014, 23:08:27
Versiune: 3
Ext: Da
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu

Re: Tag (Acceptat/Respins) in anumite sectiuni

Mesaj de JAYceon »

Son of God scrie:Cred că acela este IPB nu phpBB3.
Dar se poate face cu un tag la titlu.

Ceva de genul ..

Cod: Selectaţi tot

                // Inlocuieste "[ACCEPTAT]" cu o imagine
                $is_acceptat = false;

                if (strtolower(substr($row['topic_title'], 0, 7)) == '[acceptat]')
                {
                        $row['topic_title'] = substr($row['topic_title'], 7);
                        $is_acceptat = true;
                } 
Este phpbb3 dar e pe forumgratuit.

Unde adaug acel cod?
Avatar utilizator
Anișor
AdministratorAdministrator
Mesaje: 2987
Membru din: 08-Aug-2012, 20:46:05
Versiune: 4.0.0-a1
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Experimentat
Nivel php: Mediu
Localitate: Arbroath, Angus
Contact:

Re: Tag (Acceptat/Respins) in anumite sectiuni

Mesaj de Anișor »

Deschide styles/prosilver/template/viewforum_body.html
Caută :

Cod: Selectaţi tot

<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> 
Înlocuiește cu:

Cod: Selectaţi tot

<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_IS_ACCEPTAT --><img src="{S_THEME_PATH}/images/acceptat.png" style="margin-bottom:-2px; valign:bottom" />  <!-- ENDIF -->{topicrow.TOPIC_TITLE}</a> 
Deschide viewforum.php
Caută:

Cod: Selectaţi tot

$topic_forum_id = ($row['forum_id']) ? (int) $row['forum_id'] : $forum_id; 
Adaugă înainte:

Cod: Selectaţi tot

                // Inlocuieste "[ACCEPTAT]" cu o imagine
                $is_acceptat = false;

                if (strtolower(substr($row['topic_title'], 0, 7)) == '[acceptat]')
                {
                        $row['topic_title'] = substr($row['topic_title'], 7);
                        $is_acceptat = true;
                }  
Caută:

Cod: Selectaţi tot

                        'S_TOPIC_MOVED'                        => ($row['topic_status'] == ITEM_MOVED) ? true : false, 
Adaugă după:

Cod: Selectaţi tot

                        'S_IS_ACCEPTAT'                        => ($is_acceptat) ? true : false, 
Imaginea: http://i.epvpimg.com/gpfch.png o salvezi, o redenumești în acceptat și o urci în styles/prosilver/theme/images

Apoi ștergi cache și scrii un subiect nou cu [ACCEPTAT] în față să vezi dacă merge.
Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
JAYceon
Nou venit
Mesaje: 6
Membru din: 24-Oct-2014, 23:08:27
Versiune: 3
Ext: Da
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu

Re: Tag (Acceptat/Respins) in anumite sectiuni

Mesaj de JAYceon »

Am tema Arrow si nu-mi gaseste acel cod ..
Avatar utilizator
Anișor
AdministratorAdministrator
Mesaje: 2987
Membru din: 08-Aug-2012, 20:46:05
Versiune: 4.0.0-a1
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Experimentat
Nivel php: Mediu
Localitate: Arbroath, Angus
Contact:

Re: Tag (Acceptat/Respins) in anumite sectiuni

Mesaj de Anișor »

Caută:

Cod: Selectaţi tot

<dt style="<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> 
Înlocuiește cu:

Cod: Selectaţi tot

<dt style="<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_IS_ACCEPTAT --><img src="{S_THEME_PATH}/images/acceptat.png" style="margin-bottom:-2px; valign:bottom" />  <!-- ENDIF -->{topicrow.TOPIC_TITLE}</a> 
Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
Închis

Înapoi la “3.0.x Cum pot să...?”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator