vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Allow Your Users to Post Anonymously Without Logging Out (https://vborg.vbsupport.ru/showthread.php?t=78410)

amykhar 03-19-2005 10:00 PM

Allow Your Users to Post Anonymously Without Logging Out
 
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

Quote:

Originally Posted by TheHeggy
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

Quote:

Originally Posted by BarHopper
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

Quote:

Originally Posted by hate
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

Quote:

Originally Posted by Lionel
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

Quote:

Originally Posted by Lionel
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

Quote:

Originally Posted by amykhar
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
Code:

        if (($forumperms & CANDOANON) AND ($bbuserinfo[fieldx]=='yes') AND $vboptions['candoanon'] AND $foruminfo['allowanon'])

        {

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

        }

        else

        {

          $postanonoption = "";

        }

to this:
Code:

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

Quote:

Originally Posted by Lionel
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

Quote:

Originally Posted by lordnex
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';


All times are GMT. The time now is 06:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01372 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete