News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

PM Settings

Started by Arantor, January 27, 2014, 12:11:56 PM

Previous topic - Next topic

Arantor

Link to Mod

For various reasons the PM functionality in 2.0 doesn't give control to admins properly, this mod adds in some power to that.

1. Allows admins to set the style of personal messages on the forum, for everyone.
SMF 2.0 does not, by default, use the conversation mode, instead preferring the
'all at once' style that came from 1.1.x. There is also no way in the admin panel
to change this. This mod will allow you to change the default mode and also
optionally reset everyone to a given choice.

2. Save to sent items will no longer be an option; all messages will just be saved
to sent items automatically without any prompting. The option will also be hidden
from profile and other places because it is no longer relevant.


This mod is released under the CC0 licence
Holder of controversial views, all of which my own.


PhuriousGeorge

Awesome, thank you for this! Will be adding this as an essential mod (once I get off work ;)).

Chalky


Arantor

:)

This had actually been sat on my hard drive for some time, since I was thinking about doing a paid mod site, and this was supposed to be one of the free mods used as promotion but then I figured I might as well just release and be done with it :)
Holder of controversial views, all of which my own.


von COLLINZO


Ahadawan

#5
Seemed to work fine, however when I tried to change the settings to conversation and also change it for the current users as well I got this error:

Table 'my_smf2.smf_members' doesn't exist
File: .../Sources/PMSettings.php
Row: 41


Where my_smf2 is the database prefix I use. Uh oh, did I mess something up for the current users? Database-errors always make me a bit worried, should I revert to a backup or did it just not change anything at all?

Went ahead and opened the file in question, and I assume it is because of "UPDATE smf_members" instead of "UPDATE {db_prefix}members" which I might need because of the changed db_prefix?

I also find this error every time I try to change and save PM settings on my user profile. Not sure if it's related but I haven't seen it before.
?action=pm;sa=settings;save
8: Undefined index: pm_receive_from
File: .../Sources/Profile-Modify.php(561) : runtime-created function
Row: 8
<- This was later found unrelated to the mod.

I must admit I did not take a backup before I installed the mod since I was a bit silly and figured a mod by Arantor must be bulletproof, ;) I should of course have made a backup anyway since my forum ofcourse is not bulletproof. Darn.  :-[ those pesky errors.

Edit: Oh, and I use SMF 2.0.7

radu81

sorry for my bad english

Arantor

Yeah, the smf_members is a mistake I made (see, I AM human), I've fixed that in my local copy of the package and I'll update it once I've fixed the other issue.

As for the pm_receive_from... that's interesting. I wonder if the buddy/ignore list is enabled or not, that might possibly have something to do with it. I'll look into it.
Holder of controversial views, all of which my own.


Ahadawan

Great :) Mistakes are easily made, and a great reminder for me to always backup too.

I checked if buddy/ignore list was enabled, and no it's disabled.

Arantor

That'd be why then. That setting is only loaded if it's enabled. Awesome, I can fix that and release a patch shortly.
Holder of controversial views, all of which my own.


Arantor

Though... now I look at this properly... I don't touch pm_receive_from at all. The only setting I change is copy_to_outbox - there is no mention of pm_receive_from in any code in the mod. So I'm confused as to why this is happening.
Holder of controversial views, all of which my own.


Ahadawan

It might be pure coincidence then? Perhaps something else I have active on my site that interacts with pm_recieve_from and gave errors which I only just noticed when I played around with changing the settings on that page since installing your mod. Even though I'm sure i have done so before without errors. Perhaps something in 2.0.7 that clashes with another mod. I must apologies if my mistake made you spend time looking for a cause that wasn't even related to your mod.

Arantor

It's possible, but before I rule it out I want to go do some more spelunking ;D
Holder of controversial views, all of which my own.


Ahadawan

Great news, I found that something was missing from my profile.template file and that caused the error. I rearranged the order in pm-settings a while back and accidentally removed some lines from a copy which I then later used as a backup. To make a long story short, I found what caused my error and am now certain it did not derive from your modification :)
Phew! I was almost certain it did not come from your mod when you said it didn't even mention the words. So after I posted above and read your response I spent some of my time trying some old version of my backups so as not to leave you to dig through codes on your own.

Gosh, don't I feel silly, :laugh: But at least one of my errors was related to a small mistake in the mod, so at least my first message was not totally irrelevant. :laugh:

Arantor

Thanks for investigating :) I was definitely getting nowhere trying to find this error either in an unmodified or modded installation...

As that's the case, I can just update the version on the mod site with the {db_prefix} fix and get onto the next thing :)
Holder of controversial views, all of which my own.


Nicholaus

Quote from: Sir Cumber-Patcher on January 31, 2014, 12:17:08 PM
Thanks for investigating :) I was definitely getting nowhere trying to find this error either in an unmodified or modded installation...

As that's the case, I can just update the version on the mod site with the {db_prefix} fix and get onto the next thing :)

Good luck on it.

Ahadawan

Yeah, I can imagine that must have been a headache, trying to find an error that didn't exist. ;) Glad I got it sorted out for myself too.

Wonderful! :) I'll grab a new copy from the mod site then.


Arantor

Holder of controversial views, all of which my own.


Nicholaus


Advertisement: