News:

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

Main Menu

SMF Post Prefix

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

Previous topic - Next topic

Dreadaxe

Quote from: Diego Andrés on September 22, 2020, 09:48:59 AM
Correct, version 3.0+ is only for SMF RC3 and above, but it's not released yet  :laugh:
If you wanna play around with both, it's on GitHub.

Too risk for my poor skills ^^
Wich version can I install on SMF SMF 2.0.17?

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

StarredSkies

Hey Diego! As always, I'm in love with your modification as it makes sorting topics/threads so much easier. It's a blessing, really. Nevertheless, I am having an issue.

So when clicking on a prefix in the 'filter by prefix' bar, I get limited results. For example, the first and second pages of this prefix will have information, BUT when I click on the third page seen here, no results will show. You can also see that the second page (here) and the fourth page (here) have a significant gap between posts, noting that these posts (despite having a prefix) are lost. How can I fix this issue?

Alternatively, if I were to uninstall and reinstall this to figure out the issue, would my prefixes be removed completely or would they restore themselves?

Dreadaxe

Is it possible to have many prefix? Example "[Prefix A][Prefix B] Topic name"

Diego Andrés

Quote from: Dreadaxe on October 05, 2020, 05:19:03 AM
Is it possible to have many prefix? Example "[Prefix A][Prefix B] Topic name"

No it's not possible.




Quote from: StarredSkies on September 30, 2020, 07:16:59 PM
Hey Diego! As always, I'm in love with your modification as it makes sorting topics/threads so much easier. It's a blessing, really. Nevertheless, I am having an issue.

So when clicking on a prefix in the 'filter by prefix' bar, I get limited results. For example, the first and second pages of this prefix will have information, BUT when I click on the third page seen here, no results will show. You can also see that the second page (here) and the fourth page (here) have a significant gap between posts, noting that these posts (despite having a prefix) are lost. How can I fix this issue?

Alternatively, if I were to uninstall and reinstall this to figure out the issue, would my prefixes be removed completely or would they restore themselves?

I fixed this issue in the future version for SMF 2.1, but I'll look into this and see what's causing this behavior and try to fix it for another release.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dreadaxe

Quote from: Diego Andrés on October 05, 2020, 05:32:41 PM
Quote from: Dreadaxe on October 05, 2020, 05:19:03 AM
Is it possible to have many prefix? Example "[Prefix A][Prefix B] Topic name"

No it's not possible.
No to the ToDoList?

Diego Andrés

Quote from: Dreadaxe on October 06, 2020, 06:32:05 AM
Quote from: Diego Andrés on October 05, 2020, 05:32:41 PM
Quote from: Dreadaxe on October 05, 2020, 05:19:03 AM
Is it possible to have many prefix? Example "[Prefix A][Prefix B] Topic name"

No it's not possible.
No to the ToDoList?

Not really because it's a prefix mod, not a label or tags mod  ;D

SMF Tricks - Free & Premium Responsive Themes for SMF.

StarredSkies

I would really appreciate it, thank you! Do you know what's causing the issue exactly? I could possibly look into a fix myself too. <3

Diego Andrés

3.1.2 - 27 October 2020
Fixed typos in English language file.
Added Spanish translation.

3.1.1 - 27 October 2020
Fixed undefined error.

3.1 - 26 May 2020
Issue when having multiple groups assigned to the use prefix permission.
Small code improvements.

3.0 - 21 April 2020
Filter prefixes box on boards revamped.
Huge performance fixes and improvements.
Code improvements and tweaks.
Only hooks, no file edits.
Compatible with SMF 2.1.x.




Quote from: StarredSkies on October 07, 2020, 02:27:38 AM
I would really appreciate it, thank you! Do you know what's causing the issue exactly? I could possibly look into a fix myself too. <3

No update on this yet, hopefully soon

SMF Tricks - Free & Premium Responsive Themes for SMF.

chinaren

Hello DA!


Thank you for updating this mod, been waiting a while to use it, so was very happy to see this.   ;D


However, when I installed it (and it installed all okay), I kept getting HPT 500 errors on my board, mostly when I went to sub-boards.


When I looked at the error log, it said:





8192: Non-static method PostPrefix\Manage::prefixes() should not be called statically
http://xxx.com/index.php?action=admin;area=postprefix;sa=prefixes;added
/home/xxx/public_html/Sources/Subs.php (Line 5092)



Is there any quick fix for this, oh mighty one?  I thank you in advance, and in arrears.
The Opus Path - The Next Generation of the Written Word

Diego Andrés

Quote from: chinaren on October 27, 2020, 03:42:11 PM
However, when I installed it (and it installed all okay), I kept getting HPT 500 errors on my board, mostly when I went to sub-boards.

When I looked at the error log, it said:



8192: Non-static method PostPrefix\Manage::prefixes() should not be called statically
http://xxx.com/index.php?action=admin;area=postprefix;sa=prefixes;added
/home/xxx/public_html/Sources/Subs.php (Line 5092)



What version of PHP?
And you're running RC3 right?

SMF Tricks - Free & Premium Responsive Themes for SMF.

chinaren

Sorry, my bad, was going to post that info.  I'm running SMF 2.1 RC3.


Oh wait!  The PHP running on the server?  Ahhhhh.  That may be out of date.  I've had messages on my Wordpress software about that, and waiting for my hosting company to upgrade, so it may be that, although I'm not sure what versions we're talking about.
The Opus Path - The Next Generation of the Written Word

Diego Andrés

#252
Try replacing this file in /sources/postprefix


SMF Tricks - Free & Premium Responsive Themes for SMF.

chinaren

 :-[   No, afraid that made no difference.
The Opus Path - The Next Generation of the Written Word

Diego Andrés

I'm afraid I'm unable to replicate the issue atm and I don't have many PHP versions on my local to test this, I'll try to look into it

SMF Tricks - Free & Premium Responsive Themes for SMF.

chinaren

Quote from: Diego Andrés on October 27, 2020, 04:18:35 PM
I'm afraid I'm unable to replicate the issue atm and I don't have many PHP versions on my local to test this, I'll try to look into it


Thanks for your help DA.  Much appreciated.  I'll stand by.   ::) :D
The Opus Path - The Next Generation of the Written Word

Arantor

This isn't a PHP version problem as such; this is a 'newer versions of PHP actually care that you use static correctly' problem.

PostPrefix\Settings defines Manage::prefixes as the function to call. The problem is that you're calling it as a static method this way (i.e. calling it as a function that exists in the class without having first instantiated it), but that prefixes() isn't a static method, the presumption is that it expects an instance of the class to call it against.

Since 2.1's Admin function routes it to call_helper you should be able to append a # to tell it to instantiate the Manage class first and then call the now non-static version - or you leave the caller as is and change the declaration of Manage::prefixes to be a public static function (i.e. callable without needing an instance of the class)

Diego Andrés

Thanks for the information, I'll try to fix soonish

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

@chinaren Could you try the new package and let me know if it fixes your issue :D

SMF Tricks - Free & Premium Responsive Themes for SMF.

chinaren

Quote from: Diego Andrés on October 27, 2020, 08:30:44 PM
@chinaren Could you try the new package and let me know if it fixes your issue :D


Hello DA.


Thanks for you quick response!  However, I tried the new one 3.2, and the same thing still happens I'm afraid.  Just in case I also cleared the cache and so on first.


It installs with no errors, and I can go to the settings okay, and add Prefixes fine etc, and I can see the main index page of my board.  I can also jump to the topics directly no problem.  However, when I try going from the main page (or anywhere) to one of the boards, then I get the http 500 error.  Also happens if I try replying to a subject.


One change this time though: I no longer get the error message in my admin error log!  So... Improvement?  :D
The Opus Path - The Next Generation of the Written Word

Advertisement: