Author Topic: Light modification : post count  (Read 2528 times)

Benoit

  • Guest
Light modification : post count
« on: May 09, 2009, 04:52:43 AM »
Hi,
First of all, I just want to thank you for this great plugin which is very very helpful!!!
I would like to ask you how to make a small modification of your code in order to have the post count on the same line of the title. When I check the option, the post count is displayed under the title of the category. I would like to have it on the same line. I had a look in the plugin code but, my knowledge did not allow me to find this. This is for your last version, and it's installed on the worpdress FR 2.7.1.
Thank you in advance,
Very best regards,
--
Benoît - happy user (despite this question ;)

Peter

  • Administrator
  • Regular
  • *****
  • Posts: 439
    • http://blog.avirtualhome.com
Re: Light modification : post count
« Reply #1 on: May 10, 2009, 07:19:10 PM »
The post is displayed after the categories on the same line.
It could have to do with your theme and the width of the sidebar or how the CSS is being used.

What is your site, I could check it out and see what I can do for you.
Peter van der Does
AVH Plugins developer

Benoit

  • Guest
Re: Light modification : post count
« Reply #2 on: May 11, 2009, 02:33:54 AM »
Hi,
Thanks for your reply. The website is http://www.fnplck.org. The post counts are only displayed for the two last category widgets on the left sidebar, which correspond to "Annonces" and "Emploi". I currently using four widgets of your plugin. They are all used on the left sidebar. I noticed that, even I request to display categories when they are empty, this works well for the two first of them. And for the two last, it works only when we are logged. If you need it, I can give you a temporary access to see the difference between logged in and out.
Thanks in advance for all of your help,
Very best regards,
--
Benoit

Peter

  • Administrator
  • Regular
  • *****
  • Posts: 439
    • http://blog.avirtualhome.com
Re: Light modification : post count
« Reply #3 on: May 11, 2009, 08:35:30 AM »
The fact the post count is not on the same line has to do with your theme.

In the style.css of your theme you have the following section:
.widget ul li a:link, .widget ul li a:visited,
.widget ul li a:link, .widget ul li a:visited, .widget ul li a:active, .widget ul li a:hover
display:block;
}

This makes everything inside the <a> and </a> to be displayed as a block. After the </a> a line break will be done. The post count display is not part of the <a> link hence it being on the next line.
You could take out the display:block but this will alter the indicator in front of the <a>. See the picture and the line Adhérents? Déposez vos offres d’emploi!



About the empty categories.
I'm not sure why this is the case. Are these categories for members only?
Peter van der Does
AVH Plugins developer

Benoit

  • Guest
Re: Light modification : post count
« Reply #4 on: May 11, 2009, 01:40:21 PM »
Thanks for your help Peter. It doesn't matter for the case as the line Adhérents? Déposez vos offres d’emploi! I will take out the display:block

Concerning the extended category nr3 which correspond to "Petites annonces", two categories are displayed and none of them are restricted : visible for all.
Concerning the extended category nr4 which correspond to "Emploi", two categories are displayed : "Offres" and "Demandes". "Demandes" is restricted to members only (I used a plugin called User Access Management "UAM" for restricting access). The category "Offres" is not restricted.

Anonymous

  • Guest
Re: Light modification : post count
« Reply #5 on: May 12, 2009, 03:50:32 PM »
Hi Peter,

Thanks for this fantastic plugin... I was so glad to find it. I'm using the same theme as Benoit and I'm having the same problem with the post count being on the second line. When the drop down menu option, the post count is on the same line. Is there a way that I can keep the post count and the title on the same line like in the standard categories plugin without removing the block?  

Warm thanks and kind regards
Yanik

Peter

  • Administrator
  • Regular
  • *****
  • Posts: 439
    • http://blog.avirtualhome.com
Re: Light modification : post count
« Reply #6 on: May 12, 2009, 05:44:56 PM »
Benoit changed the display: block to display: inline-block and that makes for a better solution. It just moves the count up next to the categories and keeps the look. Check his website for the result.

I installed the theme on my test box and came up with the following solution:
The theme has an option to insert custom CSS.
In the theme options on the page HTML/CSS Inserts add the following to the CSS box:

Code: [Select]
.widget_extended_categories_init ul li a:link, .widget_extended_categories_init ul li a:visited, .widget_extended_categories_init ul li a:active, .widget_extended_categories_init ul li a:hover {
display:inline !important;
}

That will take care of it without editing the code itself.
Peter van der Does
AVH Plugins developer

Anonymous

  • Guest
Re: Light modification : post count
« Reply #7 on: May 21, 2009, 03:15:09 PM »
You are awesome Peter, thanks so much for responding. I'll try that option.

Warm thanks
Yanik

Benoit

  • Guest
Re: Light modification : post count
« Reply #8 on: December 07, 2009, 01:49:34 PM »
Hi Peter,
Still me again after a few months.  :D  As you may guess, I'm writing you about the same issue. I'm preparing a new version of the FNPLCK's website using a new theme (test in progress on http://www.bmt.on-web.fr/). I'm still using your excellent plugin and the display is not on the same line, because, the css style of "li" are set as "block" and not "block-inline" or "inline". I would like to try to find another way of correcting this display issue because the "li:hover" style will be affected : I would like to keep the colour change of the entire cell when the mouse is over it.
What is your expert advise?
Is another way of correcting it?
Thanks in advance for your reply

Peter

  • Administrator
  • Regular
  • *****
  • Posts: 439
    • http://blog.avirtualhome.com
Re: Light modification : post count
« Reply #9 on: December 07, 2009, 04:10:09 PM »
If I understand correctly you need to change the following in style.css in your themes folder:

Code: [Select]
.widget ul li a {
display:block;
line-height:28px !important;
height:28px;
color:#0c3155;
padding:0 0 0 21px;
}
.widget ul li a:hover {
background:#f1f6f8 url(images/all-icons.gif) no-repeat 6px -81px;
color:#2070c0;
}

Code: [Select]
.widget ul li a {
display:inline-block;
line-height:28px !important;
height:28px;
color:#0c3155;
padding:0 0 0 21px;
}
.widget ul li:hover {
background:#f1f6f8 url(images/all-icons.gif) no-repeat 6px -81px;
color:#2070c0;
}
Peter van der Does
AVH Plugins developer

Benoit

  • Guest
Re: Light modification : post count
« Reply #10 on: December 07, 2009, 04:53:27 PM »
Thanks Peter for your quick answer.
The modification that you propose does not satisfy me because the blue colour which appears when the mouse is hover, is visible until the end of the text and do not fill the entire cell of the menu...
Is their any other way to keep the style of the "mouse hover" in the full cell of the "li"?
Why does the count number is outside the "li" cell?

Peter

  • Administrator
  • Regular
  • *****
  • Posts: 439
    • http://blog.avirtualhome.com
Re: Light modification : post count
« Reply #11 on: December 07, 2009, 05:15:17 PM »
Did you change the li a:hover to li:hover?

Cause when I change it in Firebug it does what you want.

What browser are you testing with?
Peter van der Does
AVH Plugins developer

Benoit

  • Guest
Re: Light modification : post count
« Reply #12 on: December 08, 2009, 01:48:29 PM »
No... you are right. I did not notice that you delete the "a" in ".widget ul li a:hover {". The modification done is better but I loose the easy way of clicking items of the menu. But, I would keep this solution. Thanks so much again Peter for the support done  ;)

Abraham

  • Guest
Re: Light modification : post count
« Reply #13 on: October 19, 2010, 04:12:23 AM »
Hello Peter, first of all, thanks for your work!

I'm having the exact same issue as other people, so I figured it was better to post in the existing topic instead of creating a new one. Sorry for necroposting.

So, I'm preparing this blog for an artist friend, and as you can see, the same issue troubles me:
http://lnx.xradicaldreamers.net/wt/

I tried editing it out myself but only managed to break everything :P
Would you be so kind to tell me what would be the appropriate way to edit?

Thank you very much!

Peter

  • Administrator
  • Regular
  • *****
  • Posts: 439
    • http://blog.avirtualhome.com
Re: Light modification : post count
« Reply #14 on: October 19, 2010, 02:42:18 PM »
Besides wanting the counter on the same line as the category, what else is it that you would like?
Peter van der Does
AVH Plugins developer