Notifications
Clear all

wpForo 1.x.x [Closed] Use WPForo alert box in my custom php page on my own click button

2 Posts
2 Users
0 Reactions
1,568 Views
Posts: 1
Topic starter
(@collinso)
New Member
Joined: 5 years ago

i want to use that custom alert box that appears at the top right hand corner of the forum page in my own functions.php page. IF I CAN, can you tell me how i could call a function to do that in my Js or php? just and overall steps of how i can do it. i have look at the plugin pages and database and so far i understand that i have to add the word i want as a phrase first to my database before use. I am comfortable editing the .php pages if directed correctly. Thanks for help in advance

1 Reply
Sofy
Posts: 4772
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi @collinso,

Thank you for using wpForo and for contacting us.

If you're going to use the message box in wpForo pages, it'll be possible, the codes are provided below:

Spoiler
in php code
WPF()->notice->add('YOUR NOTICE TEXT', 'success');
WPF()->notice->add('YOUR NOTICE TEXT', 'error');
WPF()->notice->add('YOUR NOTICE TEXT', 'neutral');


Spoiler
in js code
wpforo_notice_show('YOUR NOTICE TEXT', 'success');
wpforo_notice_show('YOUR NOTICE TEXT', 'error');
wpforo_notice_show('YOUR NOTICE TEXT', 'neutral');

If those pages are not wpForo pages I'm sorry, but there is no way to display the messages box.