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-24-2005 03:36 PM

Quote:

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

Quote:

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

    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
PHP Code:

   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

Quote:

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

Quote:

Originally Posted by Greebo
Ok, here's what I ended up doing to make this work:

In editpost.php I replaced:
PHP Code:

    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
PHP Code:

   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

Quote:

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


All times are GMT. The time now is 10:09 PM.

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.01274 seconds
  • Memory Usage 1,767KB
  • 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
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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