Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Burke ♞ Knight on December 18, 2008, 12:22:17 AM

Title: Post and Change as Alternate User by BurkeKnight Enterprises
Post by: Burke ♞ Knight on December 18, 2008, 12:22:17 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1554)

Post and Change as Alternate User by BurkeKnight Enterprises

Version: 1.5 Date: December 10, 2008
Compatibility: SMF 1.1.x

Made by: BurkeKnight (http://www.simplemachines.org/community/index.php?action=profile;u=150637) - BurkeKnight Enterprises (http://www.burkeknight.com/)

This mod combines these mods:
Change Poster Of Message And Topic
Post As An Alternative User

Important!!!: You should uninstall the following mods if installed, before installing this mod:
Admin Can Post As An Alternative User
Change Poster Of Message And Topic



This modifications gives admins a possibility to change the poster of the message.
When a message is being modified by the admin, a checkbox for enabling the feature
and a textbox for entering the change poster id appears under the Additional Options.

This mod changes all needed information of poster. Also if the post is the start of a topic,
it also changes the topic as post.


This modification also adds the feature of posting as an alternative user.
While posting, a checkbox for activating the feature and a textbox for the user
id to post as is appeared under the Additional Options for the user who has the needed permission.
If the user id is left blank or set to zero the post is sent as a guest named "Forum Staff".

You can give the permission from: Admin CP >> Permissions


Credits:
Change Poster Of Message And Topic taken over by BurkeKnight Enterprises (http://www.burkeknight.com/) from [SiNaN].
Post As An Alternative User Mod is originally coded by karlbenson and taken over by [SiNaN], then taken over by BK Modding.

Support:
If need support for this mod, please go to BurkeKnight Enterprises (http://www.burkeknight.com/) and register there.

We have a support ticket system for mod support.

We will no longer be supporting this mod here at the SMF site,
as we feel it is easier to keep all support at our site.

Changelog:
December 10, 2008:
Change Poster Of Message And Topic & Post As An Alternative User mods taken over by BurkeKnight Enterprises (http://www.burkeknight.com/).
Both Mods combined for use with SMF 1.1.x Line.

(http://i.creativecommons.org/l/by-sa/3.0/88x31.png) (http://creativecommons.org/licenses/by-sa/3.0/deed.en_US)
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License (http://creativecommons.org/licenses/by-sa/3.0/deed.en_US).
Title: Re: Post and Change as Alternate User
Post by: the.basement on December 18, 2008, 09:19:45 AM
change topic starter have no option to " 0 " like the edit function Post/Edit As Alternative User.

Is there no input for this or was is not build in?
The two combined is not strange to do, the function is almost similar.

SiNaN thank you for this mod, and BK thank you for maintain the mod
and combine the two in one package.
8)
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on December 18, 2008, 02:35:52 PM
You can post as "0" to begin with, which will show as "Forum Staff"
However, you can not change a post to "0"
You can change to any other member.
Title: Re: Post and Change as Alternate User
Post by: Garou on December 18, 2008, 08:47:31 PM
Ah man and I was just about done with a 2.0 conversion for these.  :(:)

Gratz and good luck BurkeKnight
Title: Re: Post and Change as Alternate User
Post by: Sudhakar Arjunan on December 19, 2008, 08:21:40 AM
Any update for 2.0 beta 4 . thanks in advance.
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on December 19, 2008, 08:30:39 AM
Question:
Will this mod be made for SMF 2.0?

Answer:
We are developing a SMF 2.0 Beta 4 version.

Question:
When will it be released?

Answer:
When it is done, and tested extensively. No sooner, no later.  :P
Title: Re: Post and Change as Alternate User
Post by: [SiNaN] on December 19, 2008, 11:03:48 AM
Quote from: Garou on December 18, 2008, 08:47:31 PM
Ah man and I was just about done with a 2.0 conversion for these.  :(:)

Gratz and good luck BurkeKnight

You may want to help BurkeKnight here (http://www.simplemachines.org/community/index.php?topic=280379.msg1839700#msg1839700) then.
Title: Re: Post and Change as Alternate User
Post by: laspace on December 19, 2008, 03:38:50 PM
How can I install it on a custom theme?
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on December 19, 2008, 03:52:10 PM
Go to the Mod page, and where you download it, it has a way to see installation for the version of SMF you are running.

Also:
Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402)
Title: Re: Post and Change as Alternate User
Post by: Sudhakar Arjunan on December 20, 2008, 04:00:57 PM
Thank you BurkeKnight,

I was waiting for such a long time for 2.0. 4 compatibility.

As you have mentioned we will wait for it.
Title: Re: Post and Change as Alternate User
Post by: M@nNiak on December 30, 2008, 07:45:17 AM
Really Great and very usefull Mod

thanks  ;)
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on January 10, 2009, 03:36:29 AM
Hello,

Glad to see the function merger done officially, as I manually tweaked to get both installed.

Which leads to my current problem... I am trying to back the old versions out, which will require me to manually edit ./Themes/default/Post.template.php to clean out the code.  Except, [SiNaN]s original MODs are no longer available, and I can't use the "Manual Install Instructions" to reference.

Any chance you or Blue Dream could remove the code if I attached my Post.template.php file (the other files appear to be accepted without error for uninstall when I test uninstall)?

Grazie

Cal
Title: Re: Post and Change as Alternate User
Post by: [SiNaN] on January 10, 2009, 05:30:02 AM
Attach it.
Title: Re: Post and Change as Alternate User
Post by: Sudhakar Arjunan on January 10, 2009, 09:30:08 AM
Quote from: Blue Dream on January 10, 2009, 05:30:02 AM
Attach it.

I was waiting for such a long time for 2.0. 4 compatibility.
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on January 10, 2009, 09:32:26 AM
/me is not sure how the 2.0 version has anything to do with the quoted text.. :P

I am working on a 2.0 version, however, there are issues being worked on, including my PC having issues, and rebuilding it as soon as parts arrive....LOL

Then, dev work on my mods will continue. :)
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on January 10, 2009, 05:29:38 PM
Blue Dream,

File attached.

Grazie Mille!

Cal
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on January 15, 2009, 12:48:40 AM
Hello,

Hate to be a bother as this is a favor on your part, but would it be possible to look at clearing the two old separate MODs out of my Post.template.php file?  I'm presuming I'll tell both MODs to uninstall, ignore their error on my current post.template.php file, and then replace my existing one with the cleaned up one.

Your help on this is greatly appreciated.

Cal
Title: Re: Post and Change as Alternate User
Post by: coucnilhomeswap on January 19, 2009, 07:28:20 AM
hi ive installed this and want to know how i can add the option to the administrator permissions please.
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on January 19, 2009, 08:31:24 AM
Administrator permissions are set to all permissions in SMF.
Nothing to set in this mod for Admins.

Unless, it is a 2nd Admin membergroup, and the setting for this mod is only for post as alternative in the membergroup permissions. However, I do say to watch out who you give this ability to.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on January 23, 2009, 11:44:46 PM
Hello,

I appreciate your very kind offer to scrub my post.template.php but I was wondering when you might be able to work on it?  I'm holding off on any MODs that want to touch post.template.php.

Grazie,

Cal
Title: Re: Post and Change as Alternate User
Post by: flamechica on January 24, 2009, 04:02:44 PM
Sorry if this is a dumb question, I am new to SMF, but how do I know what to put in the "poster ID" and "Alternative User ID" boxes? I want this feature, as I had something similar on my phpbb3 forum, but I guess I just don't understand how it works.
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on January 24, 2009, 07:54:42 PM
The member's ID number.
This can be found in the admin section, looking at list of members, or via the regular member list.

The end of the link to the member's profile, will end in something like:

u=62

62 would be the ID. :)
Title: Re: Post and Change as Alternate User
Post by: flamechica on January 24, 2009, 10:30:49 PM
Thanks!  :)
Title: Re: Post and Change as Alternate User
Post by: floydpink on February 05, 2009, 02:30:02 AM
Is it just me, or do the post counts not get updated when the posting member is modified.
It would be a more complete update if the post stats were increased by 1 for the member being made the poster of the topic and decreased by 1 for the the member who is no longer the poster for the topic.
Title: Re: Post and Change as Alternate User
Post by: stingerman on February 08, 2009, 06:30:28 AM
I installed this, passed the test but now this is at the top of my forum, ersion 1.8:

$txt['changeposterid'] = 'Change Poster/Starter'; $txt['changeposteridno'] = 'Poster ID'; $txt['adminscanpostasaltuser'] = 'Post/Edit As Alternative User'; $txt['adminspostasguestcalled'] = 'Forum Staff'; $txt['adminscanpostasaltuserid'] = 'Alternative User ID';

How do I get rid of that?
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on February 08, 2009, 06:54:09 AM
I have not checked this mod with 1.1.8 yet. It looks like the text strings may have been changed a bit.

I'll look into this a little later.
Title: Re: Post and Change as Alternate User
Post by: Mark S on February 21, 2009, 08:45:30 AM
Quote from: floydpink on February 05, 2009, 02:30:02 AM
Is it just me, or do the post counts not get updated when the posting member is modified.
It would be a more complete update if the post stats were increased by 1 for the member being made the poster of the topic and decreased by 1 for the the member who is no longer the poster for the topic.

Nope, not just you... changing the post count of the old/new user is not increased/decreased.  I have literally thousands of posts which have been and need to have the IDs changed due to having to manually transfer posts from MSN groups, so it's a very important issue for us.

It would make sense that this function should be included in the mod or as a sparate mod, not just for a change to "guest", but for all poster ID changes:

Add/subtract 1 to/from changed ID poster.


Does this exist somewhere or can it be provided?

Thanks ~ Phåråoh ~
Title: Re: Post and Change as Alternate User
Post by: chrishicks on February 23, 2009, 08:31:56 AM
So is this ok to install and run on 1.1.8? I installed this on one of my 1.1.8 test boards and it seems to work as advertised. I received no errors during install and no text showing on my forum as mentioned above. I can post as a different user and all post counts go up afterwards. Should I be safe running this on my actual board?
Title: Re: Post and Change as Alternate User
Post by: Sudhakar Arjunan on March 08, 2009, 10:47:30 AM
Such an excellent mod.

Waiting for updated version of it on 2.0 RC1.

Just a request.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on March 24, 2009, 09:27:57 PM
I want to install this MOD, replacing the preceding seperate MODs.

Unfortunately, I get errors trying to uninstall from post.template.php.  The original MODs have been removed from the Mod site.  many weeks ago I asked if someone could help strip the MODs out of the file.  I was asked to post my php file, which I did.  There has been no response to my requests since then.

Would you be able to pull them out so I can install properly?  I'm running on 1.1.8.

Grazie,

Cal
Title: Re: Post and Change as Alternate User
Post by: LoGraYThS on April 15, 2009, 04:08:17 PM
Quote from: stingerman on February 08, 2009, 06:30:28 AM
I installed this, passed the test but now this is at the top of my forum, ersion 1.8:

$txt['changeposterid'] = 'Change Poster/Starter'; $txt['changeposteridno'] = 'Poster ID'; $txt['adminscanpostasaltuser'] = 'Post/Edit As Alternative User'; $txt['adminspostasguestcalled'] = 'Forum Staff'; $txt['adminscanpostasaltuserid'] = 'Alternative User ID';

How do I get rid of that?

Having the same problem here, I guess it has to be something about my Theme Post.template.php


I'm attaching it.

Using vintage Theme with SMF 1.1.8

www.pearljamexico.net

Tnx in advance
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on May 03, 2009, 11:57:05 PM
Quote from: A.SK on March 08, 2009, 10:47:30 AM
Such an excellent mod.

Waiting for updated version of it on 2.0 RC1.

Just a request.

2nd that!   ;D
Title: Re: Post and Change as Alternate User
Post by: Matou on May 10, 2009, 04:49:22 AM
Quote from: ThePharaoh on March 14, 2009, 07:56:55 AM
Quote from: ThePharaoh on February 21, 2009, 08:45:30 AM
Quote from: floydpink on February 05, 2009, 02:30:02 AM
Is it just me, or do the post counts not get updated when the posting member is modified.
It would be a more complete update if the post stats were increased by 1 for the member being made the poster of the topic and decreased by 1 for the the member who is no longer the poster for the topic.

Nope, not just you... changing the post count of the old/new user is not increased/decreased.  I have literally thousands of posts which have been and need to have the IDs changed due to having to manually transfer posts from MSN groups, so it's a very important issue for us.

It would make sense that this function should be included in the mod or as a sparate mod, not just for a change to "guest", but for all poster ID changes:

Add/subtract 1 to/from changed ID poster.


Does this exist somewhere or can it be provided?

Thanks ~ Phåråoh ~

v1.1.7  Question is still open

Perhaps this (old) mod Member post recount (http://custom.simplemachines.org/mods/index.php?mod=561) could help?
Title: Re: Post and Change as Alternate User
Post by: Lithriel on May 12, 2009, 10:23:08 PM
What would make this mod even better would be the ability to mass change who posted something.  Not sure how you would finagle that one, but I am running into that problem right now.  It sure would make things easier.  Editing each and every single topic is tedious.
Title: Re: Post and Change as Alternate User
Post by: dry3210 on May 19, 2009, 04:34:14 PM

8: Undefined index: changeposterid
File: /Themes/default/languages/Post.english.php (main sub template - eval?)
Line: 614

Getting that error whenever I modify a post.  Any ideas?
Title: Re: Post and Change as Alternate User
Post by: Eclipse16V on June 18, 2009, 05:45:30 AM
Waiting for updated version of it on 2.0 RC1-1.  :D
Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 25, 2009, 05:40:21 PM
Hello all,

in the attachment ist the modified MOD.
This work under SMF 2.0 RC1. SMF 2.0 RC1-1.

@BurkeKnight: You can use this do update your mod and upload it into mod database. ;)

Kind regards,
TheDeath
Title: Re: Post and Change as Alternate User
Post by: Smog on June 25, 2009, 07:13:42 PM
Quote from: TheDeath on June 25, 2009, 05:40:21 PM
in the attachment ist the modified MOD.
This work under SMF 2.0 RC1. SMF 2.0 RC1-1.
On SMF 2.0 RC1-1 it work as advertised, thanks!  :)
Title: Re: Post and Change as Alternate User
Post by: Eclipse16V on June 26, 2009, 03:43:23 AM
Quote from: TheDeath on June 25, 2009, 05:40:21 PM
Hello all,

in the attachment ist the modified MOD.
This work under SMF 2.0 RC1. SMF 2.0 RC1-1.

@BurkeKnight: You can use this do update your mod and upload it into mod database. ;)

Kind regards,
TheDeath

Thanks
it will work on 2.0 RC1-1  :D
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on June 28, 2009, 10:38:55 PM
Has someone taken over this mod?  I see that the mod author was last active Feb. 2009 from the original post profile and the other account later on in the thread.

Title: Re: Post and Change as Alternate User
Post by: Garou on June 29, 2009, 08:33:12 AM
TheDeath updated it for 2.0 with the intention that BK will update his files.

Several months back BK asked me to come to his site and work on it as part of his team as I had been in contact with SiNaN about taking it over when he officially gave the two mods up but gave them to BK instead, I declined. Other then that there has been no official word that BK was giving them/it up.

Edit: I did some research and it looks like BK's site has been suspended for some reason and the other sites Ive known him to be associated with, he hasn't logged into since February either. I'm not sure what that means for the future of this mod or his others.  :-\
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on June 29, 2009, 12:13:14 PM
Well on a side note, I hope he/she is well.
Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 29, 2009, 12:31:36 PM
Quote from: C4G-TK on June 28, 2009, 10:38:55 PM
Has someone taken over this mod?  I see that the mod author was last active Feb. 2009 from the original post profile and the other account later on in the thread.

That was the reason why I've changed self and there are a lot more mods which do not go for SMF2.0.
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on June 29, 2009, 12:42:04 PM
I saw your post and will try out the update today.

I asked the question because I like to have a print out of the parse for my specific edition of SMF.  I do this for every mod that I install.  I'll just print out the xml file or something.  (I know... I'm kinda anal like that.)  Also, I like to know if something is still being supported by the author or not.  That's all.

Thanks for the update to the mod.  I'll try it since it was a mod that I had on a previous 1.1.X site, but have waited for an update for 2.0.  Thanks again!
Title: Re: Post and Change as Alternate User
Post by: akbora on June 29, 2009, 02:24:46 PM
source/subs-post.php gives error

Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 29, 2009, 02:39:24 PM
I show in my crystal ball but i can't see your error.  :o
Title: Re: Post and Change as Alternate User
Post by: akbora on June 29, 2009, 02:40:43 PM
I will change but no code in it....
Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 29, 2009, 03:20:51 PM
I can not help you, when you not write code or the error message.
Title: Re: Post and Change as Alternate User
Post by: akbora on June 29, 2009, 03:33:03 PM
Sorry I have mistake...

soruce/post.php

I have changed it but there is an error :


Parse error: syntax error, unexpected T_ELSE in /vhosts/mysite.com/http/Sources/Post.php on line 1879
Title: Re: Post and Change as Alternate User
Post by: akbora on June 29, 2009, 03:35:00 PM
Here it is the file....
Title: Re: Post and Change as Alternate User
Post by: Groundhog on June 29, 2009, 03:48:23 PM
Thanks TheDeath

It works good for my  8)

SMF 2.0 RC1
Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 29, 2009, 03:51:22 PM
Quote from: akbora on June 29, 2009, 03:33:03 PM
Sorry I have mistake...

soruce/post.php

I have changed it but there is an error :


Parse error: syntax error, unexpected T_ELSE in /vhosts/mysite.com/http/Sources/Post.php on line 1879

You have all copy and paste ;).
You can found the repair post.php in attachment.
Title: Re: Post and Change as Alternate User
Post by: akbora on June 29, 2009, 04:08:04 PM
Wooouwwwwww!!!!! Thanks thansk wonderful!!! Thank you billion times....

Very very useful mod and we need it really...
Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 29, 2009, 04:10:33 PM
No problem  8).

You're right, it's a really good mod
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on June 30, 2009, 02:05:27 PM
I'd like to switch to this MOD, but I have the two original MODs on my system and they've been removed from this site so I can't manually extract them (helps to know what to take out).  And posts to the original topics have not gotten a response.

*sospiro*

Cal
Title: Re: Post and Change as Alternate User
Post by: TheDeath on June 30, 2009, 02:28:08 PM
I can try to help you.

I need the files from your mod's and the files which the mod's have changed.

What version of SMF have you?
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on June 30, 2009, 02:34:40 PM
I'm on 1.1.9.  I'll see about running the uninstall on my site to see what files fail.  I think it's just one php file that's having problems uninstalling.

Will attach tonight (GMT-7).

Grazie!

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on June 30, 2009, 08:21:42 PM
http://sleepycode.com/PackageParser/index.php go to this site and upload the package you have on your server and it will tell you what code you need to change. On a side note it usually best to uninstall mods before upgrading smf.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 01, 2009, 02:27:11 AM
Garou,

Thanks.  I looked at that, trying each MOD separately.  However, merging [Sinan]'s two MODs manually, I managed to merge the code so uninstalling requires a bit more surgery than I'm comfortable with.  I've had no problem, when trying to add a MOD, of using the parser on the MOD page to locate the string it wants and moving code around manually so that the install works.  In this case, so much of the code overlapped it's not easy to pull apart at my level of php (PL/1 or REXX would be another matter entirely ;) ).


TheDeath,
So, I'm going to attach my two MODs and my Post.template.php and perhaps the code from the two MODs can be extracted.  I can then run the uninstalls, ignore the errors for Post.template.php, and then replace Post.template.php with a clean version so I can install this MOD.

Many thanks all around.

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on July 01, 2009, 05:44:31 AM
Cal O'Shaw, at line 591
Find...
</tr>' : '';
if (allowedto('reply_alternate'))
{
echo ' <tr>
<td class="smalltext"><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label></td>
<td class="smalltext"><label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></td> </tr>
<tr>
<td class="smalltext"><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label></td>
<td class="smalltext"><label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></td>
</tr>';
}
echo ' </table>
</div>
</td>
</tr>';

Replace with...
</tr>' : '', '
</table>
</div>
</td>
</tr>';

That will remove the mods  from that file. If you have problems with any other files let me know.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 02, 2009, 12:34:55 AM
Garou,

Grazie!

I've switched over to this MOD and have asked one of the Global Moderators (to whom I have given access to this feature) to see if it works now for that membergroup.

The only change I had to make was your replacement code didn't have the same number of spaces as the package was looking for.  So I just went to the MOD page, parsed it, and pasted its replacement over yours.  Boy that parser is picking with white space :).


TheDeath,

Grazie to you for your help on this and other past items.
Title: Re: Post and Change as Alternate User
Post by: Garou on July 02, 2009, 10:12:46 AM
Quote from: Cal O'Shaw on July 02, 2009, 12:34:55 AM
Boy that parser is picking with white space :).

Indeed it is, Glad it all worked out ok for you though  :)
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 03, 2009, 03:06:40 AM
Got a problem, though...

As Admin I can use it.  Despite giving the ability to my Global Mod group, they do not see the option (I even logged in on an account set for that group, so it is a real problem).  No errors were reported for installation.

Grazie
Title: Re: Post and Change as Alternate User
Post by: TheDeath on July 03, 2009, 07:38:41 AM
Go to Admin Panel.
Under Members -> permissions, click modify by the group Global Moderator.
Scroll to "Default Board Profile Permissions", under Post you find this point "Can reply as an alternate user", check it and save.

Kind regards,
TheDeath
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 03, 2009, 12:25:29 PM
Hello,

Actually I had already done that.  One of the previous MODs this MOD was built upon used that control.  I went to the permission page after I had installed the MOD, found it was already checked (from the old MOD), so I unchecked it, saved it, went back in, checked it, and saved that.

I am thinking maybe I should uninstall it, and download the latest version (in case my copy is damaged).  I'll check, after I uninstall it, to make sure the setting no longer appears on the Permissions page.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 03, 2009, 11:13:58 PM
I removed the MOD.  The permissions setting no longer appeared.  I downloaded the current version (the site says 1.5, packages page on my site says 1.0).  Installed with no errors.  The permission is again available to be set.  It is set enabled for my global mods (it appears the value is kept even if the code is removed).  It still is not visible to my Global Mods.

I am running 1.1.9 (via updates from earlier versions).

No errors are reported during install or uninstall.

Any additional assistance is most welcome.

Grazie,

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on July 03, 2009, 11:55:43 PM
Uninstalling the mod is only removing the script data however the setting is remaining in the database somewhere. I'm just not sure off hand where.  :-[
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 04, 2009, 12:34:24 AM
True, and it would not be a problem, except the data must now be in a form that fails the test.

Considering there can be obsolete data from [SinaN]'s previous version of this MOD (and clearing I have that obsolete data and can't clear it by disabling and enabling the option in permissions), would it be possible to alter the MOD to utilise a new variable?  I know it's not good form to leave orphan data (the old variable), but the MOD code can't just transfer the old data or else the bad data is simply moved.

An alternative would be to validate the data and confirm its a 1-bit True/False toggle.  But then the code has to carry a lot of error trapping code (instead of, say finding a binary toggle, it's a number set to zero or one, or a text string set to "0" or "1" or any number of possible conditions).

Or maybe code that drops the variable after the MOD is uninstalled (either part of the process, or a separate php file run manually).

Grazie,

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on July 04, 2009, 08:22:29 AM
The problem is that no one is actively working on this mod at the moment. In the past the Can Post As Alternative User part was created by karlbenson, then continued by SiNaN, then continued by BurkeKnight. The Change Poster Of Topic And Message was created by SiNaN, then continued by BurkeKnight. Recently TheDeath, out of the kindness of his heart, updated both mods over to 2.x. I have no idea what his continued support will be. I'm not sure what happened to BK but he seems to have disappeared.

So in the meantime all support is user generated, if or when the mod gets updated remains to be seen. Right now I'm working on several other projects but soon as I can clear my plate if no one else claims this mod Ill go ahead and officially take it over as it holds a special place in my heart.

That said you'll have to manually remove the field from your database. Its in smf_board_permissions  as reply_alternate. Once you've done that you can reinstall the mod again and hopefully it will work properly for you. Its working on a fresh install of SMF I set up but if you run into any problems let us know.
Title: Re: Post and Change as Alternate User
Post by: TheDeath on July 04, 2009, 01:05:38 PM
Hello Cal O'Shaw and Garou,

i can give next time the support for the SMF2 Version.
For the SMF1.1.9 can give also, but i must installed this.  ::)
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 05, 2009, 01:10:45 AM
Garou,

Thanks for the info.  I uninstalled the MOD, removed the field from the table, then installed the MOD.  The permissions were set to the default of "No", but enabling in Permissions did not enable the MOD for the Global Moderators.

TheDeath,

You have already been very kind and most helpful.  If you find the time to help with my problem, that is super, if not, please don't worry about it.


Regards,

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on July 05, 2009, 10:37:23 AM
Cal,  I'm really at a loss on this one.  :-[

Are you using a custom theme for the site or allow your users to pick a different theme? Have you tested this on the default theme? If your mods are using a different theme, check the themes Post.template.php to make sure the code is there compare it to http://custom.simplemachines.org/mods/index.php?action=parse;mod=1554;attach=79869;smf_version=1.1.7. Check your error logs and see if any errors pop up when an admin uses the feature.

If the code is messed up in the other files it should either break your forum or the mod shouldn't work for you either but you may want to double check that as well.

TheDeath, if you want to take over the mod I suggest that you go ahead and submit your version at http://custom.simplemachines.org/mods/index.php?action=postmod;sa=new. Once they approve it, post a link to the mod and its official thread here so people know to go there for support instead. I'm more then willing to help you support it and if you want I can help you out with keeping everything updated or even improving upon the mod. If you go back and check the threads for when this was SiNaN's mod(s) there are still features people were asking for that haven't made it in yet.  ;D
Title: Re: Post and Change as Alternate User
Post by: TheDeath on July 05, 2009, 10:46:51 AM
Hello Garou,

I have the mod submitted on 03.07. in the modification section and I waiting for approve. ;)

This is the link to this http://custom.simplemachines.org/mods/index.php?mod=1941

Thanks for your help.
Title: Re: Post and Change as Alternate User
Post by: Garou on July 05, 2009, 10:55:15 AM
Sweet!!! I cant wait to see this mod back in capable hands. Anything you need let me know.  :)
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on July 06, 2009, 02:29:01 AM
I'm using the default theme in 1.1.9.  As an Admin it works fine.  For anyone else, it seems to be having a problem with the logic to decide to show the option.

It's been really handy in reassigning ownership of orphaned topics and posting Official announcements rather than having a specific member assigned (and possibly taking some heat from unhappy readers).

For now, I do the name change, but it's be nice to have the Global Mods doing this (they're managers without access to operational details).

Grazie,

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on July 06, 2009, 11:24:42 PM
As for the posting as another user not working I cant figure out why its not working right for other users. If the code is correct and they are set to use it it should work fine.

As far as re-attributing posts to another user, that is an admin only function. When SiNaN created the original mod it was done that way on purpose as a security measure., at least I thought he mentioned it in his thread for the mod at one point. There might be a way to work around that though. I have an idea I just have to test it out.  :)
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on July 07, 2009, 02:31:12 AM
Quote from: Garou on June 30, 2009, 08:21:42 PM
http://sleepycode.com/PackageParser/index.php go to this site and upload the package you have on your server and it will tell you what code you need to change. On a side note it usually best to uninstall mods before upgrading smf.

Thanks for this tip!


And Thanks to The Death for the upgrade.  Just installed on my RC1-1 forum.
Title: Re: Post and Change as Alternate User
Post by: Garou on July 07, 2009, 08:52:18 AM
To get around the admin only function of re-attributing posts to another user...

With the mod installed, in ./Sources/Subs-Post.php find...
if(isset($_POST['changeposterid']) && $context['user']['is_admin'])
And change to...
if(isset($_POST['changeposterid']) && (allowedto('reply_alternate')))

and in ./Themes/default/Post.template.php find...
for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></td>
          </tr>';
}
if ($context['user']['is_admin'] && isset($_REQUEST['msg']))

and change to...
for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></td>
          </tr>';
}
if (allowedto('reply_alternate') && isset($_REQUEST['msg']))


This should allow anyone that has the "Can reply as an alternate user" permission to also be able to change the Poster ID.

If coded properly there should be a separate permission for this or at least the language strings in the mod should be changed to reflect that the user has both abilities when you set the permission for them. This is just a quick and dirty fix that will do what you need. :)
Title: Re: Post and Change as Alternate User
Post by: Kimmie on August 01, 2009, 11:09:08 PM
This wont upload on 1.1.9. Keep getting the error:

The package you tried to upload either is not a valid package or has become corrupted.


Is there anyone that still has the older version by karl that they can share because I used to have it and it worked well, however due to a reformat way back then, I lost it.


TIA
Title: Re: Post and Change as Alternate User
Post by: Garou on August 02, 2009, 08:17:24 AM
I just installed this mod on a fresh copy of 1.1.9 and 1.1.10, it installs perfectly.
Title: Re: Post and Change as Alternate User
Post by: Garou on August 17, 2009, 02:43:49 PM
Quote from: TheDeath on July 05, 2009, 10:46:51 AM
Hello Garou,

I have the mod submitted on 03.07. in the modification section and I waiting for approve. ;)

This is the link to this http://custom.simplemachines.org/mods/index.php?mod=1941

Thanks for your help.

I noticed that your version still hasn't been approved, whats holding it up and do you need help? Id love to see this mod back under someones care.
Title: Re: Post and Change as Alternate User
Post by: Kimmie on September 27, 2009, 10:27:01 AM
any way we can get this for 2.0 RC1.2?
Title: Re: Post and Change as Alternate User
Post by: Garou on September 27, 2009, 10:33:45 AM
TheDeath updated it at http://www.simplemachines.org/community/index.php?topic=280897.msg2129057#msg2129057 and was at least trying to get it released as his own mod since the current author seems to be MiA. SMF hasn't officially approved his mod for release but it works just fine.
Title: Re: Post and Change as Alternate User
Post by: Kimmie on September 27, 2009, 05:32:26 PM
Quote from: Garou on September 27, 2009, 10:33:45 AM
TheDeath updated it at http://www.simplemachines.org/community/index.php?topic=280897.msg2129057#msg2129057 and was at least trying to get it released as his own mod since the current author seems to be MiA. SMF hasn't officially approved his mod for release but it works just fine.


You (AND TheDeath) are my heros!!!  :)



Quote from: TheDeath on June 25, 2009, 05:40:21 PM
Hello all,

in the attachment ist the modified MOD.
This work under SMF 2.0 RC1. SMF 2.0 RC1-1.

@BurkeKnight: You can use this do update your mod and upload it into mod database. ;)

Kind regards,
TheDeath



Thank you for this however on 2.0 RC1.2 I am getting this error in my logs after changing the topic starter:

action=post2;start=0;msg=27536;a2f80ff0e9=22566bab77f1d98bd8edecb090e340a2;board=60

8: Use of undefined constant id - assumed 'id'

File: /home/****/public_html/Sources/Subs-Post.php
Line: 2561
Title: Re: Post and Change as Alternate User
Post by: Garou on September 27, 2009, 10:19:35 PM
hmmm interesting. Did the mod install with out errors or did you have to edit any of it by hand?

Attach your .Sources/Subs-Post.php and well take a look at it.
Title: Re: Post and Change as Alternate User
Post by: Kimmie on September 27, 2009, 10:24:59 PM
Quote from: Garou on September 27, 2009, 10:19:35 PM
hmmm interesting. Did the mod install with out errors or did you have to edit any of it by hand?

Attach your .Sources/Subs-Post.php and well take a look at it.

I did have to edit one file but it wasnt that one, it was sources/post.php and that was because it couldnt find the info due to it looking for the line:

"// Have admins allowed people to hide their screwups?"

which is not actually the true line in that area

file attached

I tested out the post/edit as alternate user and didnt get any errors on that one.


Also.. where are the permissions located for this mod, I cant seem to find them. 
Title: Re: Post and Change as Alternate User
Post by: Garou on September 28, 2009, 11:32:19 AM
hmm I just set  up a 2.0RC1.2 test site and and it installed and works fine. I do get the error in the logs on the function though. Ill have to look at it more to figure out why.

