Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
Sermon Browser Tags
29 January, 2012
9:26 pm
jmdezigns
New Member
Forum Posts: 1
Member Since:
29 January, 2012
Offline

Is there some way to limit the number of sermon tags shown in the widget?

7 February, 2012
11:31 am
0be1
Alabama
Guru
Forum Posts: 55
Member Since:
24 January, 2012
Offline

Jmdezigns;

 

I would post a request in the feature request section if it has not already been done. I am not a coder (yet) and doing some initial investigation I am wonder if the section of code located in the frontend.php file is what you are after. Here are the lines of code I found, I just do not know enough on how to manipulate the loop to do what you need it to do.

//Prints tag cloud
function sb_print_tag_clouds($minfont=80, $maxfont=150) {
global $wpdb;
$rawtags = $wpdb->get_results("SELECT name FROM {$wpdb->prefix}sb_tags as t RIGHT JOIN {$wpdb->prefix}sb_sermons_tags as st ON t.id = st.tag_id");
foreach ($rawtags as $tag) {
if (isset($cnt[$tag->name]))
$cnt[$tag->name]++;
else
$cnt[$tag->name] = 1;
}
$fontrange = $maxfont – $minfont;
$maxcnt = 0;
$mincnt = 1000000;
foreach ($cnt as $cur) {
if ($cur > $maxcnt) $maxcnt = $cur;
if ($cur < $mincnt) $minct = $cur;
}
$cntrange = $maxcnt + 1 – $mincnt;
$minlog = log($mincnt);
$maxlog = log($maxcnt);
$logrange = $maxlog == $minlog ? 1 : $maxlog – $minlog;
arsort($cnt);
foreach ($cnt as $tag => $count) {
$size = $minfont + $fontrange * (log($count) – $minlog) / $logrange;
$out[] = '<a style="font-size:'.(int) $size.'%" href="'.sb_get_tag_link($tag).'">'.$tag.'</a>';
}
echo implode(' ', $out);
}

I hope in some way this helps, or that you may have a programmer friend that can help decipher it for you. Best of luck :o)

Grace & peace…

Shawn 

"Evangelism is not a professional job for a few trained men, but is instead the unrelenting
responsibility of every person who belongs to the company of Jesus." - Elton Trueblood
Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

malpan: 2453

jogen: 2440

VanWatterson: 652

GeraldSebring: 364

LucasWoltman: 362

RandellFeenstra: 362

Member Stats:

Guest Posters: 7

Members: 2066

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1071

Posts: 4045

Newest Members: Nixon Designs, zolaperry, tanec69, lbakyl, richdorm, Aaron Velasquez

Moderators: Ben Miller (387)

Administrators: Mark Barnes (425)

Comments are closed.