Hello,
How can I remove the view count (number of views) for all articles? For me it appears on the Index.php?action=show&cat=3 pages.
I searched the templates but could not find where to remove this.
Thanks, =J
Removing view count
Moderator: Thorsten
Re: Removing view count
Hi,
I can provide a hack, but you have to change the code after each phpMyFAQ update.
bye
Thorsten
I can provide a hack, but you have to change the code after each phpMyFAQ update.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Removing view count
That's fine, a hack will work. I'll remember to change it for each update.
Re: Removing view count
Hi,
please open inc/Faq.php at line 445 and change this code
to this
bye
Thorsten
please open inc/Faq.php at line 445 and change this code
Code: Select all
$listItem = sprintf('<li>%s<span id="viewsPerRecord"><br /><span class="little">(%s)</span>%s</span></li>',
$oLink->toHtmlAnchor(),
$this->plr->GetMsg('plmsgViews', $visits),
($row->sticky == 1) ? '<br /><br />' : '');Code: Select all
$listItem = sprintf('<li>%s</li>',
$oLink->toHtmlAnchor());Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
ElectronicWar
- Posts: 1
- Joined: Fri Jun 15, 2012 11:01 am
- Location: Germany
Re: Removing view count
Would be great to have this as an option in a future version (same with complete removal of social sharing which already seems to be some sort of standalone option in the templates).
Re: Removing view count
May I kindly know how to do this in v2.8.1 ?
No much luck modifying Faq.php
Thanks in advance.
No much luck modifying Faq.php
Thanks in advance.
Re: Removing view count
Hi,
for 2.8.1, it's line 433 in inc/PMF/Faq.php, change
to
bye
Thorsten
for 2.8.1, it's line 433 in inc/PMF/Faq.php, change
Code: Select all
$renderedItems[] = sprintf(
'<li%s>%s<span id="viewsPerRecord"><br /><small>(%s)</small></span></li>',
($row->sticky == 1) ? ' class="sticky-faqs"' : '',
$oLink->toHtmlAnchor(),
$this->plr->GetMsg('plmsgViews', $visits)
);Code: Select all
$renderedItems[] = sprintf(
'<li%s>%s</li>',
($row->sticky == 1) ? ' class="sticky-faqs"' : '',
$oLink->toHtmlAnchor()
);Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Removing view count
Many thanks! It works =)