Quote:
Originally Posted by madotds
Hi someone asked me how to add the column for this to there database so I have created a quick picturial HERE for anyone who would like to know. It is not as hard as it sounds
Hope it helps
MaDavis
|
what a nice step by step add-ons tutorial out there mate...thanks a lot for the time you've spent...
but still confused about this thing here
STEP 2: MODIFY PLUGINS - (VSa - ChatBox - MN)
FIND THE FOLLOWING FUNCTIONS
"ccbmessages"
ADD ABOVE: THIS ONE? >>>
$vbulletin->db->show_errors(); OR WHAT?
AND WHAT IS THIS CODE BELOW?
PHP Code:
$tvsacurrent = $vbulletin->db->query_read("SELECT COUNT(ID) AS VSACURRENT FROM ".TABLE_PREFIX."vsa_chatbox AS vsa_chatbox");
while ($tvsacurrent = $vbulletin->db->fetch_array($tvsacurrent))
{
$vsacurrent = $tvsacurrent[VSACURRENT];
}
$tvsauser = $vbulletin->db->query_read("SELECT countvsachats AS VSAUSER FROM ".TABLE_PREFIX."user WHERE userid = " . $vbulletin->userinfo['userid'] ."");
while ($tvsauser = $vbulletin->db->fetch_array($tvsauser))
{
$vsauser = $tvsauser[VSAUSER];
}
if ($vsacurrent > $vsauser)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET countvsachats = ".$vsacurrent." WHERE userid = " . $vbulletin->userinfo['userid'] . "");
}
if ($vsacurrent < $vsauser)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET countvsachats = ".$vsacurrent." WHERE userid = " . $vbulletin->userinfo['userid'] . "");
}
$vsacb_box_totalmessages = $vbulletin->db->num_rows($vsacb_get_msg_box);
STEP 3: SCROLL DOWN AND FIND .... if ($vsacb_box_totalmessages>0)
ADD ABOVE: >>> (notice here I am loading a chat.wav from images\misc - you'll need to upload a wav and change accordingly):
PHP Code:
if ($vsacurrent > $vsauser)
{
echo ('<div><table><tr><td><EMBED SRC="images\misc\chat.wav" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED></td></tr></div>');
}
tried to think to make this work still no luck...

hmmm...