Skip to main content
Topic: [ADDON][beta] Topic Prefix (Read 110139 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[ADDON][beta] Topic Prefix

Topic Prefixes v0.0.3
Introduction
This addons introduces (guess what?) the topic prefixes feature.
Each topic can be "tagged" with a prefix that will be displayed next to the subject of the topic in several places around the forum.
The admin can create new prefixes and can apply custom styles to them (there is a simple web-interface for that, but it works only for the default theme of the board, and only if the "custom.css" file is present in the root of the theme).

The current version (v0.0.3) is still a beta, some things are not yet implemented (permissions) and others may be broken.

Currently working features are:
adding/modifying prefixes to a topic
showing prefixes in some places (MessageIndex and Display)
list of topics with a certain prefix
list of prefixes present in a certain board (above the list of messages)
filter topics in a board by prefix (based on the list of prefixes in the board)
admin interface to actually create and edit prefixes

Missing for first release:
list of all prefixes (I'm working on that)
permissions
show prefixes "everywhere"

Future plans:
multiple prefixes per topic
merge with tags addon with a switch to decide if a tag is a prefix or a tag or something like that?
any suggestion that would come up in the topic

If you are comfortable with development you are welcome to give your contribution! (In that case feel free to adapt the headers of the files accordingly.)

The repo is here at the moment:
https://github.com/emanuele45/TopicPrefix


License
o This ElkArte Addon is subject to the terms of the BSD "3-clause" license. You can obtain a copy of the License at http://opensource.org/licenses/BSD-3-Clause

Repository / Download
Last Edit: March 11, 2018, 12:47:41 pm by emanuele
Bugs creator.
Features destroyer.
Template killer.

 

Re: [ADDON][W.I.P.] Topic Prefix

Reply #1

Great work, would there be a way to style the prefixes from the acp.

Re: [ADDON][W.I.P.] Topic Prefix

Reply #2

This deserves a like  8)

Re: [ADDON][W.I.P.] Topic Prefix

Reply #3

Quote from: Allan – Great work, would there be a way to style the prefixes from the acp.
I'm not yet sure.
TBH, I still have to find a proper way to solve the "theming issue" on any addon. The main problem I have in mind, is that I'd have to:
  • pick all the theme,
  • pick any variant of any theme,
  • let the user edit styles separately for each variant and each theme,
It looks like a lot of stuff to deal with for the users that want to style their own theme.

TL;DR: tes, I would do it, though "in a while".
At the moment the addon relies on an external css (rather simple for the start), and I think custom.css can be modified using the theme editor (even if the file doesn't exist? hmm... that may be a sort of bug, to be tracked.)
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON][W.I.P.] Topic Prefix

Reply #4

Quote from: emanuele – TL;DR: tes, I would do it, though "in a while".
At the moment the addon relies on an external css (rather simple for the start), and I think custom.css can be modified using the theme editor (even if the file doesn't exist? hmm... that may be a sort of bug, to be tracked.)

Even being able to custom in css is great. This way user could add colors, borders, images to fit there needs.

Re: [ADDON][W.I.P.] Topic Prefix

Reply #5

First beta released. :D

The code is still messy and some features are missing, though if anyone has some time for testing it out and see what I missed as usual would be great! ;D
Last Edit: November 10, 2014, 06:02:40 pm by emanuele
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON][beta] Topic Prefix

Reply #6

I get an error when I try to install it

10.   Estrai File   ./themes/default/scripts/TopicPrefix.js   Errore durante il parsing della modifica

after click to continue

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL auto_increment,
prefix varchar(30) NOT NULL default '',
id_boards' at line 3
File: ******sources/database/DbTable-mysql.php
Riga: 174

Nota: la versione del tuo database รจ 1.0.1.
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #7

And I even wrote the package-info yesterday night...
I also likely forgot to add the tables to the install.

Big fail. :-[
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON][beta] Topic Prefix

Reply #8

Updated the package with the fixes and a couple of new features. ;D
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON][beta] Topic Prefix

Reply #9

I just test it, but when I click filter I get double prefix. I attach an image

maybe is my installation which was first broken, I'll try on a fresh install

Re: [ADDON][beta] Topic Prefix

Reply #10

At least is works! :P LOL

Interesting, I have to figure out how it is possible...
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON][beta] Topic Prefix

Reply #11

Some screeshots of the admin panel.
You can also see the "style picker" in a javascript/ajax-like version with a "live preview" of the result.
The main listing (screen_352) actually is not yet really in the final version, the "edit" buttons should disappear or become "advanced", I'm not yet sure.

Re: [ADDON][beta] Topic Prefix

Reply #12

Cool !

Re: [ADDON][beta] Topic Prefix

Reply #13

I'll sure test this addon, thanks Emanuele!
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #14

Yo, why don't yall add this mod to this support sit? It'll make it easier for yall to know whether a support topic is solved or not. ;P