Post and Change as Alternate User by BurkeKnight Enterprises

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

Previous topic - Next topic

Garou

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.

Kimmie

any way we can get this for 2.0 RC1.2?

Garou

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.

Kimmie

#83
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

Garou

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.

Kimmie

#85
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. 

Garou

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

Kimmie

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

qubbah

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?

Garou

hmmm It looks like you are trying to have this mod as well as Change All Subjects, 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.

PalmBeachPreps

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!!!

futeball

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.

Garou

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?

flamechica


Garou

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.

flamechica

That would be great, because I use this mod a TON and really need it for RC2

PalmBeachPreps


Turk Navy


Garou

#98
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.

Turk Navy

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.

Advertisement: