Snippet Available QuestionsPrefix CSS for Quick Title Edition 2.0.0

Questions :question: place them in this section
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6485
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Prefix CSS for Quick Title Edition 2.0.0

Post by dmzx »

You have to install this extension Quick Title Edition 2.0.0
Beware it's in ALPHA1 Stage and no support on the extension on this forum, If needed ask original author for support.

This will only show how to add the css file to the extension.

You will have to create a specific language key.

To do this:
Open ext\abdev\qte\language\en\attributes.php
Find This may be a partial find and not the whole line

Code: Select all

	'QTE_SOLVED' => '[Solved by %mod% :: %date%]',
	'QTE_CANCELLED' => 'Cancelled',
In this example we will make the topic solved button.
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

'QTE_TOPICSOLVED' => 'Solved',
Once the language key is created, you need to define a CSS class.
Attention, the language key and the CSS class must have the same name. In this tutorial, we will use the QTE_TOPICSOLVED language key.

Now add the css attribute:
Open ext\abdev\qte\styles\prosilver\theme\qte.css
Find This may be a partial find and not the whole line

Code: Select all

/* attributes */
.qte_solved { color: #006600; }
.qte_cancelled { color: #cc0000; }

.qte_solved, .qte_cancelled { font-weight:bold; }
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

.qte_topicsolved { 
	color: #FFF;
	background-color: #88DB43;
	-webkit-border-radius: 4px;
	-o-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 2.1px;
	overflow: hidden;
	font-weight: bold;
}
The qte_topicsolved must have the same name as in the language file QTE_TOPICSOLVED but without capitals.
Also the css can be adjusted to whatever you like on your forum.

Now go to ACP and look under Posting => Topic attributes and click "Add a new attribute" button.

Image

Now set the Attribute name you created QTE_TOPICSOLVED and the permissions for what forum and who can use the attribute and hit the submit button.

Image

The result is a new attribute with the name Solved like you made in the language file.

Image

Now go the the forum you set to use the topic attribute. (in my case Your first forum as Administrator) and open a new topic.
There is now an option to select the topic attribute and in the drop down menu the option Solved

Image

Once selected and topic is submitted the output will be shown in the viewtopic and viewforum.

Image
Image

So you can make as many attributes as you like with different colours and your own css style, just repeat the steps above with other names and other css edits :wink:

Grtz dmzx

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5123
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by martin »

Always wanted this but to lazy to add it. :rolling:
Image

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

jan_2017
Users
Users
Status: Offline
User theme: Dark
Posts: 203
Joined: Feb 5th, '17, 09:21
    Android Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by jan_2017 »

Works fine

very thanks

[ Post made via Android ] Image

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

kaspir
Users
Users
Status: Offline
User theme: Dark
Posts: 112
Joined: Aug 25th, '16, 10:50
    Windows 7 Firefox

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by kaspir »

Damn sweet.. thanks for the quick walkthru DMZX, @martin, totally worth the time, didn't take as long as you'd expect.. but I suppose getting all my customs my way, will! :thumbup:
Image
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads. :P

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5123
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by martin »

I done it a while back but too dam lazy to do it at the start lol.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

kaspir
Users
Users
Status: Offline
User theme: Dark
Posts: 112
Joined: Aug 25th, '16, 10:50
    Windows 7 Firefox

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by kaspir »

Ahh man, I just caught these prefixes in my meta titles! LOL, I was like wtf, dmzx isn't showing..

After too much wasted time with it.. I'll save others the effort.
Here's how to remove it: https://www.phpbb.com/community/viewtop ... #p14694071

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6485
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by dmzx »

kaspir wrote: Nov 21st, '17, 12:27 Ahh man, I just caught these prefixes in my meta titles! LOL, I was like wtf, dmzx isn't showing..

After too much wasted time with it.. I'll save others the effort.
Here's how to remove it: https://www.phpbb.com/community/viewtop ... #p14694071
:thumbup:

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

rammstein
Users
Users
Status: Offline
User theme: Dark
Posts: 78
Joined: Mar 13th, '15, 18:08
    Windows 10 Firefox

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by rammstein »

Hello
I have a quick question I have installed Quick Title Edition 2.0.0 I do the assigns that works very well my question how can I nodify the attribution I'm taking an ex a member but the set attribute but I would like to nodify are not resolved how I could do I noticed that the aminimitator can not change the member's attribution

ernadoo/qte
Quick Title Edition
Version : 2.0.0-a2

bonjour
je une petite question j'ai installer Quick Title Edition 2.0.0 j'ai fais les attribu qui marche trés bien ma question comment je peut nodifier l'attribu je prent un ex un membre mais l'attribu réglé mais moi je voudrais nodifier sont attribu pas resolu comment je pourrais faire j'ai remargué que l'aminimitrateur peut pas change l'attribu du membre

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

boldherri
Users
Users
Status: Offline
User theme: Dark
Posts: 46
Joined: May 31st, '18, 13:28
    Windows 10 Firefox

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by boldherri »

Hello everybody,

I'm trying to add new prefixes and i performed this procedure

In file ext\abdev\qte\language\en\attributes.php i have add this

Code: Select all

'QTE_TOPICSGUIDE' => 'Guida',
and in file ext\abdev\qte\styles\prosilver\theme\qte.css i have add

Code: Select all

.qte_topicguide { 
	color: #FFF;
	background-color: #efaf39;
	-webkit-border-radius: 4px;
	-o-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 2.1px;
	overflow: hidden;
	font-weight: bold;
}
in pca have this
Image

but inside the topic does not appear to me the heading Guide

does anyone know where I'm wrong?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

jan_2017
Users
Users
Status: Offline
User theme: Dark
Posts: 203
Joined: Feb 5th, '17, 09:21
    Android Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by jan_2017 »

Have you also selected the forums in acp where you want the prefix to appear?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

boldherri
Users
Users
Status: Offline
User theme: Dark
Posts: 46
Joined: May 31st, '18, 13:28
    Windows 10 Firefox

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by boldherri »

jan_2017 wrote: Jun 9th, '18, 14:14 Have you also selected the forums in acp where you want the prefix to appear?
Hi,
it's only the first time I've given permission to groups and forums,
but only the first voice appears and not the ones I added

EDIT:
I have solved,
have add this in file attribute.php

Code: Select all

'QTE_TOPICTUTORIAL' => 'Tutorial',

and this in file qte.css,

Code: Select all

.qte_topictutorial { 
	color: #FFF;
	background-color: #f97f04;
	-webkit-border-radius: 4px;
	-o-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 2.1px;
	overflow: hidden;
	font-weight: bold;
}

Code: Select all

.imageset.qte_topictutorial {
    background-image: url("./images/icon_topic_tutorial.gif");
    padding-left: 16px;
    padding-top: 16px;
}

and assigned permissions now work very well

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Raheem
Users
Users
Status: Offline
User theme: Dark
Posts: 37
Joined: Feb 10th, '17, 21:34
    Windows 8.1 Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by Raheem »

Thanks dmzx, good one :thumbup:.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Wil
Users
Users
Status: Offline
User theme: Dark
Posts: 62
Joined: Aug 30th, '18, 05:30
    Windows 10 Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by Wil »

Difficult all with those prefixes.
I just use this, like it

Moeilijk allemaal met die voorvoegsels.
Ik gebruik gewoon deze, bevalt goed

https://github.com/stathis/phpbb31-topicprefixes
Regards,

Wil
Image
Sorry my English is not my basic language

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

kamaleon
Users
Users
Status: Offline
User theme: Dark
Posts: 50
Joined: Jul 26th, '15, 08:56
    Windows 8.1 Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by kamaleon »

I have tried this, but I don't get the green color, in fact no color at all...

What am I doing wrong?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

kamaleon
Users
Users
Status: Offline
User theme: Dark
Posts: 50
Joined: Jul 26th, '15, 08:56
    Windows 8.1 Chrome

Re: Prefix CSS for Quick Title Edition 2.0.0

Post by kamaleon »

It worked now, thanks for the help guys.