Pagina 1 din 1

Tag (Acceptat/Respins) in anumite sectiuni

Scris: 25-Oct-2014, 19:39:25
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).

Re: Tag (Acceptat/Respins) in anumite sectiuni

Scris: 25-Oct-2014, 21:18:20
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;
                } 

Re: Tag (Acceptat/Respins) in anumite sectiuni

Scris: 25-Oct-2014, 21:24:09
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?

Re: Tag (Acceptat/Respins) in anumite sectiuni

Scris: 25-Oct-2014, 21:32:20
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.

Re: Tag (Acceptat/Respins) in anumite sectiuni

Scris: 25-Oct-2014, 21:57:37
de JAYceon
Am tema Arrow si nu-mi gaseste acel cod ..

Re: Tag (Acceptat/Respins) in anumite sectiuni

Scris: 25-Oct-2014, 22:13:37
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>