The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]()
I cannot help you until I know what exactly do you want to see as a result.
|
#12
|
|||
|
|||
![]()
I have a shoutbox module for vbadvanced Cmps. The module is really simple. It only uses 1 php file and 1 template.
Here is the php file : Code:
<?php ########################################################################### ## MAJESTIC FORUM SHOUTBOX ########################################################################### ########################################################################### ## REQUIRE BACK-END ########################################################################### require_once('./global.php'); function check($var,$link) { $var = trim($var); if(empty($var)) { header("Location: $link"); } } function swear() { global $comment; $swears["++++"] = "++++"; $swears["++++ing"] = "++++ing"; $swears["++++"] = "++++"; $swears["+++++"] = "+++++"; while(list($text,$image) = each($swears)) { $comment = str_replace("$text","$image","$comment"); } return $comment; } function replace_text_smiley() { global $comment; $faces["text smiley here"] = "img tag to image smile here"; $faces[":lol:"] = "<img src=\"http://forum.ayyas.com/images/smilies/cool.gif \" alt=\"Cool\">"; while(list($text,$image) = each($faces)) { $comment = str_replace("$text","$image","$comment"); } return $comment; } ########################################################################### ## CONDITION ONE ########################################################################### $is = "view"; if(isset($setting) && !empty($setting) && $setting == "save") { ########################################################################### ## HEAD INFO ########################################################################### $back = $HTTP_REFERER; ########################################################################### ## CHECK DO ########################################################################### if($is == "ref") { header("Location: shoutbox.php"); } ########################################################################### ## CHECK SHOUTBOX STOP NON REGISTERED POSTING ########################################################################### check($name,$back); check($comment,$back); if($bbuserinfo[username]!=$name || $bbuserinfo[userid]==1) { ?> <font face="Verdana" size="1"> <?echo('Vur Kac a yazabilmeniz icin kayit olmaniz gerekiyor.');?> </font> <? exit; } ########################################################################### ## SAVES SHOUTBOX ########################################################################### $user=$bbuserinfo[userid]; if(!mysql_query("INSERT INTO adv_shoutbox (name,comment,postuserid) VALUES ('$name','$comment','$user')")) { $url = 'shoutbox.php?is=save'; header("Location: $url"); } else { ########################################################################### ## LIMIT SHOUTS TO STOP IT FILLING DATABASE [$maxi - 100] <--- CHANGE THIS TO YOUR LIMIT ########################################################################### $res = mysql_query("SELECT max(id) FROM adv_shoutbox"); $maxi = mysql_result($res, 0); mysql_query("DELETE FROM adv_shoutbox WHERE id < ($maxi - 200)"); header("Location: shoutbox.php"); } } if(empty($setting) || $setting == "view") { ########################################################################### ## DISPLAY SHOUTS FROM TABLE ########################################################################### $result = mysql_query("SELECT * FROM adv_shoutbox ORDER BY id DESC LIMIT 100") or die (mysql_error()); $num_res = mysql_num_rows($result); if($num_res == "0") { echo 'There are no shouts yet.'; ?> <form action="shoutbox.php" method="post"> <input type="hidden" name="setting" value="save"> <input type="text" name="name" value="name"> <br /><input type="text" name="comment" value="comment"> <br /><input type="submit" value="Shout"></form> <? } else { while ($get = mysql_fetch_row($result)) { $name = $get[1]; $comment = $get[2]; $postuserid = $get[3]; $name = strip_tags($name); $comments = strip_tags($comments); $comment = nl2br($comment); replace_text_smiley(); swear(); ########################################################################### ## SET YOUR OWN COLOURS HERE ########################################################################### ?> <body bgcolor="#060606" text="#999999" link="#ff0000" alink="#ff0000" vlink="#ff0000"> <font face="verdana" size="1"><a href="member.php?u=<? echo "$postuserid"; ?>" target="blank"> <b><? echo "$name"; ?></b></a><br><? echo "$comment"; ?><br><br></font></body> <? } } } ########################################################################### ## CONDITION THREE BAN ERROR ########################################################################### if($is == "ban") { echo 'You are banned from the shoutbox. So just leave now.'; exit; } ########################################################################### ## CONDITION FOUR ERROR ON SHOUT ########################################################################### if($is == "save") { echo 'There was an error in saving your shoutbox.'; exit; } ########################################################################### ## MAJESTIC FORUM SHOUTBOX ########################################################################### ?> Code:
<!-- Shoutbox --> <script type="text/javascript"> var timer_id; function scroll_iframe(frm,inc,dir) { if (timer_id) clearTimeout(timer_id); if (window.frames[frm]) { if (dir == "v") window.frames[frm].scrollBy(0, inc); else window.frames[frm].scrollBy(inc, 0); timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20); } } function stopScroll() { if (timer_id) clearTimeout(timer_id); } </script> <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder"width="100%"> <tr><td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] $mods[title]</strong></span> <a href="javascript:;" onmouseover="scroll_iframe('shoutbox', -4, 'v'); window.status='Hover here to scroll up.'; return true" onmouseout="stopScroll(); window.status=''; return true"><img src="http://forum.ayyas.com/images/tri-up.gif" valign="top" align="right" width="12" height="12" alt="Yukarı" border="0"></a></td></tr> <tr><td class="alt1"><span class="smallfont"> <DIV ID=oDiv STYLE="width: 158px; height: 254px; overflow: hidden;"> <iframe class="alt1" marginwidth="2" marginheight="2" name="shoutbox" noresize scrolling="no" align="middle" frameborder="0" height="250" width="100%" src="forum/shoutbox.php" id="shoutbox"></iframe></DIV> <form action="forum/shoutbox.php" method="post" target="shoutbox"> <input type="hidden" name="setting" value="save" /> <input type="hidden" name="name" value="$bbuserinfo[username]" size="20" /> <input type="text" name="comment" value="eşeğim ben" size="20" maxlength="100" /><br> <input class="button" type="submit" value="Bağır ?ağır" /></form></span> <a href="javascript:;" onmouseover="scroll_iframe('shoutbox', 4, 'v'); window.status='Hover here to scroll down.'; return true" onmouseout="stopScroll(); window.status=''; return true"><img src="//forum.ayyas.com/images/tri-dn.gif" valign="top" align="right" width="12" height="12" alt="Aşağı" border="0"></a></td></tr></table><br /> <!-- Shoutbox --> check another style to see : http://www.ayyas.com/?styleid=39 |
#13
|
|||
|
|||
![]()
Hi
You are calling a include on './global.php' So you have all your style var(s) ready to be accessed! I don't know what CSS style var(s) you want to use, but you can decide by just doing this! To see what colors you want to use.... PUT THIS IN YOUR SCRIPT! Code:
print_r ( $stylevar ); Code:
Array ( [body_fgcolor] => #2d24c6 [page_bgcolor] => #ffffff [page_fgcolor] => #B9B9B9 [tborder_bgcolor] => #7a89ea [tborder_fgcolor] => #ffffff [tcat_bgcolor] => #7a89ea [tcat_fgcolor] => #f9f95b [thead_bgcolor] => #fafa86 [thead_fgcolor] => #372fd9 [tfoot_bgcolor] => #F9F9F9 [tfoot_fgcolor] => #372fd9 [alt1_bgcolor] => #ffffff [alt1_fgcolor] => #000000 [alt2_bgcolor] => #ffffff [alt2_fgcolor] => #000000 [wysiwyg_bgcolor] => #ffffff [wysiwyg_fgcolor] => #000000 [smallfont_fgcolor] => #000000 [time_fgcolor] => #000000 [navbar_fgcolor] => #000000 [highlight_fgcolor] => #FF0033 [fjsel_bgcolor] => #ffffff [fjsel_fgcolor] => #655de1 [fjdpth0_bgcolor] => #f7f7f7 [fjdpth0_fgcolor] => #000000 [panel_bgcolor] => #ffffff [panel_fgcolor] => #000000 [panelsurround_bgcolor] => #fafa86 [panelsurround_fgcolor] => #000000 [legend_fgcolor] => #372fd9 [vbmenu_control_bgcolor] => #fafa86 [vbmenu_control_fgcolor] => #655de1 [vbmenu_popup_bgcolor] => #ffffff [vbmenu_popup_fgcolor] => #655de1 [vbmenu_option_bgcolor] => #fafa86 [vbmenu_option_fgcolor] => #655de1 [vbmenu_hilite_bgcolor] => #ffffff [vbmenu_hilite_fgcolor] => #655de1 ) Then just select the style var(s) you want to use... (remember to remove [print_r ( $stylevar );] after getting the array that you will use as your guide!) example.... Code:
################################################## ######################### ## SET YOUR OWN COLOURS HERE ################################################## ######################### ?> <body bgcolor="<?=$stylevar['thead_bgcolor'];?>" text="<?=$stylevar['thead_fgcolor'];?>" link="<?=$stylevar['thead_fgcolor'];?>" alink="<?=$stylevar['tfoot_fgcolor'];?>" vlink="<?=$stylevar['thead_fgcolor'];?>"> <font face="verdana" size="1"><a href="member.php?u=<? echo "$postuserid"; ?>" target="blank"> <b><? echo "$name"; ?></b></a><br><? echo "$comment"; ?><br><br></font></body> <? } Sonia |
#14
|
|||
|
|||
![]()
Thanks Sonia
![]() ![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|