Forum breadcrumbs – You are here:Asgaros Support ForumSupportGuest Posting on Forum
Please or Register to create posts and topics.

Guest Posting on Forum

I just enabled guest posting on my forum but I’d like to change the name generated when they post. Instead of just “Guest” for every guest post is it possible to change a line of code somewhere so it generates a unique username with “Bot#??????” so each time a guest posts it says their username is “Bot#767” “Bot#75372” ect. ect.

 

Another question, how can I add a captcha before guests can submit a post?

@buddybudbud

For the naming thing I can’t help.

But for captcha, you can have a look here: https://asgaros.com/support/topic/add-captcha-for-guest-postings/

buddybudbud has reacted to this post.
buddybudbud
Quote from Ole on April 27, 2022, 1:02 pm

@buddybudbud

For the naming thing I can’t help.

But for captcha, you can have a look here: https://asgaros.com/support/topic/add-captcha-for-guest-postings/

That worked perfectly. TY

Quote from buddybudbud on April 26, 2022, 8:58 pm

I just enabled guest posting on my forum but I’d like to change the name generated when they post. Instead of just “Guest” for every guest post is it possible to change a line of code somewhere so it generates a unique username with “Bot#??????” so each time a guest posts it says their username is “Bot#767” “Bot#75372” ect. ect.

Now I just need help with this. I’m guessing somewhere there is the hard text “Guest” for when a guest posts. How could I change that to do what I want in the post above? ^

There are two filters that may be relevant, asgarosforum_filter_username and asgarosforum_filter_post_username.  I don’t understand the code enough to see which, if either, could be used to do that.  They both seem to rely on user_id or a user object, which you wouldn’t have for a guest.  You would have to investigate and experiment.

@asgaros Any idea where I can do that?

If you want to edit plugin files directly (changes will be lost if there is an update), you can do it in the file forum.php. line 1402.