• Welcome to Simple Machines Community Forum. Please login or sign up.
January 28, 2022, 03:32:11 AM

News:

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


SMF Post Prefix

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

Previous topic - Next topic

landyvlad

Thanks Diego that's welcome news !
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."

pocttopus

Hello,

This is a nice mod, is there any chance to be available for 2.1rc2 version?

Diego Andrés

Yes on Github you can find 3.0 version of the mod.
However, it's only compatible with current SMF 2.1 GitHub build or future RC3.

SMF Tricks - Free & Premium Responsive Themes for SMF.

pocttopus

There will be RC3? Do you know when? Is it better to wait or should I use RC2?
I am still localhost with RC2 before going live so that's why I'm asking about RC3 release.

Thanks.

Diego Andrés

It will be released when it's ready.
And it's up to you, both are RC versions and you can also use the current github, but like I said mod won't work properly on RC2 if that's what you really need. That's why this version of the mod is not on the modsite, there's no SMF version for it yet.

SMF Tricks - Free & Premium Responsive Themes for SMF.

pocttopus

Ok @Diego Andrés, thanks a lot. ;)
Cheers and keep it up.  :)

landyvlad

I've come across an issue where some members are unable to add a prefix in our for sale forum, but others are able to.

All members are 'no primary membergroup' and permissions are set up appropriately.
Some members who used to be able to add prefixes are now unable to do so when creating a thread.

I've made no changes to installed mods or anything like that - the ONLY change made to the forum since this mod was lasty fully working is the upgrade path through to 2.0.17 (from 2.0.15 & 16)

Any ideas what I should be looking at to diagnose this please?


Edit: Oh just checked and I'm running version 2.0.3 of the mod and just noticed that the current version is 2.1.1 !
(stupid package manager is inaccurate when it comes to saying if mod islatest version apparently).

So that's probbaly the best place to start....

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."

landyvlad

June 02, 2020, 09:11:14 PM #227 Last Edit: June 02, 2020, 09:34:57 PM by landyvlad
Went to uninstall the mod, so I could instal the new version. The following tests failed.
Quote
Type Action Description
12. Execute Modification ./Sources/Subs-Post.php Test failed

   1. Replace ./Sources/Subs-Post.php Test successful
   2. Replace./Sources/Subs-Post.php Test successful
   3. Replace ./Sources/Subs-Post.php Test successful
   4. Replace ./Sources/Subs-Post.php Test successful
   5. Replace ./Sources/Subs-Post.php Test successful
   6. Replace ./Sources/Subs-Post.php Test successful
   7. Replace ./Sources/Subs-Post.php Test successful
   8. Replace ./Sources/Subs-Post.php Test failed


19.
Execute Modification ./Sources/Search.php Test failed

   1. Replace ./Sources/Search.php Test successful
   2. Replace ./Sources/Search.php Test successful
   3. Replace ./Sources/Search.php Test successful
   4. Replace ./Sources/Search.php Test failed
   5. Replace ./Sources/Search.php Test successful
   6. Replace ./Sources/Search.php Test successful
   7. Replace ./Sources/Search.php Test successful
   8. Replace ./Sources/Search.php Test successful


I'm at a loss as to what exactly I need to do to uninstall this mod properly (and retain data) so that I can install the latest version.

Help appreciated.  :)


----


If I parse the mod install - looking at item 12 - the edits to Sources/Subs-Post.php there are 8 items in there.
Am I correct to assume the order of uninstall would be the same as the install - that is an error at number 8 would be the last change made as shown when parsing the install?
Namely -
QuoteFind: [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.
Replace With: [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.

in which case do I need to go to the file and see if I can find the code

$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.

to see whether it may have been changed by some other mod?
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

Ehhh it's been a really long time since I checked that version of the mod but I'm certain that the file edits only changed for the search files in any update for the 2.0 version, so you're probably safe.
One of the fixes is here https://www.simplemachines.org/community/index.php?topic=536401.msg3931072#msg3931072
And for the rest were fixes in the Source files of the prefix mod, so you could backup both files and replace them with the current ones and see if you get it working fine.

The bug you describe has never been mentioned so it's probably new.
Also you should check each prefix and see if the post groups these users belong to are checked, this is a strange behavior I never fixed.

SMF Tricks - Free & Premium Responsive Themes for SMF.

landyvlad

Yeah I looked at the changelog and you're right none of the changes in versions have anything which should have impacted this. as far as I can tell.

backup which files? subs-post.php and search.php?  After or before I uninstall, with errors?

and when you say replace them with the current versions.... from where - smf core?
(Not sure if any of my other mods will have made changes but it's probable I reckon)







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

I'm referring to Subs-PostPrefix.php and PostPrefixAdmin.php

SMF Tricks - Free & Premium Responsive Themes for SMF.

landyvlad

Um Ok can I be stupid and ask for a 1,2,3 guide as to exactly what I should be doing on this? Please.
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

Do this: https://www.simplemachines.org/community/index.php?topic=536401.msg3931072#msg3931072
Then backup Sources/Subs-PostPrefix.php and Sources/PostPrefixAdmin.php

Then download the current package and extract the files mentioned above, and you'll replace those in your forum as I don't remember the specific changes for those files. This will get your mod updated with the latest version in terms of modifications/bugs fixed.

However, none of the past patches are related to your reported bug. I would need more information about that as it has never been reported before.

SMF Tricks - Free & Premium Responsive Themes for SMF.

landyvlad

thanks I appreciate that. I'll see what else I can discover, if anything :)
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."

Dreadaxe

Install the last version but I have

Dreadaxe


shawnb61

Could you take a look at this item from the support forum?
https://www.simplemachines.org/community/index.php?topic=574448.msg4065999#msg4065999

Of note:
QuoteINSERT IGNORE INTO smf_log_search_results
(id_search, id_topic, relevance, id_msg, num_matches)
SELECT
17,
t.id_topic,
1000 * (
15 / (t.num_replies + 1) +
0 * CASE WHEN t.id_first_msg < 539465 THEN 0 ELSE (t.id_first_msg - 539465) / 231200 END +
0 * CASE WHEN t.num_replies < 200 THEN t.num_replies / 200 ELSE 1 END +
55 +
0 * t.is_sticky
) / 100 AS relevance,
t.id_first_msg,
1
FROM smf_topics AS t
INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
INNER JOIN smf_log_search_subjects AS subj2 ON (subj2.id_topic = subj1.id_topic)
WHERE t.approved = 1
AND subj1.word LIKE '%top%'
AND subj2.word LIKE '%gun%'
AND t.id_board != 49
AND t.id_prefix =
LIMIT 6000

Fichier: /home/******/public_html/*****/Sources/Search.php
Ligne: 1120

Thanks,
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Diego Andrés

I'll no be around that much till next month but I'll make sure to take a look!

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dreadaxe

3.1 - 26 May 2020 > https://smftricks.com/index.php?topic=795.0

Last Modified: April 22, 2020, 02:27:27 PM > Latest Version: 2.1.1 > https://custom.simplemachines.org/mods/index.php?mod=4038

So simplemachines.org don't have the last version. version 2.1.1 (05 July 2018)

Is it right?

Diego Andrés

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.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: