[3.3][BETA] Anonymous Posts

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.2][BETA] Anonymous Posts

Post by Toxyy »

If you were using the latest version of this extension before this update (version 0.10.0), you will have to run this query on your database to upgrade:

Code: Select all

INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('anonymous_posts_version', '0.100', '0')
Replace phpbb_config with your db prefix.

If for some reason you were running an earlier version than that, post here.
-----------------

update 0.11.1

-hidden here is a previous unreleased version that featured a complete refactor of the code, these updates is based off of that version
-fixed migrations to make it smoother for fresh installs, breaks backcompatibility (fix is above)

-had to add cache and config to driver for destroy cache function
-moved scrapped event to internal function
-fixed bug where email in posts wasnt being scrubbed
-fixed bug where forum last post index wasnt changing if you edited a post, possibly for topics too
-fixed bug where anon status would change after editing post if not staff
-fixed old search by user_id results to have anon info in it, if it was changed since last search
-made all arrays shorthand in migration files
-added config version for ease of migrations now
-should be compatible with 3.3.3, minus the one pull that isn't through yet (ticket 15925)
-rewrote extension to work with ticket 15943 manually
-at this time ticket 15880 APPEARS not to be necessary, attachment bug/error is not happening during testing without it

I haven't thoroughly tested this version but all should be working, I've tested most stuff and I don't think anything was missed, if anything I caught some stuff.
-----------------
Maggan22 wrote: Sat Mar 13, 2021 3:21 pm Please, Please, Please update for 3.3
Junsui wrote: Mon Feb 08, 2021 4:46 pm Is there an update for 3.3 version?
For Junsui, make sure your forum has group permissions to anonymously post, and make sure your groups do as well.

If you install the last PR manually ticket 15925, then yes. It is merged for 3.3.4 3.3.5 already.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
Maggan22
Registered User
Posts: 53
Joined: Tue Sep 15, 2009 1:32 pm

Re: [3.3][BETA] Anonymous Posts

Post by Maggan22 »

Hi,

Very nice Work - Is it possible to restrict the function for ONE forum section?
Greets Maggan22
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.3][BETA] Anonymous Posts

Post by Toxyy »

Maggan22 wrote: Fri Feb 18, 2022 4:42 pm Hi,

Very nice Work - Is it possible to restrict the function for ONE forum section?
Yes. Anonymous post functionality is controlled by user, group, and forum permissions. These permissions are at the bottom of the permissions list of the post tab of users or groups after installing the extension. Basically, it works like this:


For each usergroup you want to be able to anonymously post, you must first set up their group permissions and set them to yes:
(these are the default options, the ones I tell you to change them to are not set in the photos)
Image

They can now anonymously post, but only in forums that have corresponding forum permissions set to yes (both no in photo, its default setting):

Image

Editing anonymous post status is a privelige that changes the entire dynamic of anonymously posting, and it is usually reserved for admins and staff. Disabling this feature in a forum will also disable moderators from changing the statuses as well.

If you want to remove these features for a specific user, simply go into their user permissions:
(note: don't get confused here, no is overridden by their group permissions as groups are more powerful than users. To remove this feature from a user, set both permissions to never for them. Vice versa, to enable this feature for a user in a group where it's set to no, put yes. Never will always override any yes setting anywhere.)

Image

You can go even further than this, as you can see on the left side, there are user forum permissions. So, you can deny a single user access to these features within a single forum instead of board wide, but I'm not including a screenshot as it's getting redundant and the post has enough vertical space as it is (I minimized the pngs, don't worry staff).

Once you set up an initial forum, you can copy permissions from that forum to others to make it easier on yourself.
Last edited by Toxyy on Wed Jun 29, 2022 9:53 pm, edited 5 times in total.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
Maggan22
Registered User
Posts: 53
Joined: Tue Sep 15, 2009 1:32 pm

Re: [3.3][BETA] Anonymous Posts

Post by Maggan22 »

Thank you very much

Is it still available for 3.2?
Greets Maggan22
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.3][BETA] Anonymous Posts

Post by Toxyy »

Maggan22 wrote: Sat Feb 19, 2022 9:23 am Thank you very much

Is it still available for 3.2?
I would say that realistically this extension has only become available in 3.3.5, as with all previous versions I required modification of core files to add the PRs listed in the OP in order for this extension to work. They have all been merged in 3.3.5. If you want to use this extension, take a look at the top of the OP, there is a quotebox with a list of all the PRs that are needed and which version of phpbb they can be found in. If you're on at least 3.2.6 then there is only one PR to add, and if you want to use 0.11.1 then one query to run on your db (but you will need to change the required version in the composer.json file as well). Keep in mind every time you update your forum you will have to readd these changes to the core files.

I don't recommend going through all of that as it's a pain, I'd say just update your forum to 3.3.5 before installing this.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
Maggan22
Registered User
Posts: 53
Joined: Tue Sep 15, 2009 1:32 pm

