Hiding " total views"

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
carlo
Posts: 2
Joined: Fri Oct 20, 2006 8:44 am

Hiding " total views"

Post by carlo »

Hi All,

I have just installed 1.6.5 and love it !

There is only one thing i like to change (for now :D )

I want to hide the number of views for the main page (top 10) and for all the faq's ... I cant find what to change in the code, someone here who can help me out ?
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the relevant functions in inc/functions.php are:

- generateTopTen()
- printThemes()

Just look for the string $PMF_LANG["msgViews"] in that functions, this is the line you have to edit.

bye
Thorsten[/list]
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
carlo
Posts: 2
Joined: Fri Oct 20, 2006 8:44 am

Post by carlo »

Hi Thorsten,

Thanks for the quick reply , i will try this as soon i get home from work , i let you know if i made it....


Greetings,

Carlo
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

just open the file inc/functions.php and remove in the lines 352 and 355 the following code:

Code: Select all

<div class=\"little\">(".$visits." ".$PMF_LANG["msgViews"].")</div>
Remove in line 940:

Code: Select all

<strong>".$row['visits']." ".$PMF_LANG["msgViews"].":</strong><br />
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
tgvag
Posts: 6
Joined: Sun May 24, 2009 3:35 am

Re: Hiding " total views"

Post by tgvag »

Hello,

I am using version 2.0.13 and have been looking at the functions and also at the faq files, which are mentioned on the forums, but I can't find the lines Thorsten mentions to remove the number of views from the TOP 10 category.

I am quite a newbie with PHP, so I would be ver gratful if some could tell me on what file I must do the changes and exactly what lines (code) I should change or remove.

Many thanks

Klaus
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Hiding " total views"

Post by Thorsten »

Hi,

it's in line 1588 in inc/Faq.php:

Code: Select all

$output .= sprintf('<li><strong>%d %s:</strong><br />',
                    $row['visits'],
                    $this->pmf_lang['msgViews']);
has to be changed to

Code: Select all

$output .= '<li>';
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
tgvag
Posts: 6
Joined: Sun May 24, 2009 3:35 am

Re: Hiding " total views"

Post by tgvag »

Hello Thorsten,

I have done that and the views has dissapeard but unfortunately this had also an unwanted side-effect. My FAQ's are in spanish and now suddendly all words containing accentes show a square symbol instead of the letter with the accent. This did not happen before. Any clue how to corect this?

Thanks again

Claudio
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Hiding " total views"

Post by Thorsten »

Hi Claudio,

my hack cannot be the reason for this. Did you change anything else?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
tgvag
Posts: 6
Joined: Sun May 24, 2009 3:35 am

Re: Hiding " total views"

Post by tgvag »

Hello Thorsten,

No, I only changed the lines you have mentioned. Seems to be related as when I switch back and restore all returns to normal...
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Hiding " total views"

Post by Thorsten »

Hi,

I'll take a look at that.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply