Announcements Widget dismiss functionality

WorkingHands
Tera Expert

Hello,

Would anyone know how to recreate the dismiss announcement functionality that's present in the announcements banner?  

I've created a custom announcements widget and I'd like to replicate the dismiss functionality there but I'm not sure what record(s) need updated when a user dismisses an announcement.  Does anyone know what tables are involved or how to view the existing functions?

Thanks

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

Dismiss functionality is already handled OOB with a client script.

 

Dismiss Client Script

 

find_real_file.png

 

You can utilize same code and retrofit in your widget.

 

Regards,

Sachin

Thank you Sachin, I wasn't even sure where to start so this helps a great deal.

However, I'm struggling to understand the code and I haven't had much luck trying to debug it (never seems to hit conditions).  Which method runs when I dismiss a banner announcement from the Portal?  onSubmit() seems to apply more to creating the announcement.

 

Thanks!

Adam43
Tera Contributor

I thought the old ui16 announcement feature used to create a user preference record to track whether you had dismissed announcement or not.  if you wanted it to reappear for all users, you could go delete specific user_pref records for all users etc.  not sure what script created those entries, nor what kind of code checked for it in the first place to display or not.  but that feels like being involved.