PDA

View Full Version : Allow Your Users to Post Anonymously Without Logging Out


amykhar
03-19-2005, 10:00 PM
When I released my Post As Anonymous Mod Hack (now obsolete), many users wanted the ability to allow ANY user to post anonymously. This hack fulfils that request.

It is a VERY long and difficult hack to install. Therefore, I have written the instruction file radically different than any I have ever written before. This one is written in discrete steps. Rather than having you blindly edit files and hope everything works when it's done, I have you do the hack in steps and TEST each step.

IF YOU DO NOT KNOW HOW TO CODE, I SUGGEST YOU POST A SERVICE REQUEST AND ASK SOMEBODY TO INSTALL THIS FOR YOU.

Features:
A. Control anonymous posting at the board, forum, usergroup, and user level.

This means that you can use the anonymous posting in any combination that you can use features such as allowing users to reply to posts.

B. Users can post anonymously, but still subscribe to the thread.

C. You can set the anonymous username per usergroup. For example, Admins can post as Anonymous Admin, while regular users post as Anonymous Registered Member.

D. Mods and Admins can see who truly posted.

E. Users can see their name on their own anonymous post.

F. The "edited by" message does not show on anonymous posts.

G. Lastposter works properly.

H. Search will not pull up a user's anonymous posts under their name. But, you can search for all anonymous posts.

I. Anonymous posts are marked so that you don't forget the post is anonymous and "out" yourself.

J. Anonymous posts can be safely quoted.

I will not support this hack for any version of vbulletin other than 3.0.7.

amykhar
03-20-2005, 04:24 AM
1. When I post anonymously, the user name section in the postbit is blank.

Make sure you set an Anonymous Name in the user group settings page of the admincp. Each user group can be set to use a different display name.

Brent H
03-20-2005, 05:20 AM
Excellent work :) I may have a use for this once I get another site going, since I merged with a friend to cut costs for a while. What are the chances being able to put the "Post Anonymously" checkbox on the actual newthread and newreply pages instead of as an option in the profile?

hate
03-20-2005, 05:24 AM
I may install this as well, I have been watching for the confession hack but there is no est on when it will be released, and this seems like it could do the same thing.

BarHopper
03-20-2005, 07:43 AM
An extremely good and extensive instruction text. If only they were all like this :)

sabret00the
03-20-2005, 11:03 AM
wow another one, thank you very much amy :)

amykhar
03-20-2005, 12:29 PM
Excellent work :) I may have a use for this once I get another site going, since I merged with a friend to cut costs for a while. What are the chances being able to put the "Post Anonymously" checkbox on the actual newthread and newreply pages instead of as an option in the profile?
The option is a checkbox on each post that you make or edit. It's not a checkbox in the profile. The profile field is to allow the admins to set that a user can't post anonymously - sort of like an access mask.

amykhar
03-20-2005, 12:30 PM
An extremely good and extensive instruction text. If only they were all like this :)
Thank you. I was worried people would hate it because it does take a bit longer to install this way. But, I felt the complexity of this one warranted a bit of extra time and care on installation.

amykhar
03-20-2005, 12:32 PM
I may install this as well, I have been watching for the confession hack but there is no est on when it will be released, and this seems like it could do the same thing.
Yep. It was designed with the confession request in mind. With this one, you can control specific forums that are allowed to have anonymous posts. It's not an all or nothing kind of thing like the post as anonymous moderator one was.

Lionel
03-20-2005, 09:21 PM
I have one question. I am using the warning hack. If a registered user posts anonymously, can that user still be warned?

amykhar
03-20-2005, 09:24 PM
I am not sure what the warning hack is or how it works.

Lionel
03-20-2005, 09:25 PM
ok, let me rephrase that. Does the system still know who the real usename and userid is?

Lionel
03-20-2005, 10:01 PM
I am stucked at step 4. The default permission in a forum allowed for an allowed usergroup shows no. Here are my last bitfields line.

'canbet' => 4194304,
// --- vBookie
'canpostanon' => 8388608,

and

'warnall' => 131072,
'allowanon' => 262144

I also tried without the comma at the end of 8388608

amykhar
03-20-2005, 10:06 PM
ok, let me rephrase that. Does the system still know who the real usename and userid is?
Yes, it does. It's stored in the postanon and anonname field of the post.

Lionel
03-20-2005, 10:14 PM
Thanks. I have been installing since there was a global on/off switch... but I am stucked ...

amykhar
03-20-2005, 10:15 PM
I am stucked at step 4. The default permission in a forum allowed for an allowed usergroup shows no. Here are my last bitfields line.

'canbet' => 4194304,
// --- vBookie
'canpostanon' => 8388608,

and

'warnall' => 131072,
'allowanon' => 262144

I also tried without the comma at the end of 8388608
My bad. That's an error in the install file, which I shall now correct. Change canpostanon to candoanon.

Lionel
03-20-2005, 10:19 PM
is there more than one instance to change it?
'candoanon' => 8388608

is not doing it.

never mind... I had unselected the usergroup when I encountered the problem

amykhar
03-20-2005, 10:25 PM
I finished writing this thing in the wee hours of the morning. Hopefully, there won't be any more brain farts in the install instructions.

Lionel
03-21-2005, 01:05 AM
I am stucked at step 5. I am logged in as admin with anon permissions, trying to post in an allowed forum, did the new template part (step o) , added $postanonoption in newthread template, yet when testing, I cannot see the option.

Lionel
03-21-2005, 01:15 AM
Actually, the whole block in newthread about disablesmilies, vbookie, post poll disappeared?????

Lionel
03-21-2005, 01:24 AM
I got them back, except for your option

Lionel
03-21-2005, 01:47 AM
It's actually step 6. You have two steps 6. It's the first one.

amykhar
03-21-2005, 01:55 AM
Make sure you changed your fieldx to use the user field that you created. If not, that won't work. Also, make sure the forum you are posting in is set to allow anonymous posting, that the board as a whole is set to allow it and the other permisisons. If any of those are set off (which could have happened during testing) the checkbox won't show.

amykhar
03-21-2005, 01:56 AM
p.s. I am very happy that you are testing incrementally as advised. That makes helping you much, much easier. Thank you.
Amy

Lionel
03-21-2005, 01:57 AM
Make sure you changed your fieldx to use the user field that you created. If not, that won't work. Also, make sure the forum you are posting in is set to allow anonymous posting, that the board as a whole is set to allow it and the other permisisons. If any of those are set off (which could have happened during testing) the checkbox won't show.

this is what I have

if (($forumperms & CANDOANON) AND ($bbuserinfo[field14]=='yes') AND $vboptions['candoanon'] AND $foruminfo['allowanon'])
{
eval('$postanonoption = "' . fetch_template('newpost_postanon') . '";');
}
else
{
$postanonoption = "";
}

amykhar
03-21-2005, 02:01 AM
OK. The code looks fine. Check the permissions for the board, forum, and usergroup and user and make sure you didn't set the forum to use custom permissions for your usergroup in that forum. Yes, I know this part is a pain to set up ininitally, just like all the other vbulletin permissions, but it really does give you a lot of flexibility later.

Lionel
03-21-2005, 02:06 AM
I appreciate your help. Thank you very much.

In specific forum, allow anonymous posting is on
the usergroup admin has permission to post as anonymous and it is also set as default in that forum permissions

amykhar
03-21-2005, 02:11 AM
Dumb question. Is the new template available in the style you are testing in?

amykhar
03-21-2005, 02:13 AM
If it is, just for giggles, take this code if (($forumperms & CANDOANON) AND ($bbuserinfo[fieldx]=='yes') AND $vboptions['candoanon'] AND $foruminfo['allowanon'])

{

eval('$postanonoption = "' . fetch_template('newpost_postanon') . '";');

}

else

{

$postanonoption = "";

}

to this: eval('$postanonoption = "' . fetch_template('newpost_postanon') . '";');

Do this just for testing. If it works there, we have a permissions glitch. If it doesn't work there, something else is going on.

Lionel
03-21-2005, 02:15 AM
Yes it is available. Problem is somehow permissions related, because when I do $postanonoption="whatever"; instead of $postanonoption="";
whatever is displayed below the smilies

Lionel
03-21-2005, 02:18 AM
Did your test. That confirm it is the permissions by displaying the template in showthread

amykhar
03-21-2005, 02:18 AM
I appreciate your help. Thank you very much.

In specific forum, allow anonymous posting is on
the usergroup admin has permission to post as anonymous and it is also set as default in that forum permissions
But what about at the board level? In vbulletin options. Also, what about the user level? Did you set that to no for your account when you were testing? The variables all look exactly right as they do when running on my test board, so I don't think I have another install file glitch going.

In vbulletin options, it's off by default. That has to be turned on. Probably something I should change in the setup of those options.

Amy

Lionel
03-21-2005, 02:22 AM
at the board level the global option is set to yes.
at the user level also

500 was taken, so I made the settings 480 but I don't think that would cause problem, in instructions it says I could.

amykhar
03-21-2005, 03:09 AM
OK. Lionel and I went to PM and figured out that problem. I had a variable name mistyped in step 3. I have fixed the install instructions.

Lionel
03-21-2005, 03:13 AM
yup, works great so far... now up to step 7 :-)

Lionel
03-21-2005, 05:02 AM
Looks like all bugs were squashed. Thanks for the help.
This hack is great. I got a bunch of "shy" members. That should help. I also like the fact that admin can see the real poster, with a mention that post was made anonymously, and the fact that you still can warn the real user if you are using the warning hack.

Challenge
03-21-2005, 07:06 AM
What about some pics of postbit?

lordnex
03-21-2005, 12:04 PM
I have a question about a possible request for this...
Is there a chance you could set an entire forum to be "anonymous" only? there's a spot to click if it's allowed but what about being forced?

Fantastic hack though!

amykhar
03-21-2005, 12:10 PM
I have a question about a possible request for this...
Is there a chance you could set an entire forum to be "anonymous" only? there's a spot to click if it's allowed but what about being forced?

Fantastic hack though!
Lordnex, let me ensure all the bugs are squashed in the install instructions please before I start thinking about changes.

amykhar
03-21-2005, 01:37 PM
OK. If you've already installed, there is a query you need to run to update your existing users to set their permissions to 'yes'.

Make sure to change fieldx to use the custom field number you chose. Use the table prefix as necessary.

UPDATE userfield set fieldx='yes';

amykhar
03-21-2005, 01:41 PM
What about some pics of postbit?
OK. I added one to the first post

https://vborg.vbsupport.ru/attachment.php?attachmentid=24951

Lionel
03-21-2005, 01:46 PM
:up: :up: Hack works as described. You people don't cease to amaze me. Every time I think that vb has been hacked out totally, you keep on coming up with something very useful...

amykhar
03-21-2005, 04:37 PM
A long time ago, one of my members took the avatar I was using and modified it. I got to looking at it today and realized it would be the perfect avatar to use with your anonymous user account. I am posting it here just in case you would like to use it.

Leah
03-23-2005, 09:24 AM
Yes it is available. Problem is somehow permissions related, because when I do $postanonoption="whatever"; instead of $postanonoption="";
whatever is displayed below the smilies
I'm having the same problem.

Leah
03-23-2005, 10:13 AM
I'm having the same problem.
Nevermind.
I seem to have missed step 5b. :)

adielsh
03-24-2005, 08:37 AM
I arrive to strp 6 i finish this step and i try to test
and this what i recived
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/borecas/domains/borecas.net/public_html/forum/includes/functions_newpost.php on line 420
and now i can't to write message
pliz help me

nexialys
03-24-2005, 10:26 AM
can you add a feature or two if i don't add them myself?!:
1- admins can see the users realname and userid with link-redirect to their profile...
2- a tag on forumlist to display where we can post as anonymous

... this hack is just great for most boards ...

adielsh
03-24-2005, 10:46 AM
I arrive to strp 6 i finish this step and i try to test
and this what i recived
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/borecas/domains/borecas.net/public_html/forum/includes/functions_newpost.php on line 420
and now i can't to write message
pliz help me
never mind i found the problem but why i can't writ anonymi when i use administration user?

Greebo
03-24-2005, 02:38 PM
Great hack so far - I'm on step 7 now - but one omission in your instructions:

Step 6r is missing instructions to upload showthread.php -- took me a while to figure out why I couldn't see who I was posting as when logged in as my admin account. :)

amykhar
03-24-2005, 03:35 PM
can you add a feature or two if i don't add them myself?!:
1- admins can see the users realname and userid with link-redirect to their profile...
2- a tag on forumlist to display where we can post as anonymous

... this hack is just great for most boards ...
The first thing you requested is built into it.

amykhar
03-24-2005, 03:36 PM
never mind i found the problem but why i can't writ anonymi when i use administration user?
You have to enable it for the user group that you want to be allowed to use it. You also have to run that query to update the permissions of existing users.

amykhar
03-24-2005, 03:37 PM
Great hack so far - I'm on step 7 now - but one omission in your instructions:

Step 6r is missing instructions to upload showthread.php -- took me a while to figure out why I couldn't see who I was posting as when logged in as my admin account. :)
Thank you. I'll fix that in a few minutes.

Greebo
03-24-2005, 04:27 PM
This is an excellent hack! I really needed this for my forums. Can I make a contribution?

I do have one question tho - for some reason my "anon" post still shows my avatar to me - but others see the avatar I specified (I liked the eyes listed above). What am I missing?

amykhar
03-24-2005, 05:16 PM
You should be seeing your own user profile - avatar and all. But, others should see the profile for the anon user. So, what you are describing is how it should work.

Greebo
03-24-2005, 05:38 PM
Ok your statements:
ALTER TABLE `post` ADD `postanon` TINYINT( 4 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `post` ADD `anonname` VARCHAR( 50 ) NOT NULL ;
ALTER TABLE `forum` ADD `postanon` TINYINT( 4 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `forum` ADD `anonname` VARCHAR( 50 ) NOT NULL ;
ALTER TABLE `thread` ADD `postanon` TINYINT( 4 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `thread` ADD `anonname` VARCHAR( 50 ) NOT NULL ;

Should *NOT* be TINYINT.

My tester account user id is 257 but its being changed to 127 because the column is too small. Change it to standard int :)

Greebo
03-24-2005, 05:56 PM
Should users who have posted anonymously be able to edit their anonymous post?

My test account sees the edit button, but gets a permissions error when attempting to edit. However, if my admin account goes in to edit, it works.

I'm guessing there's a test in editpost thats not taking anonymity into account? Or is this intended?

Greebo
03-24-2005, 06:13 PM
Ok, here's what I ended up doing to make this work:

In editpost.php I replaced:
if ($bbuserinfo['userid'] != $postinfo['userid'])
{
// check user owns this post
print_no_permission();
}
else
{
// check for time limits
if ($postinfo['dateline'] < (TIMENOW - ($vboptions['edittimelimit'] * 60)) AND $vboptions['edittimelimit'] != 0)
{
eval(print_standard_error('error_edittimelimit'));
}
}

With

if ($postinfo['postanon'])
{
if ($bbuserinfo['userid'] != $postinfo['postanon'])
{
// check user owns this post
print_no_permission();
}
}
else
{
if ($bbuserinfo['userid'] != $postinfo['userid'])
{
// check user owns this post
print_no_permission();
}
}
// check for time limits
if ($postinfo['dateline'] < (TIMENOW - ($vboptions['edittimelimit'] * 60)) AND $vboptions['edittimelimit'] != 0)
{
eval(print_standard_error('error_edittimelimit'));
}


Hope that helps if anyone else is having this issue. I suspect the install instructions just missed a step here...unless I missed them but I checked several times. :)

amykhar
03-24-2005, 07:03 PM
Ok your statements:
ALTER TABLE `post` ADD `postanon` TINYINT( 4 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `post` ADD `anonname` VARCHAR( 50 ) NOT NULL ;
ALTER TABLE `forum` ADD `postanon` TINYINT( 4 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `forum` ADD `anonname` VARCHAR( 50 ) NOT NULL ;
ALTER TABLE `thread` ADD `postanon` TINYINT( 4 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `thread` ADD `anonname` VARCHAR( 50 ) NOT NULL ;

Should *NOT* be TINYINT.

My tester account user id is 257 but its being changed to 127 because the column is too small. Change it to standard int :)
Doh. Can't believe I did the tinyint thing. I'll change the directions right now.

amykhar
03-24-2005, 07:05 PM
Ok, here's what I ended up doing to make this work:

In editpost.php I replaced:
if ($bbuserinfo['userid'] != $postinfo['userid'])
{
// check user owns this post
print_no_permission();
}
else
{
// check for time limits
if ($postinfo['dateline'] < (TIMENOW - ($vboptions['edittimelimit'] * 60)) AND $vboptions['edittimelimit'] != 0)
{
eval(print_standard_error('error_edittimelimit'));
}
}

With

if ($postinfo['postanon'])
{
if ($bbuserinfo['userid'] != $postinfo['postanon'])
{
// check user owns this post
print_no_permission();
}
}
else
{
if ($bbuserinfo['userid'] != $postinfo['userid'])
{
// check user owns this post
print_no_permission();
}
}
// check for time limits
if ($postinfo['dateline'] < (TIMENOW - ($vboptions['edittimelimit'] * 60)) AND $vboptions['edittimelimit'] != 0)
{
eval(print_standard_error('error_edittimelimit'));
}


Hope that helps if anyone else is having this issue. I suspect the install instructions just missed a step here...unless I missed them but I checked several times. :)
Good catch. Editing has been the bane of my existance from day one. I'll test your tweaks and see how it goes on my test board.

adielsh
03-24-2005, 09:30 PM
You have to enable it for the user group that you want to be allowed to use it. You also have to run that query to update the permissions of existing users.
I enable the permission of the administarator user group to write anonymous
and i run all query and it dosn't work, all user group can write as anonymous but only administarator user group can't
mybe i don't run right the query which query i need to run for the administarator user group?

amykhar
03-24-2005, 10:03 PM
The query at the end updates the permissions for all user groups. You're going to have to double check your permission settings at every level. There is no difference in the code between admins and any other user group. If it works for one, it works for all if you have your settings correct.

Greebo
03-25-2005, 09:36 AM
I just want to thank you again for developing this hack!! This is working great so far!

Greebo
03-28-2005, 03:49 PM
Ok, the modification to editpost.php has a logic error in it.

You test two conditions in a nested double test:
Was post made anon?
- Yes
-- was it anon before?
---Yes set a bunch of vars incl $threadupdate
---No set a bunch of vars incl $threadupdate
- No
-- was it anon before?
---Yes set a bunch of vars incl $threadupdate
---No set a bunch of vars incl $threadupdate

Then you later have logic twice to update the thread
// if (!empty($threadupdate))

$threadupdate will never be empty in either case.

Net effect: When a thread is posted and someone replies to it and then edits their reply, thread.postusername and thread.postuserid are overwridden inappropriately and the 2nd threadupdate . Thread should only be updated with anon/real user names and IDs if the OP is edited.


This is the change I made to the entire code set of editpost.php following delete_post_index($postid);

// The post is made anonymously
if ($edit['postanon'])
{
// Check to see if it was made anonymously BEFORE the edit
if ($postinfo['postanon'])
{
$edit['postusername']= $postinfo['username'];
$edit['userid'] = $postinfo['userid'];
$edit['postanon'] = $postinfo['postanon'];
$edit['anonname'] = $postinfo['username'];
if($threadinfo[firstpostid] == $postinfo[postid])
{
$threadupdate[] = "postusername = '" . addslashes(htmlspecialchars_uni($edit['postusername'])) . "',anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
$forumupdate = "anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
// If not, we need to set the values.
else
{
// This isn't exactly right. But, most times, it will work.
$edit['postusername']= $usergroupcache["$bbuserinfo[usergroupid]"]['anonname'];
$edit['postusername']= $threadinfo[postusername];
$edit['userid'] = 256;
$edit['postanon'] = $postinfo['userid'];
$edit['anonname'] = $postinfo['username'];
if($threadinfo[firstpostid] == $postinfo[postid])
{
$threadupdate[] = "postusername = '" . addslashes(htmlspecialchars_uni($edit['postusername'])) . "',anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
$forumupdate = "anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
}
// The post is no longer made anonymously
else
{
// Check to see if it was made anonymously BEFORE the edit.
if ($postinfo['postanon'])
{
$edit['postusername']= $postinfo['anonname'];
$edit['userid'] = $postinfo['postanon'];
$edit['postanon'] = 0;
$edit['anonname'] = "";
if($threadinfo[firstpostid] == $postinfo[postid])
{
$threadupdate[] = "postusername = '" . addslashes(htmlspecialchars_uni($edit['postusername'])) . "',anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
$forumupdate = "anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
else
{
$edit['postanon'] = 0;
$edit['anonname'] = "";
$edit['userid'] = $postinfo['userid'];
$edit['postusername'] = $postinfo['username'];
if($threadinfo[firstpostid] == $postinfo[postid])
{
$threadupdate[] = "postusername = '" . addslashes(htmlspecialchars_uni($edit['postusername'])) . "',anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
$forumupdate = "anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
}
if (!empty($threadupdate))
{
// do thread update
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET " . implode(', ', $threadupdate) . "
WHERE threadid = $threadinfo[threadid]
");
}
if ($foruminfo['lastposter'] == $postinfo['username'])
{
// this thread is the one being displayed as the thread with the last post...
$forumupdate = "lastposter = '" . addslashes(htmlspecialchars_uni($edit['postusername'])) . "', postanon = $edit[postanon]";
}
if ($threadinfo['lastposter'] == $postinfo['username'])
{
// this post is the one being displayed as the thread with the last post...
$threadupdate[] = "lastposter = '" . addslashes(htmlspecialchars_uni($edit['postusername'])) . "',anonname = '" . addslashes(htmlspecialchars_uni($edit['anonname'])) . "', postanon = $edit[postanon]";
}
if (!empty($threadupdate))
{
// do thread update
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET " . implode(', ', $threadupdate) . "
WHERE threadid = $threadinfo[threadid]
");
}
You will see, I wrapped all updates to $threadupdate in a conditional validating that the post edited is the first post in the thread.

I also removed "postuserid = $edit[userid]" in all spots in that code (it was in every update to $threadupdate).

ThePimp
03-31-2005, 12:32 PM
Ok, I've installed this hack, and it seems as though it's not functioning properly... can someone please assist me with this?

Here's what's happening...
I can post as anon via New Thread, Reply & Quick Reply.
Anon shows up as the username, however, the avatars still show, even when logged out. Also, the "location" shows up, and for some reason, the Anon avatar doesn't work, and the anon user title doesn't either. The other issue is that when you click on the Anonymous username, and view profile, it shows the REAL poster's profile.

I've tested this as Admin / Mod & User. Even Not Logged In users can see the Anon's REAL avatar / location etc...

Did I miss a step somewhere around the Postbit or showthread? I'm using the Postbit Legacy, on vb3.07.

amykhar
03-31-2005, 04:29 PM
Well, if you have followed the directions, you have not completely installed the hack because this problem would have shown up during testing. What step are you on? That makes it easier to diagnose what could be going on. Also, I need a link to a thread that is having the problem.

Tsukasa2k5
04-01-2005, 06:51 AM
Hi,

Excellent work, but I've a question:
If more users than one can answer anonymous a thread it will be usefull, that the users know, who had answerd. Maybe with a random number after the "Anonymous Registered User" username.

For example:

1. Post:
Anonymous Registered User [777]
Hi there

2. Post:
Anonymous Registered User [888]
What are you doing ?

3. Post:
Anonymous Registered User [777]
Nothing

So the other users know that the 1. and 3. post was posted by the same user.

I hope you understand what i mean :nervous:

spence2
04-01-2005, 12:16 PM
I understand what you mean...and it sounds like a useful mod to the hack. Less confusion in the thread regarding who's replying to whom.

amykhar
04-01-2005, 02:08 PM
Feel free to do it as an addon, but this hack is already massively complicated. I'm not sure users could take any more changes; so I won't be implementing that at this juncture.

MrZeropage
04-01-2005, 05:30 PM
I just found this hack today and *funny* I am working on the same for some months now and will be going to finish it soon.

But it is less complicated, I just took a look on your instructions and how you did it *wow*

My "Anonymity-Hack" will bring that requested feature along with it and even some more, while it also does not need any additional table in the database and less queries.



I just started beta-testing my hack ...



Anyway - nice work, when mine is finished we should compare them ;)

ThePimp
04-01-2005, 09:23 PM
Well, if you have followed the directions, you have not completely installed the hack because this problem would have shown up during testing. What step are you on? That makes it easier to diagnose what could be going on. Also, I need a link to a thread that is having the problem.
I went top to bottom of your instructions, but it may be possible that something got missed, as it was around 4:00AM when I installed it, and I was starting to get tired. Let me ask you this... DOES your hack change the AVATAR for the Anon posters to the one being used in the Anon profile, as well as change the user title? If so, could you point me to which step in your instructions these functions are located?

Thanks

ThePimp
04-01-2005, 09:24 PM
The only things that don't seem to be working are profile related.

amykhar
04-01-2005, 10:17 PM
I went top to bottom of your instructions, but it may be possible that something got missed, as it was around 4:00AM when I installed it, and I was starting to get tired. Let me ask you this... DOES your hack change the AVATAR for the Anon posters to the one being used in the Anon profile, as well as change the user title? If so, could you point me to which step in your instructions these functions are located?

Thanks
It changes the whole userid. When installed properly, normal users and logged out people see the profile of the Anonymous user that you created. Admins and mods see the profile of the true user.

Lionel
04-01-2005, 10:41 PM
I do have a small problem. Although permissions are set, new users are not allowed

Lionel
04-01-2005, 10:49 PM
I am able to fix when I go to user in admincp. I see that permissions are there. But he is not allowed. I save, then it's ok. Problem is I can't do that every time :-)

Lionel
04-01-2005, 10:54 PM
Perhaps the profilefield is not updating? As admin I can see private field. I noticed all new users had nothing for anonymous permissions until I manually update user in control panel. Just click save without doing anything else, then I can see it in profile.

Lionel
04-01-2005, 11:10 PM
It would have been nice to be able to use another set of new status icons for forums and subforums like forum_new.gif, forum_old.gif to indicate that forum accepts anonymous posting (anon_new.gif, anon_old.gif)

mrsbuzzy
04-05-2005, 01:20 AM
Hello, I think this looks awesome! I just have one quick question before we start to install. Can we set it up so that only a specified forum allows anonymous posts? I have 2 forums I would like that option.

My other question is (I don't think this was mentioned in this thread, but I may have missed it) will people's signature show up when they're set to anonymous?

I greatly appreciate the work you put into this.
Dawn

amykhar
04-05-2005, 08:04 PM
Hello, I think this looks awesome! I just have one quick question before we start to install. Can we set it up so that only a specified forum allows anonymous posts? I have 2 forums I would like that option.

My other question is (I don't think this was mentioned in this thread, but I may have missed it) will people's signature show up when they're set to anonymous?

I greatly appreciate the work you put into this.
Dawn
1. Yes. It's done so you can control it at forum, usergroup, user and even board level.
2. No. The sig of the Anonymous user account you create shows, not the true user's.

amykhar
04-05-2005, 08:05 PM
It would have been nice to be able to use another set of new status icons for forums and subforums like forum_new.gif, forum_old.gif to indicate that forum accepts anonymous posting (anon_new.gif, anon_old.gif)
You can. Because you can check to see if the post is anonymous in the template, you can use conditionals to set it up.

Lionel
04-16-2005, 03:25 AM
Ok, the modification to editpost.php has a logic error in it.

You test two conditions in a nested double test:
Was post made anon?
- Yes
-- was it anon before?
---Yes set a bunch of vars incl $threadupdate
---No set a bunch of vars incl $threadupdate
- No
-- was it anon before?
---Yes set a bunch of vars incl $threadupdate
---No set a bunch of vars incl $threadupdate

Then you later have logic twice to update the thread
// if (!empty($threadupdate))

$threadupdate will never be empty in either case.

Net effect: When a thread is posted and someone replies to it and then edits their reply, thread.postusername and thread.postuserid are overwridden inappropriately and the 2nd threadupdate . Thread should only be updated with anon/real user names and IDs if the OP is edited.


[/php]
You will see, I wrapped all updates to $threadupdate in a conditional validating that the post edited is the first post in the thread.

I also removed "postuserid = $edit[userid]" in all spots in that code (it was in every update to $threadupdate).

I seemed to have the same problem. I pinpointed it to editpost.php, where whenever someone edits his post, he will appear as the thread originator. I constantly have to rebuild threads. I am going to try your fix.

Lionel
04-16-2005, 03:44 AM
Greebo. Thanks. Your fix solved the problem, which was happening in any edited post as long as the user had anon permissions, regardless or not the post itself was allowing anon.

Now I just need to test for an editpost in an actual allowed anon forum.

I wish amykhar takes a look at it and confirms that this will not affect anything else.

Lionel
04-16-2005, 04:34 AM
It would have been nice to be able to use another set of new status icons for forums and subforums like forum_new.gif, forum_old.gif to indicate that forum accepts anonymous posting (anon_new.gif, anon_old.gif)

Amy, I did not realized that you answered.

Which conditional to use? This does not do it.

<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum<if condition="$post['postanon']!=0">anon</if>_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span class="smallfont">$forum[title]</span></a>

Lionel
04-16-2005, 05:12 AM
OK. I am able to do with this condition
$forum['postanon']!='0'

Lionel
04-16-2005, 05:30 AM
Greebo, the only thing that I can see with your fix, is that after edit, admin can no longer see who did that post. It displays "Anonymous Member" for all edited posts instead of real username for admin. It's a trade off I'd rather have instead of having to rebuild threads constantly, until there is a final fix.

bixente
04-28-2005, 03:53 PM
unregistered users can post anonymous thred ? if they are how can i disable it?

amykhar
04-28-2005, 04:39 PM
It's a permissions setting.

bixente
04-29-2005, 07:47 AM
how can i do that only specific user id's can see who is the writer of the thread? i dont want all the moderators to see who post it (some privacy ;) )

amykhar
04-29-2005, 10:28 AM
In the showthread changes, I have it check to see if the person can modeate. Change those checks to look for the person's userid instead.

bixente
04-29-2005, 11:21 AM
In the showthread changes, I have it check to see if the person can modeate. Change those checks to look for the person's userid instead.
hmm if u can mark me where exactly it will be great cause i'm not that expert in this things :)
thanks u v.much =]

Lionel
05-09-2005, 11:26 PM
Please can someone look at editpost.php? I still have problems in some sections with thread getting the name of person who edited a post as the thread owner. I constantly have to rebuild thread info.

kall
05-12-2005, 11:22 AM
Please can someone look at editpost.php? I still have problems in some sections with thread getting the name of person who edited a post as the thread owner. I constantly have to rebuild thread info.
Dude. Me too.

It's darned annoying. :(

amykhar
05-12-2005, 05:23 PM
Sorry gang. I just haven't had the coding time lately. I'm sharing my home computer with the entire family now and every time I stand up to get a drink of water or to check dinner on the stove, a family member dives for the puter. It doesn't make for good coding concentration.

kall
05-14-2005, 11:11 AM
What would be the implications of *not* applying the editpost.php modifications, as a temporary fix?

Lionel
05-14-2005, 11:41 AM
I guess the anonymous poster will be revealed.

amykhar
05-14-2005, 12:37 PM
No. It wouldn't. It would mean the user couldn't edit their posts but a mod could. It would also mean that a post couldn't be changed to or from anonymous after it's made.

Lionel
05-14-2005, 05:36 PM
Amy you're the one. Please give it the 5 minutes and take a look at that annoying problem for us.

kall
05-14-2005, 09:35 PM
No. It wouldn't. It would mean the user couldn't edit their posts but a mod could. It would also mean that a post couldn't be changed to or from anonymous after it's made.
The anonymous user couldn't edit their posts...but normal posts could still be edited?

While it *does* take away a little of the functionality, the alternative (having the first post of a thread take the username of anyone who has edited their posts in it) is worse.

I don't even know if it happens every time...but it does happen.

Allan
05-20-2005, 04:38 AM
Is the problem of edition always of current events ?

Osterling
05-20-2005, 11:12 PM
i use vb 3.0.7 and when i installed the hack it, when i went to post it didn't come up with that option and yes, i did the template change.. any ideas?

amykhar
05-20-2005, 11:14 PM
If you installed as instructed, you should be able to tell me what step you are on. There is testing involved at each level of installation to help narrow down any installation issues.

Osterling
05-21-2005, 11:57 PM
If you installed as instructed, you should be able to tell me what step you are on. There is testing involved at each level of installation to help narrow down any installation issues.


s. TEST. Log in as a user that should be able to post anonymously. Start a new thread. Does the checkbox show that asks you if you want to post anonymously? If not, make sure you did step o

amykhar
05-22-2005, 03:51 AM
s. TEST. Log in as a user that should be able to post anonymously. Start a new thread. Does the checkbox show that asks you if you want to post anonymously? If not, make sure you did step o
Double check your step N. That can also cause what you are seeing.

Osterling
05-22-2005, 02:51 PM
I made sure I did that change and it still does not appear for me.

Also note, I didn't go past 7. This section allows users to post a new anonymous reply. because I didn't want members to be able to post replies anonymously so I figured I didn't need to do that part. But still it said at that check point that I should be able to post anonymously so hmmm...

I don't know why it won't work

amykhar
05-22-2005, 04:15 PM
Just for giggles, do step seven, part f.

Osterling
05-22-2005, 04:20 PM
did it, and it didn't help..

amykhar
05-22-2005, 06:03 PM
Are you sure all the permissions are set correctly? That has been most people's problem.

Osterling
05-22-2005, 08:56 PM
my forum is set up to allow the anonymous post, and so is my usergroup...

let me know if you want to see it hands on and i send you the info via pm.

amykhar
05-23-2005, 04:16 PM
Yes. Send me the info via PM.

kylek
05-31-2005, 06:54 AM
Help, anyone?

I have gotten to the end of step six, ( all checks and tests have been fine) and am now getting this database error, cant even access the forum index. Anyway of correcting this?

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT forum.forumid, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount,postanon,anonname
FROM vb3_forum AS forum

mysql error: Unknown column 'postanon' in 'field list'

mysql error number: 1054

- Panic attack is over, went over everything and must of missed a query as now everything is good. on to step 7..

amykhar
05-31-2005, 01:00 PM
Looks like you didn't run the queries. Run those, or those that you missed, and you should be fine.

momlwt
07-02-2005, 08:53 PM
I am installing your Anonymous hack and ran into some problems with testing step 6.

I have double checked everything but no matter what I do the check box to choose to post anonymously is not showing up.

Any assistance would be greatly appriciated. I pm'd you in April with no reply so kind of gave up but now the issue why we wanted the hack in the first place is back so I could really use some help.

Kim
http://www.parent-2-parent.org

voclain
07-10-2005, 10:21 PM
I am installing your Anonymous hack and ran into some problems with testing step 6.

I have double checked everything but no matter what I do the check box to choose to post anonymously is not showing up.

Any assistance would be greatly appriciated. I pm'd you in April with no reply so kind of gave up but now the issue why we wanted the hack in the first place is back so I could really use some help.

Kim
http://www.parent-2-parent.org

I have the same problem?

UP to this point I have had ZERO problems...all has been WONDERFUL! (SUPER job on writing the TXT file!! AMAZING!!!)....

I get no error messages....all appears to be normal...but NO CHECK BOX!

I'm 2 hours into this hack...and I sure do need it (IF POSSIBLE) before tomorrow.

YOU assistance would be geatly appreciated.

I'm now back off to read through this thread again to see if I missed something.

Thanks.

Kirk

voclain
07-10-2005, 10:26 PM
OH...I have another questions....ON STEP 6. Letter "i"....

The instructions are to:

Find: ..... Replace with: (.........change to use the proper userid and user name.)

I see in the text where to put "PUT USERID HERE"...but I've read it 4 times...I don't see where to put "USER NAME".

Am I just missing it??? Could this be why IT'S not working????

Kirk

voclain
07-10-2005, 10:28 PM
OH...I just had another thought......

I skipped step 3 because I do not have a need for that....could this be causing the problem????? as to why in step 6 I cannot get the check box to show up????

THANKS AGAIN for this hack....WONDERFULLY WRITTEN!!!! Amazing....I wish I had your brain!

Kirk

amykhar
07-10-2005, 11:04 PM
OH...I just had another thought......

I skipped step 3 because I do not have a need for that....could this be causing the problem????? as to why in step 6 I cannot get the check box to show up????

THANKS AGAIN for this hack....WONDERFULLY WRITTEN!!!! Amazing....I wish I had your brain!

Kirk
I'll look at the code again in a few minutes. I may have messed up the text file when fixing something else. I'm going to be porting it to 3.5 this evening (I hope) and that will make me look at this in fine detail.

Amy

voclain
07-10-2005, 11:23 PM
THANK YOU SO MUCH!!!

I will say that first...I am NO CODER.....I can copy and paste...but for me to say what I'm doing??? I HAVE NO IDEA!!!!!

With that said...this is the ONLY thing I have found that is a bit ODD:

Step 6 Letter "i" ONE of the last bits of code you tell me to find is:

'" . addslashes($post['ipaddress']) . "', $post[iconid], $post[visible], $totalattachments") .
"')");

However...in my "functions_newpost" it looks like this:

'" . addslashes($post['ipaddress']) . "', $post[iconid], $post[visible], $totalattachments)
");

I don't know if that is causing the problem or not???? But I figured IT was the only difference I have found.

LET ME KNOW!

And thanks again for this.....IF you have a DONATION policy....please PM it to me so I can contribute!

Yours,

Kirk

amykhar
07-10-2005, 11:26 PM
I just looked at step 3. Yes, it would most definitely make the checkbox not show if you don't do that step, but you have the code in later to see if it's on or not.

The code you just posted shouldn't make a difference :)

voclain
07-10-2005, 11:30 PM
I just looked at step 3. Yes, it would most definitely make the checkbox not show if you don't do that step, but you have the code in later to see if it's on or not.

The code you just posted shouldn't make a difference :)
Wait??? I'm a bit confused???? Are you saying I should just continue onto step 7 and this will fix itself????

LET ME KNOW....THANKS AGAIN...

Kirk

amykhar
07-10-2005, 11:32 PM
Wait??? I'm a bit confused???? Are you saying I should just continue onto step 7 and this will fix itself????

LET ME KNOW....THANKS AGAIN...

Kirk
No. I'm saying go back and do step 3. It won't hurt anything to do it and turn the setting on. :) It's not a code change, and won't take you but a minute.

voclain
07-11-2005, 12:00 AM
No. I'm saying go back and do step 3. It won't hurt anything to do it and turn the setting on. :) It's not a code change, and won't take you but a minute.
Thank you...I did just that.....and figured....as you say....JUST FOR GIGGLES :D...to do it....and it's done....And still no check box???

I have another question at this point....I've been checking steps as I go along...

When I run:
UPDATE userfield set field6='yes';

IT says OK...done....but when I search a user, neither YES nor NO is checked.

Could this be the problem???

Kirk

PS: I really do feel I owe you something for this...PLEASE DO PM ME!

voclain
07-11-2005, 12:19 AM
Some more info.....

I just set the ADMIN usergroup as being allowed to post ANNON....and....guess what...the check box showed up!!!!

I did the STEP 6 testing...and it worked!!!!

NOW....could this have something to do with "SUBSCRIPTIONS"?????

MY forum is 100% by subscription only....users have to PAY to get in....so...I basicly have 4 usergroups...ADMIN, PRIVATE, REGISTERED, WAITING.....

A user registerers...but does not confirm his email...he get nothing...he is in the WAITING group.

IF he confirms...he is in the REGISERED group....still basicly can't do anything....but he can see info in one little corner called FREE....then if they pay....via the new VB3 SUBSCRIPTIONS....they are put into "PRIVATE"....this is the group I want to be able to post ANONYMOUS.

Could the problem have something to do with SUBSCRIPTIONS?????

Kirk

voclain
07-11-2005, 12:36 AM
Even more info...I decided for MORE GIGGLES...to try another test....

The username that I always test with is: JOHN SMITH....I sometimes log in as a regular user under that name....

So...this is the name of the user that I've been trying to get to work...but....NO CHECK BOX!!!

I decided to log on as someone else....my daughter for examply has an account...so...I loged on as her...she does not have any special permissions or anything....and GUESS WHAT!!!! I can see the check box!!!!

So....what this tells me is for some reason...the JOHN SMITH ACCOUNT.....even though the ACCESS check box says: YES on this account...it appears to be registering as NO!

OH WELL???? I'm moving on.

Kirk

voclain
07-11-2005, 12:42 AM
OK...I think I found it....IF YOU physically click YES under a persons NAME...and then SAVE.....it will not work.....Clicking YES...is just like clicking NO!

To get that persons to be able to see the check box....you have to run:

UPDATE userfield set fieldx='yes';

I'm serious now...I'm moving on!

Kirk

amykhar
07-11-2005, 02:51 AM
For those of you having problems getting the checkbox to show, when you add the custom field, the yes and no are case sensitive. Use all lower case, or be consistent when running the query and checking the values in the code.

That was voclain's problem and might be the same issue for others.

Amy

voclain
07-11-2005, 05:34 PM
I've just got to say that Amy is WONDERFUL!!!

She held my hand through this whole processess...it is now up and running and working like a charm!!! MY BOARD is poping with activity!!!!! The members are just loving this...and traffic has never been better!!!

Amy...THANKS!!! THANKS!! THANKS!!!

IF your are ever in the New Orleans Area....look me up....I'll photograph your family for free!!!! http://www.kvphoto.com

Kirk

FatalBreeze
08-03-2005, 01:13 PM
hi amy i can you please fix the editpost changes to vB 3.0.7 though your'e upgrading the whole hack to vB 3.5?
I'm running a big community forum and it causes a lot of problems in my forum.

amykhar
08-03-2005, 01:15 PM
Yes. Once I get it sorted out, I will update this one as well.

MrZeropage
08-09-2005, 08:31 PM
**edit**
Link removed on request

amykhar
08-10-2005, 04:04 PM
Hey, I didn't spam your hack with my link. Please advertise elsewhere.

Lionel
08-18-2005, 07:18 PM
Yes. Once I get it sorted out, I will update this one as well.

Thanks Amy for going to fix 'editpost.php'. It's a major pain.

On another note, I am troubleshooting a sudden slowness for the past few months when posting or editing a post. Could this hack cause new posts or edit posts to take a while before being posted? That is on non anonymous forums.

amykhar
08-18-2005, 07:27 PM
It never slowed my forum down, Lionel. Also, if your slowdown is recent I doubt this mod is the cause because you installed it quite a while ago.

This mod requires no extra queries for posting or reading posts.

jellybaby
08-22-2005, 09:46 AM
Does anyone have this working in 3.0.8?

jellybaby
08-22-2005, 10:24 AM
I cant see a checkbox anywhere can anyone tell me what I have missed please. Ive only done the first step and checked and Ive done it wrong already..lol!

Many Thanks

ktaylor
08-29-2005, 05:16 PM
Does anyone have this working in 3.0.8? I'd like to know this too as i've assumed if it works in 3.0.7, then it'll work in 3.0.8

but i'm stuck on Step 3 where we're supposed to add in the new setting group...only vbulletin options doesn't have (or i can't find) anywhere to include a NEW setting group..

Anyone have any clues on this? did 3.0.8 take out the "add new setting group" or put it somewhere else?

Thanks!

amykhar
08-29-2005, 05:35 PM
you need to be in debug mode to add the settings group.

ktaylor
08-29-2005, 11:18 PM
ahhh, that's why the debut portion is in there...ok, thanks!

i tried putting the $debug=1 in the config.php last night and it had some sort of cookie/header malfunction.. any idea on what that might be about? i know it might not be related to the hack - just wondered...

amykhar
08-30-2005, 12:42 AM
Not sure about the header glitch. Make sure there are no spaces or line returns after the ending ?> in config.php though.

midnightz
10-05-2005, 08:06 PM
This will work with 3.0.8

You will need to change the instructions at 5b.


5b. Run the following query's to update your existing users: (use the table prefix if necessary and change the fieldx to use the value you chose)


ALTER TABLE 'userfield' DROP 'fieldx';

ALTER TABLE 'userfield' ADD 'fieldx' VARCHAR(50) DEFAULT "yes" NOT NULL;

UPDATE userfield set fieldx='yes';


Reason: new version uses "mediumtext" which can't have a DEFAULT (e.g. 'yes')

Solution: change field type from "mediumtext" to "varchar"

-----------------------------------

Enjoy the fix :)

Greebo
10-25-2005, 01:00 PM
Is there a vB3.5 version of this hack available? Its worked great for me in 3.0.x but now I'm getting ready to upgrade. :)

sunnycher
10-27-2005, 01:19 PM
I'd like to know this too!

amykhar
10-27-2005, 03:49 PM
No. There is not a 3.5 I am not sure if or when I will have time to port it. And, if it ends up being as complicated a mod as this one, I might not release the 3.5 version for free. Support for this was very time consuming.

hbalagh1
11-02-2005, 02:05 AM
I would very much love this mod for 3.5... I just had users ask for something like this :)

Greebo
11-02-2005, 04:42 PM
No. There is not a 3.5 I am not sure if or when I will have time to port it. And, if it ends up being as complicated a mod as this one, I might not release the 3.5 version for free. Support for this was very time consuming.
I can certainly respect that. If you release a paid version, I'm certainly willing to consider it. :)

begore
07-26-2006, 08:45 AM
Any update on the 3.5 situation?

amykhar
07-26-2006, 11:13 AM
I'm not certain what kind of update you are seeking? As noted before,it is complex and was not installed by many users.

HappyDJ
09-17-2006, 01:52 AM
I would be very interested in a 3.5 version also.

If there is any updates or thoughts about modding this to work on 3.5 please let me know - I will subscribe to this thread

JustAskJulie
11-21-2006, 04:30 PM
2e. Time to test again! If you have problems with this test, triple check your math in the init.php file edit. In your admincp, open the forum manager. Edit any forum of your choice. Set the ability to post anonymously in this forum to yes. Save it. Open the same forum. Did your changes stick? If yes, move on to step 3. If not, STOP. Check your work.

How do I know if the changes stuck?

JustAskJulie
11-21-2006, 11:18 PM
I did step 6 and now my newpost/newreply pages are showing up blank. Can you help me figure out where I went wrong? I tested after step 5 and everything was good. There's a lot going on in step 6 and I've gone back over it twice trying to find my error and can't seem to figure it out.

pcoskat
12-27-2007, 07:13 PM
Any chance of anyone creating this for 3.7?

pcoskat
03-31-2008, 02:15 PM
anyone?

dpetersman
02-20-2009, 08:22 AM
this is exactly what im looking for, for 3.8