Post and Change as Alternate User by BurkeKnight Enterprises

Started by Burke ♞ Knight, December 18, 2008, 12:22:17 AM

Previous topic - Next topic

Cal O'Shaw

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.

Garou

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  :)

Cal O'Shaw

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

TheDeath

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

Cal O'Shaw

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.

Cal O'Shaw

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

Garou

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.  :-[

Cal O'Shaw

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

Garou

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.

TheDeath

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.  ::)

Cal O'Shaw

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

Garou

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

TheDeath

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.

Garou

Sweet!!! I cant wait to see this mod back in capable hands. Anything you need let me know.  :)

Cal O'Shaw

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

Garou

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.  :)

C4G-TK

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.

-img removed-

Garou

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. :)

Kimmie

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

Garou

I just installed this mod on a fresh copy of 1.1.9 and 1.1.10, it installs perfectly.

Advertisement: