Advertising
Paste Description for Forum topic 139295
Here is the code from the plugin. It gets it's tags from the postmeta table. I'd have to adjust it to get it from the new table structure for tagging.
- Forum topic 139295
- Wednesday, October 24th, 2007 at 1:20:56pm MDT
- function get_TagsBit()
- {
- global $wpdb;
- $bon_TechnoTaggingOptions = bon_technoratiTaggingLoadOptions();
- if ($technoTag_tagbitlink == '')
- {
- $technoTag_tagbitlink = $bon_TechnoTaggingOptions['technoTag_link'];
- }
- $where = '';
- $limit = '';
- if ($bon_TechnoTaggingOptions['technoTag_tagbit_numdays'] > 0)
- {
- }
- if ($bon_TechnoTaggingOptions['technoTag_tagbit_numposts'] > 0)
- {
- $limit = ' LIMIT ' . $bon_TechnoTaggingOptions['technoTag_tagbit_numposts'];
- }
- // load the tags
- $tagData = implode(",", $wpdb->get_col("SELECT meta_value FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID=$wpdb->postmeta.post_id WHERE (meta_key='ttaglist' OR meta_key='technorati') AND post_status='publish'$where ORDER BY post_date DESC$limit"));
- // work out the frequency of each of the tags
- foreach ($tagArray as $tag)
- {
- if ($tag != '')
- {
- $tagsFreqData[$tag] = 1;
- else
- $tagsFreqData[$tag]++;
- }
- }
- // sort into order
- // get the min/max frequency
- // make sure we have the right number of tags
- if ($bon_TechnoTaggingOptions['technoTag_tagbits_count'] > 0)
- {
- $tagsFreqData = array_slice($tagsFreqData, 0, $bon_TechnoTaggingOptions['technoTag_tagbits_count']);
- }
- // get the names of the tags in alphabetical order, used to output
- // the list in alphabetical order.
- foreach ($tagNames as $tag)
- {
- $size = bon_technoratiTagging_get_tagbit_fontsize($tagsFreqData[$tag], $freqMax, $freqMin);
- $colour = bon_technoratiTagging_get_tagbit_color($tagsFreqData[$tag], $freqMax, $freqMin);
- $tagFixed = bon_technorati_fixTag($tag);
- $tagDoneData[] = ' ' . $tag . ' ';
- }
- }
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.