Notifications
Clear all

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

2 Posts
2 Users
0 Likes
1,190 Views
collinso
Posts: 1
Topic starter
(@collinso)
New Member
Joined: 3 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: 4057
 Sofy
Admin
(@sofy)
Support Team
Joined: 5 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. 

Reply
Share: