Alternate User Posting

Started by Diego Andrés, July 28, 2010, 10:51:21 PM

Previous topic - Next topic

shadav

thank you....
well it installed without any errors but if I go to make a post i get
syntax error, unexpected 'array' (T_ARRAY)

shadav

Quote from: Diego Andrés on October 02, 2019, 01:03:41 AM
1.
Code (Search) Select
'current_member' => $original_id,
Code (Replace) Select
'current_member' => !empty($posterOptions['real_id']) ? $posterOptions['real_id'] : $original_id,,

2.
Code (Search) Select
array($topicOptions['id'], $original_id, $msgOptions['id']),
Code (Replace) Select
$topicOptions['id'], !empty($posterOptions['real_id']) ? $posterOptions['real_id'] : $original_id, $msgOptions['id'])

Haven't tested it tho
I think i got it :)

array($topicOptions['id'], !empty($posterOptions['real_id']) ? $posterOptions['real_id'] : $original_id, $msgOptions['id']),

at least everything seems to be working, I could be wrong

Diego Andrés

Sorry wasn't around, I supposed you'd do these edits after installing? Maybe I misread :P

SMF Tricks - Free & Premium Responsive Themes for SMF.

shadav

no you read fine :)
using your codes I was able to install it but then had an error when trying to use

you posted
$topicOptions['id'], !empty($posterOptions['real_id']) ? $posterOptions['real_id'] : $original_id, $msgOptions['id'])

but, I could be wrong, it needed to be
array($topicOptions['id'], !empty($posterOptions['real_id']) ? $posterOptions['real_id'] : $original_id, $msgOptions['id']),
this got rid of the error so I think it was correct hehehe (until it stops working at least)

GL700Wing

Earlier today I discovered that even though the 'Change User' option is displayed when a calendar event is being edited the owner of the event is not updated when an alternate user name is saved (only the owner of the topic is changed) and as a result a user can own a topic linked to an event they cannot edit/delete ...

The fix for this (ie, making the event owner the same as the topic owner when an alternate user name is saved) is very simple:

In ./Sources/Post.php
Find:
QuoteUPDATE {db_prefix}calendar
            SET end_date = {date:end_date},
Replace with:
QuoteUPDATE {db_prefix}calendar
            SET id_member = {int:id_member},
               end_date = {date:end_date},

Find:
Quotearray(
               'end_date' => strftime('%Y-%m-%d', $start_time + $span * 86400),
Replace with:
Quotearray(
               'id_member' => isset($alt_id) ? $alt_id : $user_info['id'],
               'end_date' => strftime('%Y-%m-%d', $start_time + $span * 86400),
Life doesn't have to be perfect to be wonderful ...

Diego Andrés

#65
2.1 - 21 May 2020
Fixed missing text from admin help in permission.
Moved script code to main file, template removed.

2.0 - 23 April 2020
Spanish translation.
Mod is now using hooks.
Compatible with SMF 2.1.x.




Actually I have no clue if it works on RC2 but I hope it does ;D

SMF Tricks - Free & Premium Responsive Themes for SMF.

ABCDiamond

Hello.  I just want to say that this appears to be running well on an SMF 2.1 RC3, forum that I have started.

Dr Web

I downloaded the zip file, uploaded it to the Packages folder in the server, and extracted it there, like I do with all the Mods I installed.

But I don't have an Install link on my Admin Panel, like you can see in the image attached.

I am running SMF 2.0.18.

Did I do something wrong?
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

shadav

extracted it there? you don't extract a mod, you upload the zip file to the packages folder and then install the mod

Diego Andrés

2.1 version is for SMF 2.1 only
Use v1.0.1 for SMF 2.0.x

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dr Web

Quote from: shadav on November 02, 2021, 02:46:12 PMextracted it there? you don't extract a mod, you upload the zip file to the packages folder and then install the mod

Could you please explain why not?

I already read here somewhere that it's one of the ways to do it, and I did it with all the other Mods I installed, and, I had problems only with the one you know. 
Never approach a bull from the front, a horse from the rear, or an idiot from any direction ;D

Michael Vail

#71
I have a core group of people on one of the SMF sites I manage who create drafts of posts for others in a hidden topic area. These people then collaborate on the hidden topics and when they're finished, the topic is moved and posted under the name of the person it was created for. The problem has been that whomever starts the post has their name attached to it and this may not be the desired result. Having this mod makes this collaborative effort even better because all of the collaborators have the permission to use this mod and can post the topics under the appropriate person's name when it's ready rather then having to delete the original and have the correct author repost it entirely.

Thank you so much for this mod! We truly enjoy having this feature and being able to assign it as needed to people we trust.


gdavison

Quote from: Diego Andrés on November 02, 2021, 03:13:02 PM2.1 version is for SMF 2.1 only
Use v1.0.1 for SMF 2.0.x

Did V1.0.1 get deleted ?

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

@rjen

SMF 2.1
PHP version 8.0
Mod version: 2.1.1

I am seeing some errors in the logs due to this mod: it seems that when a user selects the "IP" field in a member profile these messages are logged:


https://www.fjr-club.nl/index.php?action=helpadmin;help=see_member_ip;ajax

Type of error: General
Error messageSelect
The callable AlternateUserPosting::helpadmin could not be called.


https://www.fjr-club.nl/index.php?action=helpadmin;help=see_member_ip;ajax

Type of error: General
Error messageSelect
Hook call: function "AlternateUserPosting::helpadmin" in file /home/xxxxxxxx/domains/fjr-club.nl/public_html/Sources/AlternateUserPosting.php could not be called.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

#75
Solution:

in AlternateUserPosting.php

find
/**
* AlternateUserPosting::helpadmin()
*
* Loads the language file for the help popups in the permissions page
*
*/
public function helpadmin()
{
loadLanguage(__CLASS__ . '/');
}

and replace this with
/**
* AlternateUserPosting::helpadmin()
*
* Loads the language file for the help popups in the permissions page
*
*/
public static function helpadmin()
{
loadLanguage(__CLASS__ . '/');
}

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

If you are updating the package anyway you may also want to include a dutch language file... find attached...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Diego Andrés

Thanks for reporting.
Will fix it in the afternoon, or before if I get a chance.

Quote from: @rjen on September 26, 2022, 08:47:18 AMIf you are updating the package anyway you may also want to include a dutch language file... find attached...

Thanks

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

2.1.2 - 26 September 2022
  • Translation Dutch translation provided by @rjen.
  • Bug Fix Fixed an issue loading a method.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Steve

DO NOT pm me for support!

Advertisement: