For example, if www.domain.com has 6 things submitted:
www.domain.com/post1
www.domain.com/post2
www.domain.com/post3
www.domain.com/post4
www.domain.com/post5
www.domain.com/post6
I want to display a number next to the www.domain.com (6 entries) like this.
I have come with an sql query:
Code:
SELECT count(*) as cnt, link_url from pligg_links GROUP BY link_url
Code:
// link count
$urlcount = $db->get_results('SELECT count(*) as cnt, link_url from pligg_links' . ' GROUP BY link_url ');
$main_smarty->assign('urlcount', $urlcount);
Code:
{if $pagename eq "story"}
{if $url_short eq "http://" OR $url_short eq "://" OR $url_short eq "1"}
{$title_short}
{else}
<a href="{$story_url}">{$title_short}{
$urlcount
}</a>
{/if}
{else}
<a href="{$story_url}" onclick="sendClickedValue({$link_id},{$link_shakebox_index});">{$title_short}</a>
{/if}
{/if}
In phpMyAdmin, after I run the query I get:

Perhaps between all of us we can get this working.
Geoserv.




Linear Mode

