SMF Tricks

SMF Tricks Mods => Free Mods => Topic started by: Diego Andrés on May 09, 2015, 11:42:18 PM

Title: SMF Post Prefix
Post by: Diego Andrés on May 09, 2015, 11:42:18 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4038)

(https://smftricks.com/logos/logo.png) (https://smftricks.com/)

(https://img.shields.io/badge/License-MPL%202.0-248049) (https://img.shields.io/badge/Hooks%20Only-Yes-6041a3) (https://img.shields.io/badge/SMF-2.1-3f73a0)

SMF Post Prefix
Developed by Diego Andrés (https://smftricks.com/index.php?action=profile;u=1)



Introduction
SMF Post Prefix mod allows you to set prefixes for your topics and easily customize them with colors and icons.

Features

Localization
(https://www.simplemachines.org/site_images/lang/english.gif) English
(https://www.simplemachines.org/site_images/lang/spanish_es.gif) Spanish
(https://www.simplemachines.org/site_images/lang/russian.gif) Russian
(https://www.simplemachines.org/site_images/lang/turkish.gif) Turkish
(https://www.simplemachines.org/site_images/lang/french.gif) French


Crowdin (https://crowdin.com/project/smf-post-prefix-mod)
Changelog (https://github.com/SMFTricks/SMF-Post-Prefix/blob/master/CHANGELOG.md)
GitHub (https://github.com/SMFTricks/SMF-Post-Prefix)
Title: Re: SMF Post Prefix
Post by: Rockman on June 26, 2015, 06:17:51 PM
Hola buenas,miren uso el SMF Post Prefix y me gustaria cambiar el estilo de de los prefijos como otro foro.

Estilo que quiero poner:

(https://smftricks.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FmEAkj0I.png&hash=9a35e947ca9ae318d2209338f2bb116738d9abb0)

Estilo de mi foro:

(https://smftricks.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FcmrmSTc.png&hash=41a9ad0fc028512e31cd4c862eb8f63ea43050ab)

Tambien me gustaria que en el post detras de "Probando" me gustaria poner el prefijo tambien,¿como pongo eso tambien?

Gracias.
Title: Re: SMF Post Prefix
Post by: Diego Andrés on June 26, 2015, 06:56:46 PM
Muy fácil.
Sources/Subs-PostPrefix.php
Code (Buscar) Select
if ($row['bgcolor'] == 1 && !empty($row['color']))
$format .= 'padding: 4px; border-radius: 2px; color: #f5f5f5; background-color: '. $row['color'];


Code (Reemplazar) Select
if ($row['bgcolor'] == 1 && !empty($row['color']))
$format .= 'padding: 2px; font-size: 11px; font-weight:bold; border-bottom: 1px solid rgba(0, 0, 0, 0.3); border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 rgba(255, 255, 255, 0.1); color: #f5f5f5; background-color: '. $row['color'];





Display.template.php
Code (Buscar) Select
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>

Code (Reemplazar) Select
<a href="', $message['href'], '" rel="nofollow">', !empty($message['counter']) ? $message['subject'] : $context['prefix_subject'], '</a>
Title: Re: SMF Post Prefix
Post by: Rockman on June 26, 2015, 07:07:47 PM
Quote from: Diego Andrés on June 26, 2015, 06:56:46 PM
Muy fácil.
Sources/Subs-PostPrefix.php
Code (Buscar) Select
if ($row['bgcolor'] == 1 && !empty($row['color']))
$format .= 'padding: 4px; border-radius: 2px; color: #f5f5f5; background-color: '. $row['color'];


Code (Reemplazar) Select
if ($row['bgcolor'] == 1 && !empty($row['color']))
$format .= 'padding: 2px; font-size: 11px; font-weight:bold; border-bottom: 1px solid rgba(0, 0, 0, 0.3); border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 rgba(255, 255, 255, 0.1); color: #f5f5f5; background-color: '. $row['color'];





Display.template.php
Code (Buscar) Select
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>

Code (Reemplazar) Select
<a href="', $message['href'], '" rel="nofollow">', !empty($message['counter']) ? $message['subject'] : $context['prefix_subject'], '</a>

¡Muchas gracias!,ya lo tengo igual gracias a ti (si,se que eres el creador de la modificacion)
Title: Re: SMF Post Prefix
Post by: Diego Andrés on June 26, 2015, 07:12:45 PM
Gracias a ti por usar el mod  O:-)
Igual la idea cuando se creó era que se tuviera un mod gratis y que fuera simple y funcional, espero que el tiempo pronto me permita agregarle nuevas funciones y características.
Seguramente incluiré alguna cosilla para darle una personalización extra (de estilo) sin editar los archivos del mod.

En la sig. actualización agregaré la segunda modificación que pediste

Saludos!
Title: Re: SMF Post Prefix
Post by: Diego Andrés on July 15, 2015, 07:24:14 PM
Mod updated to version 2.0.1  8)
Title: Re: SMF Post Prefix
Post by: Diego Andrés on July 27, 2015, 10:25:26 PM
Mod updated! New version 2.0.2
Title: Re: SMF Post Prefix
Post by: korl3one on September 13, 2015, 10:08:04 PM
He instalado SMFPostPrefix_forSMF2.0.x_2.0.2 hasta aqui todo bien, el problema surge en el momento de activar el mod en los foros, solo se activa hasta cierta cantidad de foros contando  los foros y sudforos, he visto que al desactivar el mod en un foro de inmediato puedo activarlo en aquel foro que no pudo ser activado, en conclucion tiene un limite de numero de foros al cual se puede activar. Necesito por favor que me ayuden con esto para colocar de forma ilimitada. Le adjunto imagenes. Saludos
Title: Re: SMF Post Prefix
Post by: korl3one on September 24, 2015, 08:30:34 PM
Solucionado Diego Andres ha actualizado el mod. saludos
Title: Re: SMF Post Prefix
Post by: adonix on September 24, 2015, 09:23:58 PM
Test failed at ./Sources/Subs-Recent.php
Test failed at ./Sources/MessageIndex.php
Test failed at ./Themes/greeny/Display.template.php ( http://smftricks.com/index.php?topic=850 )

I am using 2.0.11 SMF Version.
Kindly hely to fix the errors.
Title: Re: SMF Post Prefix
Post by: Diego Andrés on September 24, 2015, 09:27:44 PM
Attach the first two files and I'll modiffy them before you install the mod (this way you won't get errors), the third error is not going to cause any trouble, you can just ignore it.
Title: Re: SMF Post Prefix
Post by: adonix on September 24, 2015, 09:36:59 PM
Quote from: Diego Andrés on September 24, 2015, 09:27:44 PM
Attach the first two files and I'll modiffy them before you install the mod (this way you won't get errors), the third error is not going to cause any trouble, you can just ignore it.

I am using greeny theme (http://smftricks.com/index.php?action=downloads;sa=view;down=92)
So kindly check display.template file also so that there will be no error in theme for this module.

Regards.
Title: Re: SMF Post Prefix
Post by: Diego Andrés on September 27, 2015, 11:01:33 AM
Try with the following

And I cannot fix the Display.template because it hasn't the code the mod search, just install it with the error, it will still work.
Title: Re: SMF Post Prefix
Post by: adonix on September 27, 2015, 09:13:16 PM
Quote from: Diego Andrés on September 27, 2015, 11:01:33 AM
Try with the following

And I cannot fix the Display.template because it hasn't the code the mod search, just install it with the error, it will still work.

Oh thanks Diego,..error gone while installing,..but i am just scared for greeny theme that single error :(
May i know what will it affect ??
Title: Re: SMF Post Prefix
Post by: Diego Andrés on September 29, 2015, 01:08:53 AM
Nothing, it's supposed to add the prefix to the topic title, but on greeny there isn't.
Title: Re: SMF Post Prefix
Post by: adonix on September 29, 2015, 08:02:55 AM
Quote from: Diego Andrés on September 29, 2015, 01:08:53 AM
Nothing, it's supposed to add the prefix to the topic title, but on greeny there isn't.

"it's supposed to add the prefix to the topic title" well if it's not present in greeny theme then what's the benefit to use this mod on greeny ? :\ as i want to use this mod only on greeny :(
Title: Re: SMF Post Prefix
Post by: Diego Andrés on September 29, 2015, 08:39:59 AM
It doesn't matter, the mod will work fine. It will show the prefixes in the topic list as its supposed to, and everything else will be ok.

That "error" it's just a esthetic/visual modification, it's not vital for the mod functionality.

You can ask Pipe to add the title inside the post.

Regards.
Title: Re: SMF Post Prefix
Post by: adonix on September 29, 2015, 08:53:48 AM
Quote from: Diego Andrés on September 29, 2015, 08:39:59 AM
It doesn't matter, the mod will work fine. It will show the prefixes in the topic list as its supposed to, and everything else will be ok.

That "error" it's just a esthetic/visual modification, it's not vital for the mod functionality.

You can ask Pipe to add the title inside the post.

Regards.

If that error is nothing then i can ignore it :)
thanks.
Title: Re: SMF Post Prefix
Post by: jhoancito on October 16, 2015, 12:43:13 PM
INSTALO bien todo bien al entra al modulo tirar error


(https://smftricks.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FGWUMGQI.png&hash=47197d5b9a6000f44e1e72e0bc7fc887dc47483f)

MiForo = http://eclipse-mu.tk/Foro/index.php

Información de version mi Foro
Versión del Foro: SMF 2.0.4
Versión actual de SMF: SMF 2.0.11
Title: Re: SMF Post Prefix
Post by: Diego Andrés on October 17, 2015, 11:42:22 AM
Los requerimientos mínimos del mod son PHP 5.0, esa podría ser la causa del error.
Title: Re: SMF Post Prefix
Post by: Diego Andrés on October 20, 2015, 08:05:37 PM
Hola, tomaste nota de mi comentario anterior y revisaste si este es el problema? Porque no dejo de verte publicando esto en todos los foros pero tampoco respondes si quiera para conocer más del problema.

Si no veo ninguna respuesta nueva lo marcaré como solucionado pronto.
Title: Re: SMF Post Prefix
Post by: jhoancito on October 20, 2015, 09:21:59 PM
ya esta solucionado gracias ahh aver si aportas mas mod  like
Title: Re: SMF Post Prefix
Post by: SychO on August 30, 2016, 10:04:33 AM
Greetings,

So about the free version of prefixes, there is a bug

If the user is a board moderator and has the group which has permission to use a prefix, well he can't, unless the group assigned to him that has permission to use the prefix is primary, so if that group is secondary, he can't, and that's a big problem.

How can I fix this please ?
Title: Re: SMF Post Prefix
Post by: Diego Andrés on August 31, 2016, 07:57:32 AM
I'll review the mod this weekend for an update, thanks for reporting it.
Title: Re: SMF Post Prefix
Post by: Anonskii on January 15, 2017, 09:33:18 AM
Is there any way i could make the prefix box smaller? It's quite big.
Title: Re: SMF Post Prefix
Post by: Dreadaxe on January 31, 2017, 11:06:19 AM
(https://smftricks.com/proxy.php?request=http%3A%2F%2Fimageshack.com%2Fa%2Fimg921%2F519%2FJnVJNM.png&hash=f0f0aede03feb42c44db23a4c71b2c29404f76af)
Title: Re: SMF Post Prefix
Post by: Daemon on December 18, 2017, 02:50:54 AM
Hey Diego,


I need your help with your Mod. It's working fine, but I want to show it in the Mod "RecentForumTopics" from Pipke.


So, in the attachment you can where I want to show the Prefix (if there is any), just before the topic subject of course.  :D


Here's the code from that:/ Template    
         
echo'
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/' . $icon_post3 . '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $settings['images_url'], '/post/', $post['icon'], '.gif" alt="" />
</td>
<td class="subject ', $alternate_class, '">';
if (!empty($modSettings['rft_firstpostlinkicon']))
// I think this is the right place, but what to insert? echo'<a href="' . $scripturl . '?topic=' . $post['topic'] , '.0"><img style="float:right; padding: 4px;" src="', $settings['images_url'], '/icons/first_post.gif" alt="', $txt['rft_first_post'], '" title="', $txt['rft_first_post'], '" /></a>';
// link to first or last topic message?
if (!empty($modSettings['rft_link_topics']) && ($modSettings['rft_link_topics'] == 'last'))
echo'', $post['is_sticky'] ? '<strong>' : '', '<span>', $post['linklast'],'</span>', $post['is_sticky'] ? '</strong>' : '';

if (!empty($modSettings['rft_link_topics']) && ($modSettings['rft_link_topics'] == 'first'))
echo'', $post['is_sticky'] ? '<strong>' : '', '<span>', $post['linkfirst'],'</span>', $post['is_sticky'] ? '</strong>' : '';
// Is this post new? (assuming they are logged in!)
if ($post['new'] && $context['user']['is_logged'])
echo '
<a href="', $post['new_href'], '" /></a>';
echo'
<p>', $txt['started_by'], ' ', $post['first_poster']['link'] ,' ', $txt['on'], ' ', $post['timelast'],' ', $txt['in'], ' ', $post['board']['link'], '</p>
</td>
<td class="stats ', $color_class, '">
', $post['replies'], ' ', $txt['replies'], '
<br />
', $post['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">';
if (!empty($modSettings['rft_lastpostlinkicon']))
echo'<a href="', $post['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>';
echo'', !empty($settings['st_enable_avatars_recent']) ? template_avataronboard($post['poster']['id']) : '' , $txt['by'], ' ', $post['poster']['link'], ' <br /> ', $txt['on'], ' ', $post['timefirst'], '</span>
</td>
</tr>';
[size=78%]


Can you please help me? I tried a lot but always ends with a template failure.
Thank you![/size]
Title: Re: SMF Post Prefix
Post by: Daemon on December 21, 2017, 03:23:04 AM
Hello?


Anyone here?
Title: Re: SMF Post Prefix
Post by: Diego Andrés on December 21, 2017, 12:09:46 PM
I'll try to take a look at this before the weekend
Title: Re: SMF Post Prefix
Post by: Daemon on December 28, 2017, 04:54:15 PM
Weekend and 1 week are over ...
Title: Re: SMF Post Prefix
Post by: Diego Andrés on December 29, 2017, 12:27:20 AM
Guess I need to start jotting down what I have to review lol
I've splitted the post and moved topic to a different board, I will be working on it by the morning.
Title: Re: SMF Post Prefix
Post by: Diego Andrés on December 29, 2017, 12:54:31 PM
Here you go, easy peasy  :D

PS: Replace the file on the Sources directory.
I only changed 3 lines, search for id_prefix if you are curious to know what :P
Title: Re: SMF Post Prefix
Post by: Daemon on December 29, 2017, 02:00:19 PM
Works perfect! Thank you very much!  :)
Title: Re: SMF Post Prefix
Post by: harme on January 12, 2018, 04:48:01 PM
Hello Diego
SMF Post Prefix Error Help Me
İm php version: PHP 7.1
İm theme : LikeIPB
Screeshoot Error:
(https://i.hizliresim.com/D7k1qZ.png) (https://hizliresim.com/D7k1qZ)
(https://i.hizliresim.com/oOz5aQ.png) (https://hizliresim.com/oOz5aQ)
Title: Re: SMF Post Prefix
Post by: Diego Andrés on January 12, 2018, 06:03:58 PM
Alright so it seems this bug has been there since the first release of the mod, good shootout.
I won't update the package till tomorrow but below are the new files attached, just replace them in your Sources directory
Title: Re: SMF Post Prefix
Post by: harme on January 12, 2018, 06:10:26 PM
Hello Diego
Thank you for solving the problem :)
Title: Re: SMF Post Prefix
Post by: harme on January 12, 2018, 06:15:47 PM
I noticed something else
İm  Recent post install
Post Prefix colorant does not work
İm recentpost remove :(
Title: Re: SMF Post Prefix
Post by: Diego Andrés on January 12, 2018, 07:40:56 PM
What do you mean?
Link the mod or whatever you are having trouble, remember to leave all the information
Title: Re: SMF Post Prefix
Post by: harme on January 12, 2018, 08:04:45 PM
Hello Diego
My English is not very good :(
I'm using google translate

İm install recentpost mod
there is a conflict
Post Prefix colpick.js error
Title: Re: SMF Post Prefix
Post by: Diego Andrés on January 12, 2018, 08:59:50 PM
It's alright, can you post the link to this mod?
Title: Re: SMF Post Prefix
Post by: harme on January 12, 2018, 09:33:15 PM
Hello Diego
I made a video for you
Title: Re: SMF Post Prefix
Post by: Diego Andrés on January 12, 2018, 09:51:10 PM
Sorry but SH Recent is outdated!
Mods are not compatible at the moment, we don't know yet if this mod will be available again soon
Title: Re: SMF Post Prefix
Post by: harme on January 12, 2018, 10:02:15 PM
Diego thank you very much
Title: Re: SMF Post Prefix
Post by: Diego Andrés on May 22, 2018, 08:32:24 PM
2.1 - 22 May 2018
(https://smftricks.com/Themes/SMFTricks/images/changelog/bug--minus.png) Finally adressed the issues in Search.php.
(https://smftricks.com/Themes/SMFTricks/images/changelog/bug--minus.png) Fixed a small bug preventing the mod from previweing boards/groups in the settings.
Title: Re: SMF Post Prefix
Post by: Hasslek on May 23, 2018, 05:18:01 AM
Quote from: Diego Andrés on May 22, 2018, 08:32:24 PM
2.1 - 22 May 2018
(https://smftricks.com/Themes/SMFTricks/images/changelog/bug--minus.png) Finally adressed the issues in Search.php.
(https://smftricks.com/Themes/SMFTricks/images/changelog/bug--minus.png) Fixed a small bug preventing the mod from previweing boards/groups in the settings.

Which file should I replace if I already have the mod installed?
Title: Re: SMF Post Prefix
Post by: Diego Andrés on May 23, 2018, 08:14:37 AM
Quote from: Hasslek on May 23, 2018, 05:18:01 AM
Which file should I replace if I already have the mod installed?

https://www.simplemachines.org/community/index.php?topic=536401.msg3973563#msg3973563  :P
Title: Re: SMF Post Prefix
Post by: Hasslek on May 26, 2018, 07:03:52 AM
Currently in the creation of a prefix, the color sorter does not work. That is, the browser itself blocks the jQuery file that shows the color selector. I've tried it with the most used browsers (Chrome, Firefox, Edge).

The creation field is functional by adding the hexadecimal color but does not show the color selection menu.

(https://image.prntscr.com/image/SpBbibeHRyO_6ncCTeqb4g.png)
Title: Re: SMF Post Prefix
Post by: Diego Andrés on May 27, 2018, 12:53:54 PM
Quote from: Hasslek on May 26, 2018, 07:03:52 AM
The creation field is functional by adding the hexadecimal color but does not show the color selection menu.

Make a new post in the Offside section and attach the index.template.php file
Title: Re: SMF Post Prefix
Post by: nateyeight on January 06, 2019, 10:09:27 PM
Hello,

I am running SMF 2.0.15 and the Darkec theme. I installed the SMF Post Prefix mod version 2.1.1 available from the SMF mod site, but it does not work. The link to edit and configure the mod does not appear in the admin menu and I get errors when I try to uninstall the mod.

Title: Re: SMF Post Prefix
Post by: Diego Andrés on January 07, 2019, 01:47:09 AM
Can you leave some more details?
For instance, how are you getting errors in uninstall if you didn't get any during the installation, doesn't make any sense.

Additionally, the mod is using hooks so if it's not displaying the admin section there might be a chance your hosting didn't execute this file for some reason so you'd have to do it manually.
Title: Re: SMF Post Prefix
Post by: nateyeight on January 07, 2019, 09:47:03 AM
Installation:
(https://i.imgur.com/yxMH93L.png)

For uninstallation, I would get "Test Failed" for all of those options above. I know, it doesn't make sense, and what else doesn't make sense is I tried reinstalling it this morning and it works perfectly.
Title: Re: SMF Post Prefix
Post by: specialworld83 on June 19, 2019, 03:33:11 PM
Is there any way to have the mod compatible with smf 2.1 rc2?
Title: Re: SMF Post Prefix
Post by: Diego Andrés on July 29, 2019, 03:09:12 PM
Quote from: specialworld83 on June 19, 2019, 03:33:11 PM
Is there any way to have the mod compatible with smf 2.1 rc2?

Not yet, hopefully soon
Title: Re: SMF Post Prefix
Post by: gohanjaja on May 06, 2020, 12:29:19 AM
Quote from: Diego Andrés on July 29, 2019, 03:09:12 PM
Not yet, hopefully soon

plz bro !
Title: Re: SMF Post Prefix
Post by: Diego Andrés on May 06, 2020, 08:58:16 AM
Quote from: gohanjaja on May 06, 2020, 12:29:19 AM
plz bro !

It's on GitHub already, but only compatible with github build or 2.1 RC3
Title: Re: SMF Post Prefix
Post by: DeadlyGames on June 07, 2020, 02:44:45 PM
Hola diego quisiera que los prefijos aparecieran en el boardindex  te dejo una imagen de donde deseo que aparezca
https://prnt.sc/svi678
Title: Re: SMF Post Prefix
Post by: KekoMundo1 on April 30, 2022, 11:28:11 PM
Como hago para descargalo? que no me deja que no tengo permiso  U_U
Title: Re: SMF Post Prefix
Post by: Diego Andrés on May 01, 2022, 12:41:40 AM
Acá: https://custom.simplemachines.org/index.php?mod=4038
Title: Re: SMF Post Prefix
Post by: ramgo on November 27, 2022, 01:16:29 AM
Oye Diego, este mod solo funciona con la versión 2.1 de smf? o también funciona con 2.0.x?

Se tendría que instalar manual y/o hacer alguna modificación?

PD: hay muchos links caídos debido a que removieron el mod de descargas, no se si habría alguna forma de reparar eso ya que hay muchos temas con links desactualizados & con un muy buen contenido a mi parecer.

PD2: Te quedó buensima la modificación, muy buen trabajo.

Saludos ramgo.
Title: Re: SMF Post Prefix
Post by: Diego Andrés on November 27, 2022, 01:50:39 AM
Solamente 2.1
Todos los mods están en el cust site de smf por lo cual no me parece relevante tener un sistema de descargas aquí.

Saludos