Re: [3.3][BETA] Anonymous Posts

Post by Maggan22 »

Thanks for the information. Actually all my forums running phpbb are up to date. Except for one as this is coupled with an Android app and I can't easily update that. But I will try.
Greets Maggan22
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.3][BETA] Anonymous Posts

Post by Toxyy »

IMO it would be easier to try and update that app than manually add all these patches, but good luck. Thanks for using this extension! Report any bugs in here or on the github if you find any. The latest version is running on a pretty large site and she lets me know if there's anything wrong with it, last I heard of something was two years ago which has since been fixed.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
Motteless Bailey
Registered User
Posts: 21
Joined: Mon Jan 29, 2018 6:00 pm

Re: [3.3][BETA] Anonymous Posts

Post by Motteless Bailey »

I think I might be doing something wrong with the setup, but I’m not sure what. I enabled the extension without errors, set Registered User group permissions to “No” for Can Post Anonymously and “Can Edit Anonymous Status,” and then set specific forum permissions to “Yes” in both those columns, as show in the setup images.

However, the anonymous posting option does not appear for registered users in those forums. Changing to default prosilver theme doesn’t seem to have any effect on this.

Any idea what the problem could be?

Here’s my forum configuration:
Database server: MySQL(i) 8.0.29-0ubuntu0.20.04.3
PHP version: 7.4.25
Board version: 3.3.8

Trying to run the latest 0.11.1 version of the extension. I also verified that anonymous_posts_version is set 0.100 in phpbb_config.
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.3][BETA] Anonymous Posts

Post by Toxyy »

Motteless Bailey wrote: Wed Jun 29, 2022 12:46 am set Registered User group permissions to “No” for Can Post Anonymously
...
However, the anonymous posting option does not appear for registered users in those forums
Perhaps there is some confusion, the setup images show the default options, not what you should set it to. If you want users to be able to post anonymously, their group permission should be set to yes for Can Post Anonymously, otherwise they cannot.

I just tested this on a fresh install of 3.3.8, all works fine. I will be be posting an updated 0.11.2 soon for PHP 8 compatibility, very minor changes. It should work now with PHP 8, but there are some needless errors on some pages in the header.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
Motteless Bailey
Registered User
Posts: 21
Joined: Mon Jan 29, 2018 6:00 pm

Re: [3.3][BETA] Anonymous Posts

Post by Motteless Bailey »

Toxyy wrote: Thu Jun 30, 2022 2:32 am Perhaps there is some confusion, the setup images show the default options, not what you should set it to.
Ah, thank you, that is what I was confused about. Everything seems to be working as intended now!
ACAF
Registered User
Posts: 1
Joined: Sun Feb 12, 2023 4:00 am

Re: [3.3][BETA] Anonymous Posts

Post by ACAF »

would it be possible to make an extension like this except that not even the administrator could know who the user was (barring IP lookup, maybe). I have a trusted group of users that would love to use something like that, but the fact that I could see who it was kind of ruins the fun
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26502
Joined: Fri Aug 29, 2008 9:49 am

Re: [3.3][BETA] Anonymous Posts

Post by Mick »

You could make an extension request.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.3][BETA] Anonymous Posts

Post by Miri4ever »

I got to pull out those errors inside ACP while I'm creating a topic for the forum.

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/toxyy/anonymousposts/event/posting.php on line 220: Undefined array key "is_anonymous"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/toxyy/anonymousposts/event/posting.php on line 221: Undefined array key "was_anonymous"

Return to the index page	
General Error
SQL ERROR [ mysqli ]

Column 'is_anonymous' cannot be null [1048]

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 1020
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 202
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 345
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.3][BETA] Anonymous Posts

Post by Toxyy »

Miri4ever wrote: Sat Feb 18, 2023 11:58 am I got to pull out those errors inside ACP while I'm creating a topic for the forum.
I've been testing this for the past couple hours and I'm unable to recreate this at all. Can you provide me your phpbb and php versions? Any other extensions installed?

My best bet is that the extension wasn't installed correctly, or something is interfering with it somehow. $data['is_anonymous'] and $data['was_anonymous'] are both set in the posting_modify_submit_post_before event, which should fire before the submit_post_modify_sql_data event where you are receiving this error. As I said I can't recreate this bug at all.

I was, however, able to identify a couple bugs thanks to looking into this. Minor ones that just produce an error at the top of the page for a second before it redirects, nothing breaking. I'll push those after I'm able to investigate yours further upon your reply.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
BF79
Registered User
Posts: 499
Joined: Fri Feb 13, 2015 1:28 pm
Name: Fouad B

Re: [3.3][BETA] Anonymous Posts

Post by BF79 »

no chance to do defaut avatar for Anonymous Posts ?
Post Reply

Return to “Extensions in Development”