Change S_IS_BOT per postrow?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Registered User
Posts: 699
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek

Change S_IS_BOT per postrow?

Post by Toxyy » Mon Oct 15, 2018 11:14 pm

I want to hide all the users contact information so that it can't be accessed in any way, so display: none won't do. I can't use if's through events to remove template that I don't want. It turns out that if I could enable and disable S_IS_BOT per postrow, this would hide it. But I can't seem to modify it. I've tried putting

Code: Select all

$this->template->assign_var('S_IS_BOT', 1);
in a lot of different events and it won't reflect anything, even if I call the variable in the template.

How should I go about this? Currently I have to modify viewtopic_body.html to get the results I want.

I was able to use page_header_after to change it but that only gets run once.


I was able to get around this by setting

Code: Select all

 $event['user_cache'] = $event['user_poster_data'] = $event['cp_row'] = NULL; 
in viewtopic_modify_post_row. The only problem is, $u_pm is assigned using the old variable and not the editable one using $post_row from the event above it in viewtopic.php. I'll make an edit right away. PR & ticket made
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

Post Reply

Return to “Extension Writers Discussion”