The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vB Shout in one forum
I asked a guy on a forum that has it working in one forum and he said:
Quote:
Thanks! :banana: bump |
#2
|
|||
|
|||
bump
|
#3
|
|||
|
|||
Code:
<if condition="$forum[forumid]=='x'">vb shout code</if> |
#4
|
|||
|
|||
Quote:
Thanks for the reply by the way. |
#5
|
|||
|
|||
Place it in the forumdisplay template, but that way will probably need changes to the shoutbox plugins and code,
-or- Install the vBShout on all pages add on which makes changes to the code to make it available for global useage, then instead of putting the code in the navbar template as instructed by those instructions, place in the forumdisplay template under Code:
$navbar |
#6
|
|||
|
|||
which code do I put in the forumdisplay template? How much do I follow their steps and then branch off into my own?
|
#7
|
|||
|
|||
follow until it gets to the template edit, then what it says to put in the navbar put into forumdisplay and put your conditional around it.
|
#8
|
|||
|
|||
I asked the same a while back on vb.com
The only difference though, I also installed the hack to display it on all forums, but then this ; http://www.vbulletin.com/forum/showthread.php?t=185031 |
#9
|
|||
|
|||
I put this code in the forumdisplay template:
PHP Code:
Quote:
|
#10
|
|||
|
|||
Code:
$Used = 0; $UsedArr = array(); $smilies = $db->query_read(" SELECT smilieid, smilietext, smiliepath, smilie.title, imagecategory.title AS category FROM " . TABLE_PREFIX . "smilie AS smilie LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid) ORDER BY imagecategory.displayorder, smilie.displayorder "); $Smilie_Build = ''; $Total_Smilies = $db->num_rows($smilies); if ($Total_Smilies > 0) { while ($emo = $db->fetch_array($smilies)) { if ($vbulletin->options['shout_smilies_show'] > 0) { $Smilie_Cache[] = $emo; } else { $Smilie_Build .= '<a href="#" onclick="return sb_Smilie(\''.$emo['smilietext'].'\')"><img src="'.$emo['smiliepath'].'" alt="'.$emo['title'].'" border="0" /></a> '; } } if ($vbulletin->options['shout_smilies_show'] > $Total_Smilies) { $vbulletin->options['shout_smilies_show'] = $Total_Smilies; } if ($vbulletin->options['shout_smilies_show'] > 0) { while ($Used < $vbulletin->options['shout_smilies_show']) { $GetEmo = $Total_Smilies; $GetEmo = rand(0, $GetEmo); if (!in_array($GetEmo, $UsedArr) && $Smilie_Cache[$GetEmo]) { $Used++; $GetEmo = $Smilie_Cache[$GetEmo]; $Smilie_Build .= '<a href="#" onclick="return sb_Smilie(\''.$GetEmo['smilietext'].'\')"><img src="'.$GetEmo['smiliepath'].'" alt="'.$GetEmo['title'].'" border="0" /></a> '; } } } } else { $Smilie_Build = 'No Emoticons Available'; } $Options_DropDown = array(); // Items included will be parsed to create drop down menus $DropDowns = array(); // Completed constructed drop down menus $Options_DropDown['font_selector'] = array('Default', 'Arial', 'Arial Black', 'Arial Narrow', 'Book Antiqua', 'Century Gothic', 'Comic Sans MS', 'Courier New', 'Fixedsys', 'Franklin Gothic Medium', 'Garamond', 'Georgia', 'Impact', 'Lucida Console', 'Lucida Sans Unicode', 'Microsoft Sans Serif', 'Palatino Linotype', 'System', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana'); $Options_DropDown['color_selector'] = array(); $Options_DropDown['color_selector'][] = 'Default'; $hex = array(); $hex[] = '0'; $hex[] = '3'; $hex[] = '6'; $hex[] = '9'; $hex[] = 'C'; $hex[] = 'F'; for ($a = 0; $a < 6; $a++) { for ($b = 0; $b < 6; $b++) { for ($c = 0; $c < 6; $c++) { $Options_DropDown['color_selector'][] = '#' . $hex[$a].$hex[$a].$hex[$b].$hex[$b].$hex[$c].$hex[$c]; } } } if (is_array($Options_DropDown)) { foreach ($Options_DropDown as $Menu => $Options) { $DropDowns[$Menu] = ''; if (is_array($Options)) { foreach ($Options as $Selection) { if (preg_match("#^\#([a-z0-9]+)$#i", $Selection)) { $Extra = ' style="color:'.$Selection.';"'; } else { $Extra = ''; } if ($Selection == 'Default') { $Text = (($Menu == 'color_selector') ? 'Color' : 'Font Face') . ' [Default]'; } else { $Text = $Selection; } $DropDowns[$Menu] .= '<option value="'.$Selection.'"'.$Extra.'>'.$Text.'</option>' . "\n"; } } } } if ($vbulletin->options['shout_banned_perms'] == 2 && isBanned($vbulletin->userinfo)) { $Shoutox = ''; } else { eval('$Shoutbox = "' . fetch_template('forumhome_vbshout') . '";'); } switch ($vbulletin->options['shout_position']) { case 1: $Position = '<!-- what\'s going on box -->'; break; case 2: $Position = '<!-- end what\'s going on box -->'; break; case 4: $Position = '<!-- main -->'; break; default: $Position = '$navbar'; break; } $Position = '<!-- / nav buttons bar -->'; $vbulletin->templatecache['navbar'] = str_replace($Position, $Position . '<br /> $Shoutbox', $vbulletin->templatecache['navbar']); |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|