• Welcome to Simple Machines Community Forum. Please login or sign up.
January 27, 2022, 10:41:08 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


SMF Post Prefix

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

Previous topic - Next topic

landyvlad

Ok this is the error, and I have attached the file to this post hoping someone can diagnose please :)

QuoteCode: (Find) [Select]
$topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;

    // This is longer than it has to be, but makes it so we only set/change what we have to.

Code: (Replace) [Select]
$topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
    $topicOptions['id_prefix'] = isset($topicOptions['id_prefix']) ? $topicOptions['id_prefix'] : null;

    // This is longer than it has to be, but makes it so we only set/change what we have to.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

shadav

yeah you've added mods that changed that line

your file
    $topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;


    mentions_process_post($msgOptions, $topicOptions, $posterOptions);
    if (!empty($msgOptions['mentions']))
        mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
    // This is longer than it has to be, but makes it so we only set/change what we have to.

so you'll need to change the install to something like this

find
$topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;

    // This is longer than it has to be, but makes it so we only set/change what we have to.
replace
    $topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;


    mentions_process_post($msgOptions, $topicOptions, $posterOptions);
    if (!empty($msgOptions['mentions']))
        mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
    // This is longer than it has to be, but makes it so we only set/change what we have to.

find
$topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
    $topicOptions['id_prefix'] = isset($topicOptions['id_prefix']) ? $topicOptions['id_prefix'] : null;

    // This is longer than it has to be, but makes it so we only set/change what we have to.

replace
    $topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
$topicOptions['id_prefix'] = isset($topicOptions['id_prefix']) ? $topicOptions['id_prefix'] : null;


    mentions_process_post($msgOptions, $topicOptions, $posterOptions);
    if (!empty($msgOptions['mentions']))
        mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
    // This is longer than it has to be, but makes it so we only set/change what we have to.

keep in mind that this will make the mentions mod not be able to uninstall if you decide to uninstall it if it's searching for the same thing that this mod was searching for

landyvlad

So I can just install it, which will do most of the work with a few fails.
And then manually make the edits you've provided @shadav ? 
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

shadav

I mean, yeah...I just prefer to edit the mod install so if I ever decide to uninstall the mod

if you install the mod with errors, and this is the only error you're having
then in your subs-post.php

find
    $topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;


    mentions_process_post($msgOptions, $topicOptions, $posterOptions);
    if (!empty($msgOptions['mentions']))
        mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
    // This is longer than it has to be, but makes it so we only set/change what we have to.

replace with
    $topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
$topicOptions['id_prefix'] = isset($topicOptions['id_prefix']) ? $topicOptions['id_prefix'] : null;


    mentions_process_post($msgOptions, $topicOptions, $posterOptions);
    if (!empty($msgOptions['mentions']))
        mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
    // This is longer than it has to be, but makes it so we only set/change what we have to.

and you should be good to go

landyvlad

Well I did that last and it works forum prefixes are back thanks !!
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

Diego Andrés

Quote from: Bugo on August 31, 2021, 10:30:08 AMIs there a way to specify the icon as text or html (for example, for FontAwesome)?

I'll finally see about this one in the next days/weeks, probably something basic and build upon that.
And the other stuff I'll have a look too

SMF Tricks - Free & Premium Responsive Themes for SMF.


landyvlad

AAargghh I just installed the latest version ( 3.3 ) on SMF21.RC4  https://gsx1400owners.org/test21org

and got this error:

QuoteUnknown column 'pp.invert_color' in 'field list'
File: /home/gsxowner/public_html/test21org/Sources/PostPrefix/Helper.php
Line: 49

What the ???
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

Diego Andrés

When doing what specifically?
Do you have other related info in the error log?

SMF Tricks - Free & Premium Responsive Themes for SMF.

landyvlad

Well I think there's a bigger issue I'll get sorted then if this recurs I'll check error log etc. Ta.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

shadav

not sure what happened there but in landyvlad's database the 2 columns invert_color and groups wasn't added to the postprefixes table for some strange reason when installed

landyvlad

SUGGESTION.

Enhance the mod so that prefixes could be images / icons rather than text. That is - have both options available?

Example use case: Car forum. Rather than have prefixes "Ford" "VW" etc - use small images of the company logos.


Possible you reckon @Diego Andrés ?

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

Diego Andrés

You can currently use icons, do you mean both icons and text?
I'll add it to the list.

Decided to push this mod back for a bit till I find some more time to work on everything at once.

SMF Tricks - Free & Premium Responsive Themes for SMF.

landyvlad

I mean that have the options so I could have (say)  5 prefixes, say 3 text and 2 icons, and could then choose from those. Wouldn't need to have both on the same thread.

Quote from: Diego Andrés on November 04, 2021, 01:38:35 PMDecided to push this mod back for a bit till I find some more time to work on everything at once.

In what sense push it back?
Hopefully it'll be available in its current form for 2.1 final when its released?

This is one of my Top 3 favourite mods.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

Strannik64

January 09, 2022, 05:02:40 AM #294 Last Edit: January 09, 2022, 05:22:38 AM by Strannik64
How to establish the rights to use not only global, but also on user groups by number of messages?
The prefix is not displayed in unread topics and messages, there are no them in the search results

Diego Andrés

From the settings you have the permissions for groups including post count.

The other part of your post, that's not a feature at the moment.

SMF Tricks - Free & Premium Responsive Themes for SMF.

dodos26

It would be great to see the categories, to display multiple prefixes. Example:
"Type" --> [A1, A2, A3]
"Type 2" --> [B1, B2, B3, B4]

And also the option to enable the selection of several prefixes from a category and the ability to enable the limitation of the number of prefixes for each category.

Example
"Type" --> [A1, A2, A3, A4] Can pick only 2 example A1 A2

After clicking on the checkbox, a menu with prefixes to be selected expands

Due to poor English, I made a settings tree here
Enable multi prefix -- true -->
  Maximum number of selected prefix

Enable categories -- true -->
  Require a choice in each of the categories -- false -->
    if Enable multi prefix -- true -->
      Min categories select
      Max categories select
    else "selecting one will deselect all the others"
  else -- true -->
    Category ID -->
      if Enable multi prefix -- true -->
        Min prefix select
        Max prefix select
      else min max always 1
  Maximum number of selected prefix
end

dodos26

Enable multi prefix -- true -->
  Maximum number of selected prefix

Enable categories -- true -->
  Require a choice in each of the categories -- false -->
    if Enable multi prefix -- true -->
      Category ID -->
        Min categories select
        Max categories select
    else "selecting one will deselect all the others"
  else -- true -->
    if Enable multi prefix -- true -->
      Category ID -->
        Min prefix select
        Max prefix select
    else min max always 1
  Maximum number of selected prefix
end

If u start changes sory small corection. Just like the colleague above, it's nice that the search engine takes into account the prefixes and you can even choose to look only for selected prefixes. The idea of the mod is great and very functional, but it lacks features. I am finding that this mod with these two patches applied should be extra functionality in the defaulf forum.

landyvlad

Ok well it's not up to the mod author to add features - it was designed as it is for (reasons).

While your suggestions are nice, it's probably a bit much to ask someone to do significant changes in a free mod.

I have always found this mod to be brilliant, as is. For me, having multiple prefixes would get way too cluttered. 

I'm really looking forward to the mod being available for 2.1 in its current form, rather than the author spending time on changing the features.

As I said it's one of my top 3 mods and really enhances the functionality and look of a forum.  I use it to great effect at gsx1400owners.org


@Diego Andrés THUMBS UP
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

Diego Andrés

Thanks @landyvlad
I do plan on adding a few changes, specially the ones suggested by Bugo, but that's about it.
Turning the prefix mod in a tags mod of sorts is definitely not happening but I appreciate the feedback.

Here are some possible ideas including previously suggested:
- FA support
- Modules and integration with certain mods
- Being able to filter topics selecting multiple prefixes and not just one.
- Adding the prefixes in a few more areas without making file edits (not enough hooks but still doable I believe)

And still in the oven (maybe already burned and not happening):
- Setting prefixes when editing groups/boards so we don't need to update prefixes every time we add new groups of boards

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: