Notifications
Clear all

wpForo 1.x.x [Closed] New sidebar widget customisation

10 Posts
3 Users
4 Reactions
1,441 Views
Posts: 1187
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 years ago

Love the new side bar widget, especially the log in/ register buttons! 

I would like to take the html, and add it to my top menu, inplace of my social media icons in the top right. 

For logged out users i want it to display, just the login in and register buttons

And for logged in users, I want them to see their name, avatar, and buttons

How can i do this? This will allow the login and register box to be displayed across my site on all pages. It would be awesome if I could get it figured out'

9 Replies
Robert
Posts: 10587
Admin
(@robert)
Support Team
Joined: 9 years ago
Posted by: @percysgrowroom

For logged out users i want it to display, just the login in and register buttons

And for logged in users, I want them to see their name, avatar, and buttons

The "My Profile and Notification" already widget works that way, you don't need to do anything:

2 Replies
(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1187

@robert

I want to add it to the top menu you see:

I have added a pic to give you a better idea of what i mean

If i can add that widget to y menu, it will display on all pages, even pages without a side bar, and give a nice easy option to log in too

I dont want it to display the badges, and points, as they might bee too much in the top bar. But user name, avatar, rank and buttons is ideal if it is possible. 

I know we have that setting in widgets, but I cant add a widget to that part of the page unless it in html 

 

 

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10587

@percysgrowroom

I'm really sorry but it's not possible without tons of custom code. There is not an easy option for that.

 

Posts: 1187
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 years ago

hmm, and is it possible to change the icons on notification from the heart and arrow to something else using font awesome? 

2 Replies
Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10587

@percysgrowroom

Yes, it's possible. All notification types data are passing through 'wpforo_register_actions' filter hook. For example, you can use this function in your active theme functions.php file:

function my_custom_wpforo_notification_icons( $notifications ){
if( !empty($notifications) ){
$notifications['new_reply']['icon'] = '<li class="wpf-new_reply">';
$notifications['new_like']['icon'] = '<i class="fas fa-heart"></i>';
$notifications['new_up_vote']['icon'] = '<i class="fas fa-arrow-alt-circle-up"></i>';
$notifications['new_down_vote']['icon'] = '<i class="fas fa-arrow-alt-circle-down"></i>';
}
return $notifications;
}
add_filter('wpforo_register_actions', 'my_custom_wpforo_notification_icons', 10, 1);


Use, Font-awesome icons <i> HTML code: https://fontawesome.com/icons?d=gallery&m=free

 

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1187

@robert

This worked beautifully mate thanks for the input! 

Is there a way to make newest notification appear at the top of the feed? The oldest are appearing first

 

Posts: 1187
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 years ago

Legend! thanks Robert

VereK
Posts: 522
(@verek)
Honorable Member
Joined: 7 years ago

@percysgrowroom

I feel your pain. 

The potential usefulness (hopefully PM notices will go there eventually too) of the this new functionality is such that one has to strongly consider going with a site + wpforo menu layout. The reason is simple, on mobile devices the entire sidebar is moved to the bottom of the page where few venture to scroll which makes the notification functions somewhat redundant. 

Page 1 / 2