International > Arabic / قسم الدعم الفني

كلمات بحث علي طريقة ويب ستايل

(1/4) > >>

asms:
افتح ملف :
includes/page_header.php
اضاف هذ الكود قبل ?>:
في انهاية الصفحة

--- Code: ---$site_template->register_vars(array(
  "lang_keyword" => $lang['keywords'], //---[/[MOD] Tag Clouds]
  "show_tag_clouds" => get_tag_clouds() //---[/[MOD] Tag Clouds]
));
--- End code ---
افتح ملف:
includes/functions.php
اضاف هذ الكود قبل ?>:
في انهاية الصفحة

--- Code: ---//---[ [MOD] Tag Cloud]
function get_tag_clouds() {
global $site_db, $lang, $site_sess, $mode;
$output = "";
   
  $sql = "SELECT i.word_id, i.word_text, COUNT(c.word_id) AS quantity
  FROM ".WORDLIST_TABLE." i
LEFT JOIN ".WORDMATCH_TABLE." c ON i.word_id = c.word_id
WHERE keys_match > 0
  GROUP BY i.word_text
  ORDER BY  RAND()
LIMIT 20";

  $result = $site_db->query($sql);
  while ($row = $site_db->fetch_array($result)) {
    $tags[$row['word_text']] = $row['quantity'];
  }
 
  //uncommentnext line to sort the tag array in reverse order (+ => -)
   //arsort($tags);   
        $max_size = 250; // max font size in %
        $min_size = 50; // min font size in %
       
        // largest and smallest array values
        $max_qty = max(array_values($tags));
        $min_qty = min(array_values($tags));
       
        // find the range of values
        $spread = $max_qty - $min_qty;
        if ($spread == 0) { // we don't want to divide by zero
                $spread = 1;
        }
       
        // set the font-size increment
        $step = ($max_size - $min_size) / ($spread);
       
        // loop through the tag array
        foreach ($tags as $key => $value) {
                // calculate font-size
                // find the $value in excess of $min_qty
                // multiply by the font-size increment ($size)
                // and add the $min_size set above
                $size = round($min_size + (($value - $min_qty) * $step));
       
                $output .= '<a href="'.$site_sess->url(ROOT_PATH."search.php?search_keywords=".$key.((!empty($mode)) ? "&amp;mode=".$mode : "")).'" style="font-size:'.$size.'%;color:rgb('.mt_rand(0, 255).', '.mt_rand(0, 255).', '.mt_rand(0, 255).');font-family:Verdana, Arial, Helvetica, sans-serif;" title="'.$value.' '.$lang['tagged_with'].' '.$key.'">'.$key.'</a> ';
        }

 
  return $output;
}
//---[/[MOD] Tag Cloud]
--- End code ---
افتح ملف اللغة 
 main.php
اضاف هذ الكود قبل ?>:
في انهاية الصفحة

--- Code: ---$lang['tagged_with'] = "صورة في كلمة: ";
--- End code ---
يمكنك وضع هذ الكود في اي مكن في
الثيم الموقع

--- Code: ---{show_tag_clouds}
--- End code ---

sammas:
شكرا لك وبارك اله فيك
لم اعرف ان هناك دعم عربي الآن رأيته وحبيت اشكر جهودك به

DOHA:
بارك الله فيك ياخوي.....

sysay.com:
جزاك الله كل خير اخي

لك اتمنى توضح فائدة الموديلات اللي تنزلها

وياريت تحط صور بالشرح، وأمثلة على الموديلات

وشكراً لك

asms:
مثل هذا الموقع
http://bnathi.com
تضهر كلمات متغيرة

Navigation

[0] Message Index

[#] Next page

Go to full version