The only permission is "Can reply as an alternate user" which is under the permissions for "Moderate the board". The Attribute post to another user function is an admin only but I posted a couple pages back (http://www.simplemachines.org/community/index.php?topic=280897.msg2147735#msg2147735) in this thread on how to tie it to the "Can reply as an alternate user" so the one permission gives you access to both.

I think I found the fix...
In /Sources/Subs-Post.php look for...
            //Found it! Change the starter id.
            if ($smcFunc['db_num_rows']($dbresult) == 1)
            {
$smcFunc['db_query']('', "
UPDATE {db_prefix}topics
SET id_member_started = {int:change}
WHERE id_first_msg = {string:id}
LIMIT 1",
array(
'change' => $changeposteridno,
'id' => $msgOptions[id],
)
);


Replace....
'id' => $msgOptions[id],
With...
'id' => $msgOptions['id'],

At least it didn't error out for me when I changed it.  :)
Title: Re: Post and Change as Alternate User
Post by: Kimmie on September 28, 2009, 12:38:16 PM
Quote from: Garou on September 28, 2009, 11:32:19 AM
hmm I just set  up a 2.0RC1.2 test site and and it installed and works fine. I do get the error in the logs on the function though. Ill have to look at it more to figure out why.

The only permission is "Can reply as an alternate user" which is under the permissions for "Moderate the board". The Attribute post to another user function is an admin only but I posted a couple pages back (http://www.simplemachines.org/community/index.php?topic=280897.msg2147735#msg2147735) in this thread on how to tie it to the "Can reply as an alternate user" so the one permission gives you access to both.

I think I found the fix...
In /Sources/Subs-Post.php look for...
            //Found it! Change the starter id.
            if ($smcFunc['db_num_rows']($dbresult) == 1)
            {
$smcFunc['db_query']('', "
UPDATE {db_prefix}topics
SET id_member_started = {int:change}
WHERE id_first_msg = {string:id}
LIMIT 1",
array(
'change' => $changeposteridno,
'id' => $msgOptions[id],
)
);


Replace....
'id' => $msgOptions[id],
With...
'id' => $msgOptions['id'],

At least it didn't error out for me when I changed it.  :)


Just made the change and it appears that fixed it (no errors on my end anymore either). Thank you for fixing it. :)

As for the permissions.. those are ok the way they are.. I just wanted to make sure that I could control who had access to either feature is all. I was really tired last night and guess I just overlooked the one listed :).


Thanks again. :)
Title: Re: Post and Change as Alternate User
Post by: qubbah on October 28, 2009, 10:48:08 PM
i have the problem to change </tr>' : '', '
</table>
</div>
</td>
</tr>';


for

</tr>' : '';
if (allowedto('reply_alternate'))
{
echo ' <tr>
<td class="smalltext"><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label></td>
<td class="smalltext"><label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></td>
          </tr>';
}
if ($context['user']['is_admin'] && isset($_REQUEST['msg']))
{
echo ' <tr>
<td class="smalltext"><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label></td>
<td class="smalltext"><label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></td>
</tr>';
}
echo ' </table>
</div>
</td>
</tr>';



because the place to change is take by another mod:
</tr>' : '';
if ($context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post'])
{
echo ' <tr>
<td class="smalltext"><label for="check_changeallsubject"><input type="checkbox" name="changeallsubject" id="changeallsubject" value="1" class="check" /> ' . $txt['changeallsubject'] . '</label></td>
<td class="smalltext"></td>
</tr>';
}
echo ' </table>
</div>
</td>
</tr>';


anybody can help?
Title: Re: Post and Change as Alternate User
Post by: Garou on October 29, 2009, 12:46:58 AM
hmmm It looks like you are trying to have this mod as well as Change All Subjects (http://custom.simplemachines.org/mods/index.php?mod=1165), correct?

Try...
</tr>' : '';
                           if (allowedto('reply_alternate'))
                           {
                              echo '   <tr>
                                          <td class="smalltext"><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label></td>
                                          <td class="smalltext"><label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></td>
                               </tr>';
                           }
                           if ($context['user']['is_admin'] && isset($_REQUEST['msg']))
                           {
                              echo '   <tr>
                                          <td class="smalltext"><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label></td>
                                          <td class="smalltext"><label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></td>
                                    </tr>';
                           }
                           if ($context['can_modify_any'] && isset($_REQUEST['msg']) && $context['is_first_post'])
                           {
                              echo '   <tr>
                                          <td class="smalltext"><label for="check_changeallsubject"><input type="checkbox" name="changeallsubject" id="changeallsubject" value="1" class="check" /> ' . $txt['changeallsubject'] . '</label></td>
                                          <td class="smalltext"></td>
                                    </tr>';
                           }
                     echo '      </table>
                                 </div>
                              </td>
                           </tr>';


If that doesn't work let me know and Ill try to come up with something else or you might want to try the support thread for the other mod. [SiNaN] was a developer of this mod at one point as well as the other, so he may have run into this issue in the past.
Title: Re: Post and Change as Alternate User
Post by: PalmBeachPreps on November 02, 2009, 12:25:42 AM
Quote from: TheDeath on June 29, 2009, 04:10:33 PM
No problem  8).

You're right, it's a really good mod
It sure is! Thanks!!!
Title: Re: Post and Change as Alternate User
Post by: futeball on November 11, 2009, 11:02:13 PM
Hi, i'm using smf 1.1.10 and have installed this mod. I'm using custom themes and this mod doesn't appear in reply page as mention. But when I change to default theme, the check box & text box appear.

Can somebody help me on this. By looking at manual installation, it change the Post.template.php on default theme. But, in my custom theme, the file don't exists.

Tq in advance.
Title: Re: Post and Change as Alternate User
Post by: Garou on November 12, 2009, 12:07:42 AM
You might try copying the Post.template.php from the default theme to your custom theme and see if that helps.

What theme are you using?
Title: Re: Post and Change as Alternate User
Post by: flamechica on November 19, 2009, 04:54:37 AM
Will this be updated for RC2?
Title: Re: Post and Change as Alternate User
Post by: Garou on November 19, 2009, 05:38:54 AM
Since BK the author that is supposed to be working on the mod has disappeared I cant say for sure. At one point TheDeath updated it for 2.0 at http://www.simplemachines.org/community/index.php?topic=280897.msg2129057#msg2129057 and submitted it as his own mod but for some reason it hasn't been approved. Probably due to the small error I fixed back in this post... http://www.simplemachines.org/community/index.php?topic=280897.msg2280630#msg2280630.

A while back this was two different mods for 1.1.x only  by yet another author. He had offered them up for someone to take over and I was talking to him and trying to update them for 2.x when BK sent him a package of the 2 mods combined and it became this mod.

I tend to use these/this mod myself a lot so if it isn't updated by someone else (BK or TheDeath) soon, Ill probably end up doing it myself and submitting it under my name.
Title: Re: Post and Change as Alternate User
Post by: flamechica on November 19, 2009, 02:15:48 PM
That would be great, because I use this mod a TON and really need it for RC2
Title: Re: Post and Change as Alternate User
Post by: PalmBeachPreps on November 19, 2009, 03:05:57 PM
^^^DITTO!
Title: Re: Post and Change as Alternate User
Post by: Turk Navy on November 21, 2009, 02:01:25 PM
I have updated the mod to work with RC2. If you want you can use it until official updated version of mod comes.

http://www.oyun-arsivi.net/mods/Post.and.Change.as.Alternate.User_RC2.zip
or
http://rapidshare.com/files/310252471/Post.and.Change.as.Alternate.User_RC2.zip
Title: Re: Post and Change as Alternate User
Post by: Garou on November 21, 2009, 04:22:19 PM
great to hear Turk Navy. I cant wait to see what you did. I was working on it this morn before I left the house for work and was running into issues on the post template.

Since its done Ill stop working on it and let you release it as your own since I dont think BK is coming back.

Just be sure to credit Karl Benson, [SiNaN], BK and The Death as previous authors.
Title: Re: Post and Change as Alternate User
Post by: Turk Navy on November 21, 2009, 05:29:29 PM
I agree with you, I didn't edit author's name or readme file which contains the other author's names to credit them. If this version of mod works perfectly with your forums too, I can release as my own and of course, write their names.
Title: Re: Post and Change as Alternate User
Post by: Garou on November 22, 2009, 09:06:23 AM
I finally got the chance to test it out and it works perfectly.

After comparing your version to the one I was working on I was missing the echo statement before the list code based on the rest of the code in that section I didn't think it was needed.

This is the Read Me file I had worked out for my version when I finished it, since you beat me to it, feel free to use and alter it to fit you.

[center][b][color=red][size=14pt]Post as and Attribute Single Post to Alternate User v2.1[/size][/color][/b][/center]
[center]By [b][url=http://custom.simplemachines.org/mods/index.php?action=profile;u=60251]Garou[/url][/b][/center]
[hr]
[center][url=http://www.simplemachines.org/community/index.php?topic=280897.0]Support topic[/url] | [url=http://custom.simplemachines.org/mods/index.php?mod=1554]Link to Mod[/url]
[color=red]Note: Refers to the last incarnation of the mod and will be updated once new support boards and downloads are set up.[/color][/center]
[hr]

[b][color=blue][size=10pt]Introduction:[/size][/color][/b]
This mod consists of two parts.
Post as alternate user, allows members with the assigned permission to post and edit posts as if they are another forum user.

Attribute posts to another user, allows admins to assign ownership of a particular post to another user.

[b][color=blue][size=10pt]Features:[/size][/color][/b]
To post or edit a post as an alternate user click on "Additional Options..." below the post box area, there will be a check box for "Post/Edit As Alternative User" and a box to enter "Alternative User ID:". Make sure the check box is checked and then enter either the user ID of an existing user to post as that user or enter "0" to post as guest Forum Staff.

To edit an existing post and change the author to another existing forum member click on Additional Options... below the post box area, there will be a check box for "Change Poster/Starter" and a box to enter "Poster ID:". Make sure the check box is checked and then enter the user ID of an existing user and the author of the post will be changed to that of a user you chose. [color=red]Note: The UserID you enter must be that of a valid/existing user. You can not attribute the post to a guest or no user.[/color]

To find the ID number of a user go to their profile and look at the URL or link eg.../index.php?action=profile;u=1 "u=some number" the number is the user id of the member.

To set the permission to post and reply as an alternate user edit the permissions for a particular group and under the settings for "Posts", check the box for "Can reply as an alternate user".

The ability to change the author of an existing post is currently an admin only permission and can not be set for another group.

[b][color=blue][size=10pt]Installation:[/size][/color][/b]
To install, simply upload the entire zip file to the package manager (Admin -> Package Manager -> Download New Packages).

To install on a custom theme, please refer to the package parser and manually apply the changes for ./Themes/default/... to  ./Themes/your custom theme/...


[b][color=blue][size=10pt]Compatibility:[/size][/color][/b]
Tested under SMF Versions 1.1.10 and 2.0 RC1 - 2.0 RC2

[b][color=blue][size=10pt]Credits:[/size][/color][/b]
Special thanks to all the people who have worked on this mod (in some version) in the past...
[url=http://custom.simplemachines.org/mods/index.php?action=profile;u=63186]karlbenson[/url], [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=118168][SiNaN][/url], [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=194815]BK-S-M-F Modding Team[/url] aka. [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=150637]BurkeKnight[/url], and [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=207533]TheDeath[/url].

[b][color=blue][size=10pt]Change log:[/size][/color][/b]
[b]Version:2.1[/b] Date: October 22, 2009
* Support for mod taken over by Garou
! Some minor bug fixes
* Updated to support SMF version 2.0 RC2

[b]Version:2.0[/b] Date: June 25, 2009
* Mod updated to support 2.x versions of SMF by TheDeath

[b]Version: 1.5[/b] Date: December 10, 2008
* Change Poster Of Message And Topic & Post As An Alternative User mods taken over by BK-SMF.
+ Both Mods combined for use with SMF 1.1 to prevent conflicts between the two.

[i]All previous incarnations of this mod were created and supported by karlbenson and/or [SiNaN] [/i]

[b]Legend:[/b]
! bug fix
+ added feature
* changed
> Comment


You might also want to add 1.1.x support to the mod or at least direct people to this version for 1.1.x support. This version works fine but if the are any further changes in the 1.1.x line this version may stop working. Either way I'm sure the users appreciate the additional support.

There is some tweaking that could be done to the mod. Back when [SiNaN] was working on these mods separately people were asking that the user ID be changed to user name. There were a couple other things but I don't remember them off hand.

In the end great job and I look forward to what you might come up with in the future.
Title: Re: Post and Change as Alternate User
Post by: Turk Navy on November 22, 2009, 12:18:47 PM
Thank you for your comment. However, it seems you worked on this mod more than I did. You prepared your files etc, I didn't know that. So, If you want you can take over this mod. :)
Title: Re: Post and Change as Alternate User
Post by: Garou on November 22, 2009, 12:50:28 PM
In the end you found the solution before I did so as far as I'm concerned its yours, I have several other project to keep me busy. Ive just been using these two features a long time and am quite familiar with them. If you aren't interested in supporting the mod for the long term Id be happy to take it on.

These are very useful features not only for me but many members of the SMF community so as long as someone is willing to keep the mod up to date I'm happy. Its completely up to you. :)
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on November 22, 2009, 11:51:50 PM
We're on 1.1.10 and our Global Moderators can't post as alternate users, even though I've given them permission.

We have the 1.5 version by BK.  Is there a later version that might fix this?

Grazie!
Title: Re: Post and Change as Alternate User
Post by: Garou on November 23, 2009, 10:52:08 AM
Unless some of the code has been changed it should work. Are you getting any errors? Are they seeing the field in post options at all?
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on November 23, 2009, 12:50:01 PM
The permissions are set to on, but when they create a new post, they do not see the options to post as another user.  I've uninstalled and reinstalled a few times with no errors.

I should note that we had originally installed both of [SiNaN]'s MODs (with a bit of editing) and it took some work to extract them when he pulled them (when a MOD gets pulled, it's no longer possible to use the manual parse, which makes extracted a dead MOD really, REALLY difficult.  I wish there was a way to stop people from downloaded dead MODs but keep the manual parse feature working).
Title: Re: Post and Change as Alternate User
Post by: Garou on November 23, 2009, 01:02:14 PM
Well there are a few of us around that run alternate package parsers on our sites where you upload the packaged mod and then it works pretty much like the SMF parser.

The two I know off the top of my head are http://sleepycode.com/PackageParser and http://smf.balancegames.net/PackageParser
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on November 24, 2009, 03:49:01 AM
Ah, grazie!  I'll have to send MODBREAK up as we modified things to utilise permissions with it.

But I am concerned that even though the MOD installed without error, and I gave the permissions to my Global Moderators, they don't see the options when using the Edit Post panel.  But as an Admin, I do.

Cal
Title: Re: Post and Change as Alternate User
Post by: Garou on November 24, 2009, 06:20:52 AM
They should be seeing the post as but not the change posts author. Unless you change the mod as I suggested several pages back in this thread attributing a post to another user is an admin only function.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on November 24, 2009, 02:13:38 PM
Then why do I have in Permissions, under Permissions -> Global Moderator -> Global Permissions - > Posts:

"Can reply as an alternate user" and choices of A, D, X

They don't see any additional options than groups with the permission denied.
Title: Re: Post and Change as Alternate User
Post by: MoreBloodWine on December 09, 2009, 12:39:13 PM
When you go to modify a message the following error comes up in the error log. My guess is that it's because of the missing text next to the second "tickable" option on the post page where you can change the owner of a topic.

Administrator   Today at 12:36:26 PM 
<ip removed>     c34817ae3874dc85aa86a462789e5b0a 
http://www.mysite.com/index.php?action=post;msg=2;topic=2.0;sesc 
8: Undefined index: changeposterid
File: /home/mysite/Themes/default/languages/Post.english.php (main sub template - eval?)
Line: 564


Edit: I just checked the referenced file and it doesnt even go up to 200 lines and the error is referencing line 564.
Title: Re: Post and Change as Alternate User
Post by: Cal O'Shaw on December 11, 2009, 12:23:07 AM
Quote from: Cal O'Shaw on November 24, 2009, 02:13:38 PM
Then why do I have in Permissions, under Permissions -> Global Moderator -> Global Permissions - > Posts:

"Can reply as an alternate user" and choices of A, D, X

They don't see any additional options than groups with the permission denied.

Hello, just wondering if what I'm seeing is supposed to be there, and if so, why it is not working.

Grazie
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on December 15, 2009, 11:44:50 PM
VERY COOL!

Just installed on my RC2 forum w/o problems!
Title: Re: Post and Change as Alternate User
Post by: akbora on December 28, 2009, 10:02:46 PM
Thanks TurkNavy!!! Bravo!
Title: Re: Post and Change as Alternate User
Post by: akbora on January 05, 2010, 04:46:20 PM
Is it possible when we post instead of ID, this ID seems login in online list? Thanks
Title: Re: Post and Change as Alternate User
Post by: Turk Navy on January 12, 2010, 02:05:05 PM
Since we cant get to the current author of this mod, I can't create an official topic and mod page for it. However, I'll try to provide suupport from this topic as I could.

Post as and Attribute Single Post to Alternate User v2.1
Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip (http://www.oyun-arsivi.net/mods/Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip)
Post.as.and.Attribute.Single.Post.to.Alternate.User_1.1.11.zip (http://www.oyun-arsivi.net/mods/Post.as.and.Attribute.Single.Post.to.Alternate.User_1.1.11.zip)

Quote from: akbora on January 05, 2010, 04:46:20 PM
Is it possible when we post instead of ID, this ID seems login in online list? Thanks
I think it is possible, I'll try this on my free time. :)
Title: Re: Post and Change as Alternate User
Post by: ~DS~ on January 12, 2010, 02:07:19 PM
Quote from: Turk Navy on January 12, 2010, 02:05:05 PM
Since we cant get to the current author of this mod, I can't create an official topic and mod page for it. However, I'll try to provide suupport from this topic as I could.

Post as and Attribute Single Post to Alternate User v2.1
Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip (http://www.oyun-arsivi.net/mods/Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip)
Post.as.and.Attribute.Single.Post.to.Alternate.User_1.1.11.zip (http://www.oyun-arsivi.net/mods/Post.as.and.Attribute.Single.Post.to.Alternate.User_1.1.11.zip)

Quote from: akbora on January 05, 2010, 04:46:20 PM
Is it possible when we post instead of ID, this ID seems login in online list? Thanks
I think it is possible, I'll try this on my free time. :)
What's new in the package?
Title: Re: Post and Change as Alternate User
Post by: Turk Navy on January 12, 2010, 02:21:07 PM
I just edited readme files and ordered the codes, there is nothing new actually.
Title: Re: Post and Change as Alternate User
Post by: Max22 on January 13, 2010, 05:50:47 PM
I want just to notify a conflict with this mod:

http://www.simplemachines.org/community/index.php?topic=234633.msg2451722#msg2451722
Title: Re: Post and Change as Alternate User
Post by: LuminaRS on March 05, 2010, 04:14:28 PM
I've been using this mod for quite some time, I love the ability to designate 0 and have the post come from "Forum Staff"

I wish this worked for PMs
Title: Re: Post and Change as Alternate User
Post by: ~DS~ on March 12, 2010, 12:05:16 AM
Nice, works on RC3. Should have been default. maybe in 2.1
Title: Re: Post and Change as Alternate User
Post by: abhibehr on March 12, 2010, 04:01:09 PM
How did you manage to install on RC3?
Title: Re: Post and Change as Alternate User
Post by: ~DS~ on March 12, 2010, 04:48:18 PM
Quote from: abhibehr on March 12, 2010, 04:01:09 PM
How did you manage to install on RC3?
I use this unofficial
http://www.simplemachines.org/community/index.php?topic=280897.msg2451230#msg2451230
It should work on RC3 as well.
Title: Re: Post and Change as Alternate User
Post by: Jared Thaler on March 13, 2010, 12:11:54 AM
Is anyone planning to take this over and improve it to the point where it can accept user names as well as just ids?  Lack of that functionality is one of the few things keeping me on PHP.
Title: Re: Post and Change as Alternate User
Post by: Eclipse16V on March 15, 2010, 02:17:06 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Post and Change as Alternate User
Post by: ~DS~ on March 15, 2010, 02:17:58 AM
Geez,  Eclipse16V do you EVER bother to read the thread???
Title: Re: Post and Change as Alternate User
Post by: Eclipse16V on March 15, 2010, 03:14:27 AM
Quote from: Dismal Shadow on March 12, 2010, 04:48:18 PM
Quote from: abhibehr on March 12, 2010, 04:01:09 PM
How did you manage to install on RC3?
I use this unofficial
http://www.simplemachines.org/community/index.php?topic=280897.msg2451230#msg2451230
It should work on RC3 as well.

Why not official?
Title: Re: Post and Change as Alternate User
Post by: Arantor on March 15, 2010, 07:57:54 AM
Did you read the thread? You'd have seen that the author hasn't had been around here for a very long time.
Title: Re: Post and Change as Alternate User
Post by: dirtymind on March 19, 2010, 08:45:14 AM
Hi, have a problem with this mod.

My SMF version is 1.1.11

In some boards (not all), when i delete a topic, i can't see any topic.

But if i create a new topic, i see every topic of that board.

I also say that when i don't see any topic, they remain in database but I don't see them
Title: Re: Post and Change as Alternate User
Post by: MaNaRa on May 19, 2010, 08:59:37 PM
thanks a lot to apply to RC3!
I had a lot of time trying to find an alternative and found no ;D
Title: Re: Post and Change as Alternate User
Post by: rocknroller on June 29, 2010, 09:33:17 PM
Quote from: Turk Navy on January 12, 2010, 02:05:05 PM
Since we cant get to the current author of this mod, I can't create an official topic and mod page for it. However, I'll try to provide suupport from this topic as I could.

Post as and Attribute Single Post to Alternate User v2.1
Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip (http://www.oyun-arsivi.net/mods/Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip)
Post.as.and.Attribute.Single.Post.to.Alternate.User_1.1.11.zip (http://www.oyun-arsivi.net/mods/Post.as.and.Attribute.Single.Post.to.Alternate.User_1.1.11.zip)

Quote from: akbora on January 05, 2010, 04:46:20 PM
Is it possible when we post instead of ID, this ID seems login in online list? Thanks
I think it is possible, I'll try this on my free time. :)

Thank you for RC2 update! I have one question. in file post.php i was not change anything because other modification in there and mod work fine. Erorr log is clean.

Can you tell me for what are changes in that file?
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on July 06, 2010, 12:49:18 AM
Getting one error in this..

Highlighted the line which is pulling the error
Quote';
         
if (allowedto('reply_alternate')) {                           
echo '<li><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label>
<label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></li>';
}      

if ($context['user']['is_admin'] && isset($_REQUEST['msg'])) {
echo '<li><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label>
<label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></li>';
}

echo '
                  </ul>
               </div>';

Attached images.

Using RC3 and the "unofficial" update
Title: Re: Post and Change as Alternate User
Post by: C4G-TK on July 09, 2010, 07:43:03 PM
Quote from: C4G-TK on July 06, 2010, 12:49:18 AM
Getting one error in this..

Highlighted the line which is pulling the error
Quote';
         
if (allowedto('reply_alternate')) {                           
echo '<li><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label>
<label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></li>';
}      

if ($context['user']['is_admin'] && isset($_REQUEST['msg'])) {
echo '<li><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label>
<label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></li>';
}

echo '
                  </ul>
               </div>';

Attached images.

Using RC3 and the "unofficial" update

I have four pages of this error in my log even though I haven't actually used it to change anyone's ID.  Anyone know a fix?
Title: Re: Post and Change as Alternate User
Post by: JungleBunny on July 28, 2010, 02:54:00 PM
Thanks, great mod and works fine with RC3 :D :D
But I figured out that the post of the member I posted for is the same than before.

E.g. Poster A has 10 postings I change a thread to poster A than the posting is not 11 it is 10 anymore.
A solution for this?

Thanks
Title: Re: Post and Change as Alternate User
Post by: Robbo_ on July 29, 2010, 02:55:46 AM
Just so you know. I have made a similar mod to this for 2.0. When choosing the user it works like when choosing a user to send a PM to. I don't think there is anything this mod does that mine can't do and mine is supported unlike this one. So.... http://custom.simplemachines.org/mods/index.php?mod=2626
Title: Re: Post and Change as Alternate User
Post by: edi67 on August 10, 2010, 07:23:26 AM
nice mod
Title: Re: Post and Change as Alternate User
Post by: farao25 on June 27, 2011, 12:09:47 PM
any chance for 2.0 Gold support ?
Can i have the link for Post.as.and.Attribute.Single.Post.to.Alternate.User_RC2.zip ? (then one in this topic doesn't exist anymore)
Title: Re: Post and Change as Alternate User
Post by: farao25 on June 28, 2011, 12:37:49 AM
Where can i download Post as and Attribute Single Post to Alternate User v2.1 ? The links in the thread are inactive.
Title: Re: Post and Change as Alternate User
Post by: TheRave on July 21, 2011, 09:09:34 AM
Does anyone have a copy of the 2.1 version left?

The links don't work any more.

Cheers
Title: Re: Post and Change as Alternate User v2.1
Post by: Garou on July 21, 2011, 09:00:25 PM
I had to dig through an zipped up archive of a now dead site but I found it.

Since they frown on attaching modified packages here, Ill post the files.

install.xml
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>Turk Navy:Post as and Attribute Single Post to Alternate User</id>
<version>2.1</version>

<file name="$languagedir/ManagePermissions.english.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['permissionname_reply_alternate'] = 'Can reply as an alternate user';
$txt['permissionhelp_reply_alternate'] = 'Allow user to post as an alternate user.';]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[$txt['changeposterid'] = 'Change Poster/Starter';
$txt['changeposteridno'] = 'Poster ID';
$txt['adminscanpostasaltuser'] = 'Post/Edit As Alternative User';
$txt['adminspostasguestcalled'] = 'Forum Staff';
$txt['adminscanpostasaltuserid'] = 'Alternative User ID';
]]></add>
</operation>
</file>

<file name="$languagedir/ManagePermissions.english-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['permissionname_reply_alternate'] = 'Can reply as an alternate user';
$txt['permissionhelp_reply_alternate'] = 'Allow user to post as an alternate user.';]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.english-uft8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[$txt['changeposterid'] = 'Change Poster/Starter';
$txt['changeposteridno'] = 'Poster ID';
$txt['adminscanpostasaltuser'] = 'Post/Edit As Alternative User';
$txt['adminspostasguestcalled'] = 'Forum Staff';
$txt['adminscanpostasaltuserid'] = 'Alternative User ID';
]]></add>
</operation>
</file>

<file name="$sourcedir/ManagePermissions.php">
<operation>
<search position="replace"><![CDATA[ 'delete' => array(true, 'post', 'modify', 'moderate'),
'modify' => array(true, 'post', 'modify', 'moderate'),]]></search>
<add><![CDATA[ 'delete' => array(true, 'post', 'modify', 'moderate'),
'modify' => array(true, 'post', 'modify', 'moderate'),
'reply_alternate' => array(false, 'post', 'modify', 'moderate'),]]></add>
</operation>
</file>

<file name="$sourcedir/Post.php">
<operation>
<search position="replace"><![CDATA[ // Have admins allowed people to hide their screwups?
if (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member'])
{
$msgOptions['modify_time'] = time();
$msgOptions['modify_name'] = $user_info['name'];]]></search>
<add><![CDATA[ // Have admins allowed people to hide their screwups?
if (time() - $row['poster_time'] > $modSettings['edit_wait_time'] || $user_info['id'] != $row['id_member'])
{
$msgOptions['modify_time'] = time();

if (isset($_POST['postasforumstaff']) && (allowedto('reply_alternate')))
{
// ENSURE ALT USER ID IS AN INTEGER
$staffid = !empty($_POST['staffid']) ? (int) $_POST['staffid'] : 0 ;
// USER ID = 0, POST AS GUEST
if ($staffid == 0)
{
$msgOptions['modify_name'] = addslashes($txt['adminspostasguestcalled']);
} elseif($staffid > 0) {
               
// QUERY DB TO GET NAME OF USER
$dbresult = $smcFunc['db_query']('', "
SELECT member_name
FROM {db_prefix}members
WHERE id_member = {int:staffid}
LIMIT 1",
array(
'staffid' => $staffid,
)
);
               
// FOUND USER WANTING TO POST AS
if ($smcFunc['db_num_rows']($dbresult) != 0)
{
list ($msgOptions['modify_name']) = $smcFunc['db_fetch_row']($dbresult);
$smcFunc['db_free_result']($dbresult);
} else {
// NOPE, DOESNT EXIST (ANYMORE?) SO BE A GUEST
$msgOptions['modify_name'] = addslashes($txt['adminspostasguestcalled']);
}
} else {
// shouldnt have reached here, so proceed as normal post
$msgOptions['modify_name'] = addslashes($user_info['name']);
}
} else {
// proceed as normal
$msgOptions['modify_name'] = $user_info['name'];
}]]></add>
</operation>
</file>

<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="after"><![CDATA[ // If nothing was filled in as name/e-mail address, try the member table.
if (!isset($posterOptions['name']) || $posterOptions['name'] == '' || (empty($posterOptions['email']) && !empty($posterOptions['id'])))]]></search>
<add><![CDATA[ if(isset($_POST['postasforumstaff']) && (allowedto('reply_alternate')))
{
// check variable exists or make it to avoid error
$staffid = !empty($_POST['staffid']) ? (int) $_POST['staffid'] : 0 ;
// default selected, post as guest
if ($staffid == 0)
{
$posterOptions['name'] = $txt['adminspostasguestcalled'];
$posterOptions['id'] = 0;
            $posterOptions['ip'] = '0.0.0.0';
            $posterOptions['email'] = '';
} elseif($staffid > 0) {
// QUERY DB TO GET NAME OF USER
$dbresult = $smcFunc['db_query']('', "
               SELECT id_member
FROM {db_prefix}members
WHERE id_member = {int:staffid}
LIMIT 1",
array(
'staffid' => $staffid,
)
);
               
            // FOUND USER WANTING TO POST AS
            if ($smcFunc['db_num_rows']($dbresult) != 0)
            {
               $posterOptions['id'] = $staffid;           
               $posterOptions['ip'] = '0.0.0.0';
               $posterOptions['email'] = '';
               unset($posterOptions['name']);
               $smcFunc['db_free_result']($dbresult);
               
            } else {
               // NOPE, DOESNT EXIST (ANYMORE?) SO BE A GUEST
               $posterOptions['name'] = $txt['adminspostasguestcalled'];
               $posterOptions['id'] = 0;
               $posterOptions['ip'] = '0.0.0.0';
               $posterOptions['email'] = '';
           
            }
        }else{
            // oops, something should not get this far?
            // proceed as normal
        }
    }]]></add>
</operation>

<operation>
<search position="before"><![CDATA[ // Change the post.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET ' . implode(', ', $messages_columns) . '
WHERE id_msg = {int:id_msg}',
$update_parameters
);]]></search>
<add><![CDATA[ if(isset($_POST['changeposterid']) && $context['user']['is_admin'])
{
//Make sure it is an integer.
$changeposteridno = !empty($_POST['changeposteridno']) ? (int) $_POST['changeposteridno'] : 0 ;

//Should be greater than zero, no negative ids.
if($changeposteridno > 0)
{
//Check if the id exists.
$dbresult = $smcFunc['db_query']('', "
SELECT id_member, member_name, email_address, member_ip   
FROM {db_prefix}members
WHERE id_member = {int:change}
LIMIT 1",
array(
'change' => $changeposteridno,
)
);

         if ($smcFunc['db_num_rows']($dbresult) != 0)
         {
            //Change poster information.
            while ($row = $smcFunc['db_fetch_assoc']($dbresult))
            {
$smcFunc['db_query']('', "
UPDATE {db_prefix}messages
SET id_member = {int:change}, poster_name = {string:mName}, poster_email = {string:email}, poster_ip = {string:ip}
WHERE id_msg = {string:id}
LIMIT 1",
array(
'change' => $changeposteridno,
'mName' => $row['member_name'],
'email' => $row['email_address'],
'ip' => $row['member_ip'],
'id' => $msgOptions['id'],
)
);
            }
            $smcFunc['db_free_result']($dbresult);

//If it is topic, we should modify topic too.
$dbresult = $smcFunc['db_query']('', "
SELECT id_topic
FROM {db_prefix}topics
WHERE id_first_msg = {string:id}
LIMIT 1",
array(
'id' => $msgOptions['id'],
)
);

            //Found it! Change the starter id.
            if ($smcFunc['db_num_rows']($dbresult) == 1)
            {
$smcFunc['db_query']('', "
UPDATE {db_prefix}topics
SET id_member_started = {int:change}
WHERE id_first_msg = {string:id}
LIMIT 1",
array(
'change' => $changeposteridno,
'id' => $msgOptions['id'],
)
);
            }
            $smcFunc['db_free_result']($dbresult);

         }
      }
   }]]></add>
</operation>
</file>

<file name="$themedir/Post.template.php">
<operation>
<search position="replace"><![CDATA[ </ul>
</div>';]]></search>
<add><![CDATA[';

if (allowedto('reply_alternate')) {
echo '<li><label for="check_postasforumstaff"><input type="checkbox" name="postasforumstaff" id="postasforumstaff" value="1" class="check" /> '.$txt['adminscanpostasaltuser'].'</label>
<label for="text_staffid">'.$txt['adminscanpostasaltuserid'].': <input type="text" name="staffid" id="staffid" size="5" /></label></li>';
}

if ($context['user']['is_admin'] && isset($_REQUEST['msg'])) {
echo '<li><label for="check_changeposterid"><input type="checkbox" name="changeposterid" id="changeposterid" value="1" class="check" /> '.$txt['changeposterid'].'</label>
<label for="text_changeposteridno">'.$txt['changeposteridno'].': <input type="text" name="changeposteridno" id="changeposteridno" size="5" /></label></li>';
}

echo '
</ul>
</div>';]]></add>
</operation>
</file>
</modification>


package-info.xml
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>Turk_Navy:Post_as_and_Attribute_Single_Post_to_Alternate_User</id>
<name>Post_as_and_Attribute_Single_Post_to_Alternate_User</name>
<version>2.1</version>
<type>modification</type>

<install>
<readme parsebbc="true">readme.txt</readme>
<modification>install.xml</modification>
</install>

<uninstall>
<modification reverse="true">install.xml</modification>
</uninstall>
</package-info>


readme.txt
[center][b][color=red][size=14pt]Post as and Attribute Single Post to Alternate User v2.1[/size][/color][/b][/center]
[center]By [b][url=http://custom.simplemachines.org/mods/index.php?action=profile;u=40245]Turk Navy[/url][/b][/center]
[hr]
[center][url=http://www.simplemachines.org/community/index.php?topic=280897.0]Support topic[/url] | [url=http://custom.simplemachines.org/mods/index.php?mod=1554]Link to Mod[/url]
[color=red]Note: Refers to the last incarnation of the mod and will be updated once new support boards and downloads are set up.[/color][/center]
[hr]

[b][color=blue][size=10pt]Introduction:[/size][/color][/b]
This mod consists of two parts.
Post as alternate user, allows members with the assigned permission to post and edit posts as if they are another forum user.

Attribute posts to another user, allows admins to assign ownership of a particular post to another user.

[b][color=blue][size=10pt]Features:[/size][/color][/b]
To post or edit a post as an alternate user click on "Additional Options..." below the post box area, there will be a check box for "Post/Edit As Alternative User" and a box to enter "Alternative User ID:". Make sure the check box is checked and then enter either the user ID of an existing user to post as that user or enter "0" to post as guest Forum Staff.

To edit an existing post and change the author to another existing forum member click on Additional Options... below the post box area, there will be a check box for "Change Poster/Starter" and a box to enter "Poster ID:". Make sure the check box is checked and then enter the user ID of an existing user and the author of the post will be changed to that of a user you chose. [color=red]Note: The UserID you enter must be that of a valid/existing user. You can not attribute the post to a guest or no user.[/color]

To find the ID number of a user go to their profile and look at the URL or link eg.../index.php?action=profile;u=1 "u=some number" the number is the user id of the member.

To set the permission to post and reply as an alternate user edit the permissions for a particular group and under the settings for "Posts", check the box for "Can reply as an alternate user".

The ability to change the author of an existing post is currently an admin only permission and can not be set for another group.

[b][color=blue][size=10pt]Installation:[/size][/color][/b]
To install, simply upload the entire zip file to the package manager (Admin -> Package Manager -> Download New Packages).

To install on a custom theme, please refer to the package parser and manually apply the changes for ./Themes/default/... to  ./Themes/your custom theme/...


[b][color=blue][size=10pt]Compatibility:[/size][/color][/b]
Tested under SMF Versions 1.1.11 and 2.0 RC2

[b][color=blue][size=10pt]Credits:[/size][/color][/b]
Special thanks to all the people who have worked on this mod (in some version) in the past...
[url=http://custom.simplemachines.org/mods/index.php?action=profile;u=63186]karlbenson[/url], [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=118168][SiNaN][/url], [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=194815]BK-S-M-F Modding Team[/url] aka. [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=150637]BurkeKnight[/url], and [url=http://custom.simplemachines.org/mods/index.php?action=profile;u=207533]TheDeath[/url].

And also special thanks to [url=http://www.simplemachines.org/community/index.php?action=profile;u=60251]Garou[/url] who prepared this excellent readme file and supported this mod.

[b][color=blue][size=10pt]Change log:[/size][/color][/b]
[b]Version:2.1[/b] Date: October 22, 2009
* Mod taken over by Turk Navy
! Some minor bug fixes
* Updated to support SMF version 2.0 RC2

[b]Version:2.0[/b] Date: June 25, 2009
* Mod updated to support 2.x versions of SMF by TheDeath

[b]Version: 1.5[/b] Date: December 10, 2008
* Change Poster Of Message And Topic & Post As An Alternative User mods taken over by BK-SMF.
+ Both Mods combined for use with SMF 1.1 to prevent conflicts between the two.

[i]All previous incarnations of this mod were created and supported by karlbenson and/or [SiNaN] [/i]

[b]Legend:[/b]
! bug fix
+ added feature
* changed
> Comment
Title: Re: Post and Change as Alternate User
Post by: Garou on July 21, 2011, 09:03:03 PM
Note that was working on an RC5 site so it should work on 2.0 Gold
Title: Re: Post and Change as Alternate User
Post by: Biology Forums on November 09, 2011, 09:50:44 PM
Excellent Mod, BK Modding Team, just wish rather than adding the #1, we could add the actual name.
Title: Re: Post and Change as Alternate User
Post by: floydpink on July 11, 2012, 08:38:14 AM
A couple of enhancements if anyone's interested:
SMF 1.1.16

Add one to alternate member's poster count
sources/subs-post.php
Find
while ($row = mysql_fetch_assoc($request))
{
db_query("
UPDATE {$db_prefix}messages
SET ID_MEMBER = ".$changeposteridno.", posterName = '".$row['memberName']."', posterEmail = '".$row['emailAddress']."', posterIP = '".$row['memberIP']."'
WHERE ID_MSG = $msgOptions[id]
LIMIT 1", __FILE__, __LINE__);
}
mysql_free_result($request);

Add after

// Floydpink INSERT - Add one to poster's post count
updateMemberData($changeposteridno, array('posts' => '+'));


Don't update ip address of modified post to that admin's IP
sources/subs-post.php
Find
while ($row = mysql_fetch_assoc($request))
{
db_query("
UPDATE {$db_prefix}messages
SET ID_MEMBER = ".$changeposteridno.", posterName = '".$row['memberName']."', posterEmail = '".$row['emailAddress']."', posterIP = '".$row['memberIP']."'
WHERE ID_MSG = $msgOptions[id]
LIMIT 1", __FILE__, __LINE__);
}
mysql_free_result($request);

Replace with
while ($row = mysql_fetch_assoc($request))
{
db_query("
UPDATE {$db_prefix}messages
SET ID_MEMBER = ".$changeposteridno.", posterName = '".$row['memberName']."', posterEmail = '".$row['emailAddress']."'
WHERE ID_MSG = $msgOptions[id]
LIMIT 1", __FILE__, __LINE__);
}

Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on July 11, 2012, 08:48:24 AM
Quote from: floydpink on July 11, 2012, 08:38:14 AM
A couple of enhancements if anyone's interested:
SMF 1.1.16

Looks great! I may add it when we get working on the updates.
Title: Re: Post and Change as Alternate User
Post by: Kimmie on July 24, 2012, 03:33:36 AM
Mod page shows this was updated July 11, 2012 but it is still only showing as compatible with version 1.1.7 and it will not parse past that version. When will it be fully upgraded to support 2.0?
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on July 24, 2012, 05:30:33 AM
We are still researching the 2.x line. Most of the BK Modding Team has been away for a few years. I for one had been completely offline for that time. So far, we managed to get the 1.x version mods updated, now we need to get used to the changes in the 2.x SMF system before we can get to updating. Hopefully, that will be soon.
HTMLstig and I are also very busy off-line, so things may be a little slower than before. We apologize for any inconvenience. Any coder that would like to help out and maybe join the BK Modding team, can PM me here and we'll talk.
Title: Re: Post and Change as Alternate User
Post by: Kimmie on July 24, 2012, 02:36:53 PM
No problem, just wanted to get clarification on it. :). Thanks for continuing to work on them.
Title: Re: Post and Change as Alternate User
Post by: Ron Austin on November 01, 2012, 11:27:06 AM
I could really use this mod for 2.02.  I have been searching and see that several people have worked on it and then stopped.  What's the status?  Can I get this mod for 2.02?
Title: Re: Post and Change as Alternate User
Post by: Burke ♞ Knight on July 15, 2013, 01:17:01 PM
If anyone has updated this for their own use to SMF 2.0 line, please PM me, so we can discus posting it and giving credit. Otherwise, it may take a while to get this mod updated, due to the changes involved between 1.x and 2.x lines.





If need support for this mod, please go to BurkeKnight Enterprises (http://www.burkeknight.com/) and register there.

We have a support ticket system for mod support.

We will no longer be supporting this mod here at the SMF site,
as we feel it is easier to keep all support at our site.