vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Logged in users post anonymously (https://vborg.vbsupport.ru/showthread.php?t=40353)

Gary King 06-27-2002 07:10 PM

Logged in users post anonymously
 
Could someone make a hack to allow logged in users to be able to post anonymously in ONE forum?

Thanks :D

Xenon 06-27-2002 07:21 PM

open newreply.php

find this:
PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); 

and replace with:
PHP Code:

if($forumid!=X) {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
} else {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','Anonym','0','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); 


then find
[php]$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");[php]

and replace with
PHP Code:

if($forumid!=x) {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='Anonym' WHERE threadid='$threadid'");


then find
PHP Code:

$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'"); 

and replace with
PHP Code:

if($forumid!=x) {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='Anonym' WHERE threadid='$threadid'");


replace the x with your forum id

@filburt: thats also an idea ;)

filburt1 06-27-2002 07:22 PM

/me is intrigued by the idea
If the admin can see who actually posted the message then it would be cool. You could always just edit the template set for that one forum so there's no reference of the username or userid.

Gary King 06-27-2002 07:27 PM

Interesting - much thx Xenon :D

Xenon 06-27-2002 07:37 PM

you're welcome :)

Logician 06-27-2002 10:13 PM

[high]* Logician feels urge to assist team mate Xenon :)
[/high]

Maybe using
PHP Code:

if($forumid==x) {
$bbuserinfo[userid]=0;
$bbuserinfo[username]='Anomy';


can save some typing and also the effort to hack email notification part, because after db insert, his userid is sent to sendnotification function and thread subscribers learn his real identity if we dont clear it. :)

@Blak n Wite: BTW I wonder why you dont just enable guest posting in that forum? So if someone wants to post without his username, he can just log off and post with a guest account.

@filburt1: nice idea but does not work: an insistent user can still track the post user with Search function (show posts), user profile (which shows the last post of user), also search all posts by user option. So database modification as Xenon suggested is necessary and this makes hard to learn his identity for admins too. Your one chance may be enabling email notification for mods in this forum and send his real username with new post notification mail. Other solution would require db alteration which is not recommended for this small hack..

Xenon 06-27-2002 10:52 PM

lool, yes better do what my team mate logician said, its much easier :)

@filburt: when you create an extra field to the post-table then this could be done easili, but without changes to the database it'll be very hard.

Gary King 06-27-2002 10:56 PM

Quote:

Originally posted by Logician
* Logician feels urge to assist team mate Xenon :)

Maybe using
PHP Code:

if($forumid==x) {
$bbuserinfo[userid]=0;
$bbuserinfo[username]='Anomy';


can save some typing and also the effort to hack email notification part, because after db insert, his userid is sent to sendnotification function and thread subscribers learn his real identity if we dont clear it. :)

@Blak n Wite: BTW I wonder why you dont just enable guest posting in that forum? So if someone wants to post without his username, he can just log off and post with a guest account.

@filburt1: nice idea but does not work: an insistent user can still track the post user with Search function (show posts), user profile (which shows the last post of user), also search all posts by user option. So database modification as Xenon suggested is necessary and this makes hard to learn his identity for admins too. Your one chance may be enabling email notification for mods in this forum and send his real username with new post notification mail. Other solution would require db alteration which is not recommended for this small hack..

I don't want to enable guests for that forum, because guests can't see the forums :) Only registered members can :D


All times are GMT. The time now is 04:54 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.01031 seconds
  • Memory Usage 1,763KB
  • 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
  • (7)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete