• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Mây Tag( Flash Tags) vBulletin Version: 4.X.X

[King-Game]

New Member
Untitled.jpg

Admincp->vBullietin CMS->Widgets->Create New Widget
Chọn PHP Direct Execution để làm Widget
Title : Flash Tags
Click Configure để dán vào widget.Xóa code PHP có sẵn trong đó
Dán đoạn PHP này vào:
Mã: [ Xem ]
$flashWidth = 250;$flashHeight = 250;$flashPath = 'tagcloud.swf';$flashBackgroundColor = 'ffffff';$tagCount = 30;$tagMaxSize = 16;$tagMinSize = 8;// Colors are in hex$data['tcolor'] = '0x000000';$data['tcolor2'] = '0x336699';$data['hicolor'] = '0x000000';$data['speed'] = 100;$data['distr'] = 'true';$data['mode'] = 'tags';$contentTypes = array(2=>'tags.php?tag=',15=>'blog.php?tag=');/* No Editing Below This Line*/global $vbulletin;// %d$query = sprintf("SELECT Tag.tagid, Tag.tagtext, TagContent.contenttypeid, COUNT( TagContent.tagid ) AS count FROM ".TABLE_PREFIX."tag AS Tag LEFT JOIN ".TABLE_PREFIX."tagcontentAS TagContent ON ( Tag.tagid =TagContent.tagid ) GROUP BY TagContent.tagid ORDER BY count DESC LIMIT%d",$tagCount);$qtags = vB::$db->query_read($query);while($tag = vB::$db->fetch_array($qtags)) {$tags[] = $tag;$tagSize[$tag['tagtext']] =$tag['count']; // largest and smallest array values$maxQty = max(array_values($tagSize));$minQty = min(array_values($tagSize));$spread = $maxQty - $minQty;if ($spread == 0) {$spread = 1; $step = ($tagMaxSize -$tagMinSize) / ($spread);// make the tag cloud$tagsHTML = "";foreach ($tags as $tag){$size = round($tagMinSize (($tag['count'] - $minQty) *$step));$text = $tag['tagtext'];$url =$vbulletin->options['homeurl'].'/'.$contentTypes[$tag['contenttypeid']].urlencode($tag['tagtext']);$tagsHTML .= "<a href='$url' style='$size'>$text</a>"; $data['tagcloud'] = '<tags>'.$tagsHTML.'</tags>';$flashVars = "";foreach($data as $var=>$val){$flashVars .= (empty ($flashVars))?'':'&amp;';$flashVars .="$var=".urlencode($val); ob_start();?><embed width="<?php echo$flashWidth;?>" height="<?php echo $flashHeight;?>" flashvars="<?php echo$flashVars;?>" wmode="transparent" allowscriptaccess="always" quality="high" bgcolor="#<?php echo$flashBackgroundColor;?>" name="vbCloudFlash" id="vbCloudFlash" style="" src="<?php echo $vbulletin->options['homeurl'].'/'.$flashPath;?>" type="application/x-shockwave-flash"/><?php$content = ob_get_contents();ob_end_clean();$output = $content;
Bạn thay đổi phần bôi đỏ để hợp với 4rum của mình.
$flashWidth = 250; và$flashHeight = 250; chỉnh cho hợp với Widget hoặc block.
Download file đính kèm rồi up lên host , lưu ý thay đường dẫn đến file đó vào chỗ tagcloud.swf, đường dẫn kiểu images/tagcloud.swf
Phần 'tags.php?tag=',15=>'blog.php?tag='); thì thay cho hợp với 4rum của bạn. Nếu 4rum của bạn là domain.com/forum/index.php thì đổi thành 'forum/tags.php?tag=',15=>'forum/blog.php?tag='); .
Tiếp tục vào : Admincp->vBullietin CMS->LayoutManager
Click Tiếp tục vào Layout bạn muốn cho vào.
Thếm cái Widget mới tạo tới Layout của bạn.
Nói chung là vậy, làm thôi.
http://www.mediafire.com/?1ib5i31k0ygkrcm
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top