Removing the Language and Times Viewed

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
WayneO42
Posts: 2
Joined: Fri Oct 29, 2004 7:13 pm

Removing the Language and Times Viewed

Post by WayneO42 »

When an article is poseted to a catagory, the language it is written in appears in paranthesis and the numer of views appears below it. My FAQ will all be in english and I dont want the users to see the number of times a particular item was viewed. How do I get rid of them? My guess is I need to modify something in Functions.php Any help will be greatly appreciated
XavierBlak
Posts: 8
Joined: Wed Feb 02, 2005 6:21 am

Post by XavierBlak »

That's weird. Exactly what you want to do I just did today. :)

In function.php edit the following line:(should be around line 154)

Code: Select all

$output .= "\t<li><a href=\"".$_SERVER["PHP_SELF"]."?".$sids."action=artikel&cat=".$row->rubrik."&id=".$row->id."&artlang=".$row->lang."\">".stripslashes($row->thema)."</a> [".$row->lang."]<br /><div class=\"little\">(".$visits." ".$PMF_LANG["msgViews"].")</div></li>\n";
To look like this:

Code: Select all

$output .= "\t<li><a href=\"".$_SERVER["PHP_SELF"]."?".$sids."action=artikel&cat=".$row->rubrik."&id=".$row->id."&artlang=".$row->lang."\">".stripslashes($row->thema)."</a><br /></li>\n";
That's all you need. This will remove the language id and the view count from the article list.
Lucnet
Posts: 2
Joined: Wed Mar 02, 2005 12:35 pm
Contact:

Post by Lucnet »

What about removing the amount of views in the Top Ten area. How can I do that?
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

just open the file inc/functions.php and look for the function generateTopTen() and remove the following code:

Code: Select all

".$row->visits." ".$PMF_LANG["msgViews"]."
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Lucnet
Posts: 2
Joined: Wed Mar 02, 2005 12:35 pm
Contact:

Post by Lucnet »

Thanks, that did it. 8)
Holgate
Posts: 12
Joined: Tue Jul 12, 2005 4:57 pm

Hiding Language & View Hits

Post by Holgate »

Hello,

I would like to still be able to see the number of hits myself, but not show the data publicly. Is there a way to include this info from the admin area?

A workaround might be to make the

Code: Select all

".$row->visits." ".$PMF_LANG["msgViews"]."
the same color as the background. That way I can highlight over it to see the hits when I want to, but noone else will know they are there.

But when I try to insert

Code: Select all

<font color="#172244">".$row->visits." ".$PMF_LANG["msgViews"]."</font>
(or similar variations) it returns a blank page...

Is there a way to code this differently so it will be the same background color?...I bet stylesheet editing might do it too, but I don't completely understand that either - just enough to make changes by trial & error.

Thanks for your work.

-Holgate-
www.chingdiscgolf.com
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which version do you use?
Then I can post a hack for you....

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Holgate
Posts: 12
Joined: Tue Jul 12, 2005 4:57 pm

Post by Holgate »

I'm using phpMyFaq 1.4.9
(Server Details)
Alberto
Posts: 4
Joined: Thu Sep 29, 2005 2:52 pm
Contact:

Post by Alberto »

i'm may be wrong but as the majority of web site are unilingual,
would it be possible to rather make it as an option in the admin so
we shouldn't change any code after each update?

Best Regards
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this is planned for a future version.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Alberto
Posts: 4
Joined: Thu Sep 29, 2005 2:52 pm
Contact:

Post by Alberto »

Nothing else to say but excellent! :D
Post Reply