News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Post Prefix

Started by Diego Andrés, May 11, 2015, 10:37:35 PM

Previous topic - Next topic

gevv

Quote from: Shades. on March 17, 2022, 11:33:35 AM@gevv sorry to change the subject real quick but what app do you use to make those animated gif's if you don't mind me asking?

Recording screen with Camtasia studio 8 and exporting in .gif format
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Diego Andrés

I will have a look in a bit

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

#362
Quote from: Diego Andrés on March 16, 2022, 11:03:28 PM4.0 - 16 March 2022
  • New Feature Added option to enable prefixes in the recent action.
  • New Feature When prefixes are enabled in the boardindex, you can decide to display the prefix for replies, or only first post.
  • New Feature Added the ability to display prefixes in the boardindex including last posts in the info center.
  • New Feature New option to disabled/enable the prefix in the linktree.
  • New Feature New option to choose between "select" and "radio select" for the prefix list when posting.
  • New Feature Added support for "Post Action".
  • Bug Fix Prefix managers can now access the admin area if that's their only admin permission.
  • Bug Fix Fixed HTML issue with duplicated id's in the prefixes, they are now using classes instead.
  • Improvement "No Prefix" option is no longer visible if the board requires a prefix.
  • New Feature Replaced colpick with coloris for picking a color.
  • Improvement Icon image/url now replaced with Icon Class.
  • Improvement Boards and Groups now each live in their own tables.
  • Improvement Improved performance.
  • Improvement Support for SMF 2.1

Notes:
- For updating, uninstall the old version and install the new one. DO NOT check the option to remove information. I tested the "upgrade" and it worked well, but you might want to also first test it locally (or somewhere else) so you don't lose your boards/groups. So make sure to backup your smf_postprefixes table, you will not lose the prefixes. This mod probably didn't work on pg before so I only tested MySQL, although it installs and works fine on PG now.

- The current release doesn't include any translation because they are outdated. Make sure to head over to Crowdin on this project page and help out!
PS: Russian, Turkish and Spanish are already up on crowdin, just need updating.

4.0.1 - 17 March 2022
  • Bug Fix Fixed bug when requiring prefix/posting topic.
  • New Feature Added a setting to disable/enable the 'No Prefix' option in the list.

SMF Tricks - Free & Premium Responsive Themes for SMF.

gevv

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Diego Andrés

Quote from: gevv on March 17, 2022, 10:43:37 AMThanks. I tried radio but when the prefix was too much, the view was bad on mobile

You cannot view this attachment.

I also fixed this mess on mobile, forgot to include it. It should look like a proper list on mobile now (when using radio).
Obviously with a lot of prefixes, it's still large  :P

SMF Tricks - Free & Premium Responsive Themes for SMF.

gevv

Yes i noticed it while editing CSS. Looks better  Thanks.

It might be neater if the style is disabled while using the radio

You cannot view this attachment.

You cannot view this attachment.

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Diego Andrés

Yes, not sure.
Let's hope for more feedback on this option and we will see  :P

PS: Added spanish, russian and turkish translations to the package in the modsite

SMF Tricks - Free & Premium Responsive Themes for SMF.

bsmither

Is it possible to display:none the radiobutton form element, use the prefix tag button as the label to the radiobutton (which, when tapped, should set the radiobutton - I think), float the tags, and when checked, have an inner border pulsate to indicate selection?

Diego Andrés

it's not very visual for new users but you can do it with this:
#select_prefixes label input { display: none;}

SMF Tricks - Free & Premium Responsive Themes for SMF.

alex_cipher

Hi Diego!

Everytime I try to install the mod I get this error.
You cannot view this attachment.

What is this and how can I fix it?

Diego Andrés

What error did you get in your log?

SMF Tricks - Free & Premium Responsive Themes for SMF.

alex_cipher

I had to remove the mod because I had over 1000 errors within 20 minutes.

I install it again and show you the errors. It was always the same error but in many files.

Diego Andrés

Alright.
Make sure to leave more information such as your smf version, php version, etc
Additionally make sure the mod indeed added the database changes during installation.

SMF Tricks - Free & Premium Responsive Themes for SMF.

alex_cipher

So, now I've installed it again and the errors appears after a few seconds.

SMF: 2.1.1
PHP: 7.4

There are the erros:
Sources/Display.php (Line 156)
Sources/MessageIndex.php (Line 348)
Sources/PostPrefix/Helper/Database.php (Line 70)
and:
Datenbankfehler: Unknown column 'pp.invert_color' in 'field list'


        SELECT
            t.num_replies, t.num_views, t.locked, ms.subject, t.is_sticky, t.id_poll,
            t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts, t.id_redirect_topic,
            COALESCE(mem.real_name, ms.poster_name) AS topic_started_name, ms.poster_time AS topic_started_time,
            t.id_last_msg + 1 AS new_from
           
            , mem.id_member, mem.avatar, mem.email_address, COALESCE(lo.log_time, 0) AS is_online, a.filename, t.id_prefix, pp.id AS prefix_id, pp.name AS prefix_name, pp.status AS prefix_status, pp.color AS prefix_color, pp.bgcolor AS prefix_bgcolor, pp.invert_color AS prefix_invert_color, pp.icon_class AS prefix_icon_class, t.id_best_msg, t.id_board
           
        FROM smf_topics AS t
            INNER JOIN smf_messages AS ms ON (ms.id_msg = t.id_first_msg)
            LEFT JOIN smf_members AS mem on (mem.id_member = t.id_member_started)
            LEFT JOIN smf_log_online AS lo ON (lo.id_member = mem.id_member)
    LEFT JOIN smf_attachments AS a ON (a.id_member = mem.id_member)
    LEFT JOIN smf_postprefixes AS pp ON (pp.id = t.id_prefix)
        WHERE t.id_topic = 271
        LIMIT 1


Is this correct or did the "install.php" nothing and that's the reason why the database fields are missing?
You cannot view this attachment.

Here's a screenshot from the backtrace:
You cannot view this attachment.  

Diego Andrés

You'd have to manually check in your database and see if the tables and columns were actually created.

SMF Tricks - Free & Premium Responsive Themes for SMF.

alex_cipher

Yeah, if I would know which one have to be created and where to find them in the db.

Diego Andrés

The tables:
postprefixes
postprefixes_boards
postprefixes_groups


And the column giving you issues would be in the first table

SMF Tricks - Free & Premium Responsive Themes for SMF.

alex_cipher

The tables are created.
You cannot view this attachment. 
You cannot view this attachment. 

There are some entries in smf_postprefix from an old installation with SMF2.0.x

Is it possible that that's the reason why it doesn't work?
Should I delete those entries and try to install it again?

Diego Andrés

Yes that might be your issue.
The mod never had an upgrade path from 2.0.x and I'm not sure that's from the same mod as this one.
You could:
- uninstall the mod
- drop/delete the postprefixes table
- re-install the mod

SMF Tricks - Free & Premium Responsive Themes for SMF.

alex_cipher

I used this mod since it was released for SMF 2.0.x

I delete it and give feedback.

EDIT:
Deleted and installed it again without any errors.

Just two more questions:
1. Isn't it possible to use an image as prefix like in the old version?
2. What is the "Icon Class"?

Advertisement: