plugins/SpecialPageFuncs.php
changeset 967 a267c5be7963
parent 960 e74741b8360b
child 1081 745200a9cc2a
equal deleted inserted replaced
966:2db0975aa31a 967:a267c5be7963
   616   }
   616   }
   617   
   617   
   618   $template->footer();
   618   $template->footer();
   619 }
   619 }
   620 
   620 
   621 // tag cloud sidebar block
       
   622 function sidebar_add_tag_cloud()
       
   623 {
       
   624   global $db, $session, $paths, $template, $plugins; // Common objects
       
   625   global $lang;
       
   626   $cloud = new TagCloud();
       
   627     
       
   628   $q = $db->sql_query('SELECT tag_name FROM '.table_prefix.'tags;');
       
   629   if ( !$q )
       
   630     $db->_die();
       
   631   if ( $db->numrows() < 1 )
       
   632   {
       
   633     $sb_html = $lang->get('pagetools_tagcloud_msg_no_tags');
       
   634   }
       
   635   else
       
   636   {
       
   637     while ( $row = $db->fetchrow() )
       
   638     {
       
   639       $cloud->add_word($row['tag_name']);
       
   640     }
       
   641     $sb_html = $cloud->make_html('small', 'justify') . '<br /><a style="text-align: center;" href="' . makeUrlNS('Special', 'TagCloud') . '">' . $lang->get('pagetools_tagcloud_sidebar_btn_larger') . '</a>';
       
   642   }
       
   643   $template->sidebar_widget('pagetools_tagcloud_sidebar_title', "<div style='padding: 5px;'>$sb_html</div>");
       
   644 }
       
   645 
       
   646 $plugins->attachHook('compile_template', 'sidebar_add_tag_cloud();');
       
   647 
       
   648 function page_Special_Autofill()
   621 function page_Special_Autofill()
   649 {
   622 {
   650   global $db, $session, $paths, $template, $plugins; // Common objects
   623   global $db, $session, $paths, $template, $plugins; // Common objects
   651   global $lang;
   624   global $lang;
   652   
   625