Pretty Topic

Combo Tags Tutorial ? - Pretty Topic

Combo Tags Tutorial ?

by WISHEXEC » Fri Feb 17, 2017 1:54 pm

Can we have combo tags tutorial ?

Sticky & Locked
Announcement & Locked
Global & Locked

Or maybe if the topic is sticky / announcement / global (and locked) to not display "locked" but just display the topic type sticky / announcement / global ...

Hope you understand what i mean :(
WISHEXEC
Registered User
Posts: 87
Joined: Fri Dec 04, 2015 12:39 pm
Contact:

Re: Combo Tags Tutorial ?

by ramen100 » Wed Mar 15, 2017 3:12 pm

I think I found some kind of solution to that.

Pretty Topic doesn't add any new tags, it just visualizes the topic.types and topic.status already created by phpBB.
phpBB uses them e.g. for tooltips when you move your mouse over a closed topic or over a topic icon. These tooltips explain that the topic is locked or an announcement.

However, phpBB always chooses topic.status (locked or not) over topic.type (anouncement, global anouncement, sticky), thats why sticky & locked is always treated as locked. Pretty Topic just displays that.

The solution doesn't lie in the extension, but the original phpBB files /includes/functions_display.php
CAREFUL, YOU MESS WITH THE ORIGINAL PHPBB FILES not the extension!
Search for line 1050-1055:

Code: Select all

if ($topic_row['topic_status'] == ITEM_LOCKED)
		{
			$topic_type = $user->lang['VIEW_TOPIC_LOCKED'];
			$folder .= '_locked';
			$folder_new .= '_locked';
		}
and delete line 1052 or comment it out:

Code: Select all

if ($topic_row['topic_status'] == ITEM_LOCKED)
		{
			$folder .= '_locked';
			$folder_new .= '_locked';
		}
However, this will render the whole "locked" tag in pretty topic invisible. If you leave the following lines with $folder and $folder_new unchanged, the topic icon will still display the tiny lock if the topic is locked and I even get the "locked topic" tooltip if I move my cursor over the topic title.
Pretty Topic tags sticky/announcement/global will display no matter if the topic is locked additionally or not.
Attachments
Unbenannt.png
Unbenannt.png (9.01 KiB) Viewed 95 times
ramen100
Registered User
Posts: 8
Joined: Wed Mar 15, 2017 2:53 pm
Contact: