Store Community Support Documentation

When you hover over a photo thumbnail it shows number of views and likes, but not the number of comments. Can you please add this to next version?


What page is this on?  Take a snapshot off the phpfox demo?

Jonathan Mitchell

from the Photo module/page

nocomment.jpg 62.74 Kb . 20 Views

Another hack which will have to updated on photo app upgrades as well as a regular upgrade.  But, if you can't wait until 4.9, then here you go bud!


Make sure to make a backup copy of this original file and call it photo_entryORG.html.php (Org standing for original in case something goes wrong)

Then make another duplicate of the change and call this photo_entryNEW.html.php (as a backup in case something happens and the actual file gets written over you won't have to search for this thread)

Just replace the entire div called Item-inner starting at line 7 through 18 with the code below.

        <div class="item-inner {if $aForms.hasPermission}has-permission{/if}">

            <div class="item-stats text-uppercase mb-1">
                {if $aForms.total_like > 0}<span class="mr-2">{$aForms.total_like|short_number}{if $aForms.total_like == 1} {_p('like')}{else} {_p('likes')}{/if}</span>{/if}
                {if $aForms.total_view > 0}<span class="mr-2">{$aForms.total_view|short_number}{if $aForms.total_view == 1} {_p('view')}{else} {_p('views')}{/if}</span>{/if}
                {if $aForms.total_comment > 0}<span>{$aForms.total_comment|short_number}{if $aForms.total_comment == 1} {_p('commment')}{else} {_p('comments')}{/if}</span>{/if}
            <a class="item-title fw-bold" {if !$aForms.can_view} onclick="tb_show('{_p('warning')}', $.ajaxBox('photo.warning', 'height=300&width=350&link={$}')); return false;" href="javascript:;" {else} href="{$}" {/if}>
            {if !isset($bNotShowOwner) || !$bNotShowOwner}
                <span class="item-author">{_p var='posted_by'} {$aForms|user}</span>


Don't forget to clear your cache :)

Jonathan Mitchell

lol, yeah..thats why I put it in feature requests section....if phpfox does it, I wont have to remember to every time I upgrade. ..Thanks, I will try this later on when I have time

Jonathan Mitchell

ok, if anyone else is interested, this works like a charm! Thanks JohnJr for taking the time to check this out and fix it. Hopefully phpfox will implement this fix in next photo module update. Seems to me that this should have been there all along. lol