All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

Author Topic: how to remove the - views part?  (Read 9834 times)

0 Members and 1 Guest are viewing this topic.

Offline kratos

  • Newbie
  • *
  • Posts: 20
    • View Profile
how to remove the - views part?
« on: 23 May 2007, 22:03 »
Hi,

Great plugin  - I use it to display the most viewed posts in the sidebar. However, since the count increments immediately, sometimes ppl click a whole bunch of times just to push a post up the list for no reason.
So, I'm wondering how I could delete the part after the post's link, where it shows:
- X views

then there's less incentive to madly click.
TIA

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #1 on: 24 May 2007, 03:04 »
Open up postviews.php

Find:
Code: [Select]
$temp .= "<li><a href=\"".get_permalink()."\">$post_title</a> - $post_views ".__('Views', 'wp-postviews')."</li>\n"Replace:
Code: [Select]
$temp .= "<li><a href=\"".get_permalink()."\">$post_title</a> - $post_views </li>\n"

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,296
    • View Profile
Re: how to remove the - views part?
« Reply #2 on: 24 May 2007, 22:38 »
Did it work?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline kratos

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: how to remove the - views part?
« Reply #3 on: 25 May 2007, 01:37 »
Now it shows
- n

If I delete the - $post_views part, then the number count doesn't show up either,  and now it's where I want it to be.

However, there's a similar line in the php file but it refers to snippet_chars... should I alter that line as well?

Also,  will deleting the $post_views var from that line have any adverse affects on the count or anything else?

TIA
« Last Edit: 25 May 2007, 02:31 by kratos »

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #4 on: 25 May 2007, 05:55 »
kratos: nope it will not, no need to delete from snippet_chars unless you are using wp-stats to display the highest viewed post

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline kratos

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: how to remove the - views part?
« Reply #5 on: 25 May 2007, 17:58 »
can u clarify a little?

a) I don't need to mess with the snippet line since I'm not using wp-stats
b) deleting $post_views from the other line won't have any adverse affects on the count or anything else

Am I correct on both?

TIA


Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #6 on: 25 May 2007, 18:44 »
yeap, correct for both.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline kratos

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: how to remove the - views part?
« Reply #7 on: 25 May 2007, 21:48 »
THANKS LESTER!

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,296
    • View Profile
Re: how to remove the - views part?
« Reply #8 on: 26 May 2007, 00:30 »
So it works?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline vicks3983

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: how to remove the - views part?
« Reply #9 on: 17 February 2008, 11:26 »
Hello Lester!

As I posted in the Truncate post, the suggestion you gave works like a charm, however, the actual "number of views" after the posts arent disappearing, after following the instructions listed above, in this post.

I am sure I followed the instructions through properly.

Could you suggest other wise please. when you get time of course!

Thanks once again for the wonderful plugins! :)

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #10 on: 17 February 2008, 14:03 »
The solution is only for when the truncate option is not activated.

This is the solution that you need:

Find:
Code: [Select]
$temp .= "<li><a href=\"".get_permalink()."\">".snippet_chars($post_title, $chars)."</a> - $post_views ".__('views', 'wp-postviews')."</li>\n";Replace:
Code: [Select]
$temp .= "<li><a href=\"".get_permalink()."\">".snippet_chars($post_title, $chars)."</a> - $post_views</li>\n";

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline falcon900ex

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to remove the - views part?
« Reply #11 on: 17 February 2008, 17:34 »
Lester, could you add a field for editing the "views" text in the next release for the plugin?
That would be awesome!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #12 on: 17 February 2008, 17:37 »
There is now, WP-Admin -> Options -> Post Views. But it will not affect another templates like most viewed etc.

I think I should make it use the template.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline falcon900ex

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to remove the - views part?
« Reply #13 on: 17 February 2008, 17:48 »
That would be great!

Offline vicks3983

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: how to remove the - views part?
« Reply #14 on: 24 February 2008, 07:31 »
Hello Lester,

I tried both of the methods mention by you above. Unfortunately both dont seem to work. After replacing the code as you instructed, I still see the number of views show up. Any possible reason or suggestion, why this may not be working!?

Thanks!!
I am using WP-2.3 latest version, if that information be of use. 

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #15 on: 24 February 2008, 07:57 »
Set the chars to 0 in the most viewed widget options in WP-Admin -> Presentation -> Widgets

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline vicks3983

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: how to remove the - views part?
« Reply #16 on: 24 February 2008, 10:23 »
Hello Lester,

Thanks for the quick reply. I am sorry, I forgot to mention, I am using a non widgetized theme. Also both the version of wordpress and Wp-Post Views plugin are the latest one's.

I hope I am not irritating you, but if you want I could post the code or something if you like, so that you could guide me better! Let me know, If any info is needed!

Once again Thanks!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: how to remove the - views part?
« Reply #17 on: 24 February 2008, 14:56 »
Did u do it correctly? Attached the file here.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,296
    • View Profile
Re: how to remove the - views part?
« Reply #18 on: 25 February 2008, 00:02 »
:)
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers