Admins Can Post As Alternative User

Started by karlbenson, October 14, 2007, 04:31:47 PM

Previous topic - Next topic

karlbenson



Admins Can Post As Alternative User v1.0
By Karl Benson



Introduction
Sometimes being an admin involves doing things like laying down the law.
Admins may therefore find it preferential to post as a 'Third Person'.

Or you may want all official posts by admins to be by Forum Staff.

Features
Admin Area -> Features and Options -> Basic Settings
- Enter ID of user that administrators wish to post as (0 = Guest called "Forum Staff") otherwise enter eg 582.
I'd advise you to create a new membergroup called Administrator, so they the user can have the title of Administrator, but NOT the privileges.

Adds a new setting to the Additional Options when posting/editing topics/replies/polls.
Check the setting to have the post appear as by your selected user (and edited by them aswell).

Note: It does NOT cover PM's.

Installation
Simply install the package to install this modification on the Default theme.

This version is compatible with SMF 1.1.x versions only.

Manual Edit
Installs automatically on Default theme and any theme that do not use a custom post.template.php

For any non-default themes with a custom post.template.php you will need to manually edit the theme.
For help see Manual Installation Of Mods

If your using a language different than the ones supported this mod (listed below), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)

FIND
?>
ADD BEFORE (and translate as necessary the language strings)
$txt['adminscanpostasaltuser'] = '*Admins Only*: Post/Edit As Selected Alternative User';
$txt['adminspostasguestcalled'] = 'Forum Staff';
$txt['adminscanpostasaltuserid'] = 'User ID of user which admins can post as<br/><div class="smalltext">(0 or blank = posts as a guest called \'Forum Staff\')</div>';

If your using utf8 encoding then you will need to also make the alteration to Modifications.{language}-utf8.php

Languages
o Supports
- English/English-utf8
I welcome translations for any other languages which SMF Supports.
Please translate the following and send them to me via the mods support topic or via pm.
(I would be grateful if you could translate for both standard and for UTF-8 aswell).
$txt['adminscanpostasaltuser'] = '*Admins Only*: Post/Edit As Selected Alternative User';
$txt['adminspostasguestcalled'] = 'Forum Staff';
$txt['adminscanpostasaltuserid'] = 'User ID of user which admins can post as<br/><div class="smalltext">(0 or blank = posts as a guest called \'Forum Staff\')</div>';


Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 8th October 2007
o Re-packaged this beta mod I posted back in July but never submitted formerly to SMF site.

L.G.S

#1
Great mod.

Question though.

Does it change sigs, avatar, info, etc in the post as well? And the only way to be able to know who it is through IP?

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


karlbenson

#2
It actually changes the posters ID.

So which ever 'user id' is used, it will use their info.
For security purposes the IP will show the actual IP (to prevent admins pretending to be User X) [there will be at least that trace]

If no user id or 0 is used or an id to a user who doesnt exist,
it will post as a guest called "Forum Staff" (with a blank ip) (and no poster avatar/signature etc)

MinasC


MinasC


karlbenson


L.G.S

Heh when I post the IP is 0.0.0.0, even better :D
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Rumbaar

Interesting mod.  Can you 'impersonate' any member of the forum, I wouldn't want some unscrupulous admin posting stuff in the name of someone else....

What's the point of power if you can't abuse it ;) :D :P
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

karlbenson

It will always be obvious to admins that someone has used this functionality as the IP will always be 0.0.0.0

This is one reason why the variable is set in the admin area rather than on a per-post basis.

The potential for abuse is a reason why its limited to admins and also why any subsequent edits show edited by the real user.

Rumbaar

Yes but when I said 'unscrupulous admin', I meant an actually admin of a board performing the impersonating of other board members.   As a joke or as a form of attack to discredited a member of their board.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

karlbenson

Indeed.
An admin could fool members.

I don't plan on adding extra functionality to this mod in the near future at least (other than bug fix).
But if I did I may look at creating a fake user rather than allowing to post as anyone.

gh0stw4lk3r

great mod, would it be possible to make this admins and moderators? instead of admin only?

karlbenson

Definately not. As stated above, it would be subject to abuse.

I've been very cautious about letting admins do it, never mind moderators.

gh0stw4lk3r

Quote from: karlbenson on October 18, 2007, 10:48:42 AM
Definately not. As stated above, it would be subject to abuse.

I've been very cautious about letting admins do it, never mind moderators.

no problem Karl , i already edited the code so my mods can post as the assigned person ( which only i can set).

I now have a "crew" account which all mods and admins can post as.
I thought this would be usefull for my board as we have a group of people who don't take advantage of this function ;)

tnx anyway for the answer

karlbenson

as i posted above, I don't plan on adding extra functionality to this mod in the near future
but IF I create a 'staff' account where it would be impossible for 'pretending' to be other users, then maybe i would add a permission.

For the moment I'm far too busy with my other mods to have a look at this one (except for bug fixing)

MinasC

here's the greek translation :

$txt['adminscanpostasaltuser'] = '*Μόνο Διαχειριστές*: Δημοσίευση/Τροποποίηση ως κάποιος εναλλακτικός επιλεγμένος χρήστης';
$txt['adminspostasguestcalled'] = 'Προσωπικό του Φόρουμ';
$txt['adminscanpostasaltuserid'] = 'Η ταυτότητα του χρήστη με την οποία οι διαχειριστές μπορούν να κάνουν δημοσιεύσεις<br/><div class="smalltext">(0 ή κενό = δημοσιεύετε ως φιλοξενούμενος με το όνομα \'Προσωπικό του Φόρουμ\')</div>';

angelsluver

i love this mod!

but there is a problem when i try to install it.

6.     Execute Modification     ./Themes/default/languages/Modifications.english-utf8.php     Test failed


i could use some help. i have limited knowledge in coding.

karlbenson

Open the file
./Themes/default/languages/Modifications.english-utf8.php

Is it a blank file?
  If it is, Open ./Themes/default/languages/Modifications.english.php and copy everything into that file.
Then try to install the mod.

If the file isnt blank
Make sure <?php is at the very top of the file (on its own line)
and make sure ?> is at the very bottom of the file (on its own line)

STronicPT

#18
Quote from: gh0stw4lk3r on October 18, 2007, 11:00:33 AM
Quote from: karlbenson on October 18, 2007, 10:48:42 AM
Definately not. As stated above, it would be subject to abuse.

I've been very cautious about letting admins do it, never mind moderators.


no problem Karl , i already edited the code so my mods can post as the assigned person ( which only i can set).

I now have a "crew" account which all mods and admins can post as.
I thought this would be usefull for my board as we have a group of people who don't take advantage of this function ;)

tnx anyway for the answer

hi! What do you do to moderatores have permissions to use this MOD ??

thanks

L.G.S

I'd like to know two things.

One: What would I have to do to get the checkboxes on the quick reply as well? Like just under the post button.

Two: Can I double this mod, as in have two buttons for two different members like member 1 and member 2? That would be a great thing in my eyes.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Advertisement: