This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Hunter777

  • ****
  • 153 posts
icon for the top of the site - how to do it?
« on: October 08, 2017, 06:51:10 PM »
1) How to make a favorite icon for the top of the site (near the notification icons and ads) in the screenshot you can see
2) Make an icon-so that you can see how many (number) of favorites in it
3) If anyone knows - please tell me the code

*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #1 on: October 08, 2017, 09:14:57 PM »
Open header.php in veronika and find notification section, you can find code for existing icons here.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #2 on: October 10, 2017, 01:08:34 PM »
@Hunter
Code: [Select]
<?php
  
if(osc_is_web_user_logged_in()) {
    
$user_id osc_logged_user_id();
  } else {
    
$user_id mb_get_cookie('fi_user_id');
  }
?>

<?php $list_id ModelFI::newInstance()->getCurrentFavoriteListByUserId($uesr_id); ?>
<?php $fcount count(ModelFI::newInstance()->getFavoriteItemsByListId($list_id)); ?>
<a class="item tr1" title="<?php _e('Favorite''veronika'); ?>" href="<?php echo osc_route_url('favorite-lists', array('list-id' => '0''current-update' => '0''notification-update' => '0''list-remove' => '0''iPage' => '0')); ?>">
  <i class="fa fa-thumbs-up"></i>
  <span class="counter"><?php echo $fcount?></span>
</a>



//updated
« Last Edit: October 11, 2017, 04:21:57 PM by frosticek »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #3 on: October 10, 2017, 10:46:39 PM »
It cannot, plugin does not contain such function.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #4 on: October 10, 2017, 11:49:21 PM »
Sorry, do not understand your question.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hunter777

  • ****
  • 153 posts
Re: icon for the top of the site - how to do it?
« Reply #5 on: October 11, 2017, 01:06:27 PM »
1) How do i make the code in header correct for displaying icons? 

2) Where else do I need to write the code (file)?

3) How to make sure that there is a count in these icons ?  (Favorite, Instant Messages)


*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #6 on: October 11, 2017, 04:21:15 PM »
@Hunter
for messages icon, install instant messenger plugin.
For count of favorites, I update code I posted in few minutes to work for non-logged as well.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #7 on: October 11, 2017, 09:57:01 PM »
@Hunter
I posted code, check it , update it.
If you have no idea about coding, look for developer that will do custom requirements for you.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hunter777

  • ****
  • 153 posts
Re: icon for the top of the site - how to do it?
« Reply #8 on: October 11, 2017, 10:03:06 PM »
Thank you for understanding! can I find a developer to fix errors in the subject ??

*

Hunter777

  • ****
  • 153 posts
Re: icon for the top of the site - how to do it?
« Reply #9 on: October 11, 2017, 10:04:23 PM »
You published the code - and where did you publish it ??

*

Hunter777

  • ****
  • 153 posts
Re: icon for the top of the site - how to do it?
« Reply #10 on: October 11, 2017, 10:05:53 PM »
Give me permission - and I'll go to another forum. Maybe they can help me there !!!

*

MB Themes

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hunter777

  • ****
  • 153 posts
Re: icon for the top of the site - how to do it?
« Reply #12 on: October 17, 2017, 01:20:35 PM »
This code does not work! Help me someone who knows the working code and knows where to put it (this code). I would be very grateful

*

MB Themes

Re: icon for the top of the site - how to do it?
« Reply #13 on: October 17, 2017, 02:46:51 PM »
@Hunter
There was a typo.
You could also spend at least few minutes to do something and not just ask anyone to do your job.

Code: [Select]
<?php
  
if(osc_is_web_user_logged_in()) {
    
$user_id osc_logged_user_id();
  } else {
    
$user_id mb_get_cookie('fi_user_id');
  }
?>

<?php $list_id ModelFI::newInstance()->getCurrentFavoriteListByUserId($user_id)['list_id']; ?>
<?php $fcount count(ModelFI::newInstance()->getFavoriteItemsByListId($list_id)); ?>
<a class="item tr1" title="<?php _e('Favorite''veronika'); ?>" href="<?php echo osc_route_url('favorite-lists', array('list-id' => '0''current-update' => '0''notification-update' => '0''list-remove' => '0''iPage' => '0')); ?>">
  <i class="fa fa-thumbs-up"></i>
  <span class="counter"><?php echo $fcount?></span>
</a>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by Hunter777 on October 17, 2017, 03:07:29 PM
*

Hunter777

  • ****
  • 153 posts
Re: icon for the top of the site - how to do it?
« Reply #14 on: October 17, 2017, 03:07:25 PM »
Thank you so much!!!!