• Welcome to Simple Machines Community Forum. Please login or sign up.
January 21, 2022, 12:59:00 PM

News:

Join the Facebook Fan Page.


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

April 23, 2020, 07:54:17 PM #65 Last Edit: May 21, 2020, 05:17:16 PM by Diego Andrés
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

Advertisement: