I am so blessed today. I took some break from work and try to add some codes to make our bogs to have a view counter. While trying and testing, I have connected with an unknown person by the name “WebmasterX”. He assisted me in codings. I wanted to donate for his work, but he refuses to (he could be angel, lol).
We have discovered that PhpFoX program that we are using, has a built in function to count the number of views for blogs, but was never implemented in the template files.
So with the email support of “WebmasterX” I have added view counters for our blogs. Those who have posted, your counters are on. They are the actual access #. You shall see viewed counters in “main page-next to comment and view entry” , and the "Read page", next to your usernam".
Coding reference:
In view page:
Open /design/templates/default/_modules/view.html
Find
{language text='Mod_Blog.posted_on'} {$aItem.time|date_format:$sDateTimeFormat} {language text='Mod_Blog.lowercase_by'} {$aItem.user}
Replace:
{language text='Mod_Blog.posted_on'} {$aItem.time|date_format:$sDateTimeFormat} Viewed {$aItem.View} times, {language text='Mod_Blog.lowercase_by'}
replace with
PHP Code:
list($aItems, $iCnt) = $oBlogItem->getList($aCond, $iPage, $iPageSize, $oSorter->getOrder(), '', '', 'j.id, j.title, j.text, j.time, j.comment, j.view, u.user', $aJoin);
then go to
design/templates/default/_modules/bloglist.html
find
-if $bAdmin}
-img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" />
-language text="delete"}
{/if}
after it add
-img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" />
Working changing html color and that’s it.