vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   BVShoutbox FULLL (https://vborg.vbsupport.ru/showthread.php?t=63562)

Lionel 11-27-2004 03:51 PM

Quote:

Originally Posted by mooecow
he just took the code im guessing and went about putting it in the FORUMHOME template and then took the redirection and put it in the head area

you have to put the redirection in the php as per intructions below (last)

This code below above the line towards the end in forum/index.php

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###

PHP Code:

    $shouts $DB_site->query("
        SELECT s.*, u.username
        FROM " 
TABLE_PREFIX "shout s
        LEFT JOIN " 
TABLE_PREFIX "user u ON (u.userid = s.userid)
        ORDER BY dateline " 
$vboptions['shoutframeorder'] . ", shoutid " $vboptions['shoutframeorder'] . " LIMIT " $vboptions['shoutframeamount'] . "
    "
);
    while (
$shout $DB_site->fetch_array($shouts))
    {
        
$shout['date'] = vbdate($vboptions['dateformat'], $shout['dateline']);
        
$shout['time'] = vbdate($vboptions['timeformat'], $shout['dateline']);
        
$shout['pagetext'] = parse_bbcode($shout['pagetext'], 'shoutbox');

        if (
$shout['userid'] == 0)
        {
            
$shout['username'] = "<i>" $vbpharse['guest'] . "</i>";
        }

        if (
substr(strtolower($shout['pagetext']), 03) == "/me")
        {
            
$shout['pagetext'] = str_replace("/me """$shout['pagetext']);
            eval(
'$shoutbits .= "' fetch_template('shoutbox_main_message_me') . '";');
        }
        else
        {
            eval(
'$shoutbits .= "' fetch_template('shoutbox_main_message') . '";');
        }
    } 

place this in forumhome before </head>


PHP Code:

<script language="javascript">
<!--
function 
validate(theform)
{
    if (
theform.message.value == "")
    {
        
alert('$vbphrase[you_must_enter_a_shout]');
        return 
false;
    }
    else
    {
        return 
true;
    }
}
//-->
</script


replace the iframe code in forumhome (below $navbar or where you have it) with:

PHP Code:

<!-- shoutbox -->
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="$stylevar[tablewidth]align="center">
<
thead>
    <
tr>
        <
td class="tcat" colspan="2">
            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumhome_shoutbox')"><img id="collapseimg_forumhome_shoutbox" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_shoutbox].gif" alt="" border="0" /></a>
            <if 
condition="$bbuserinfo[userid] > 0"> <a href="shoutbox.php?$session[sessionurl]"></if>Short Public Messages<if condition="$bbuserinfo[userid] > 0"> </a></if> <if condition="$bbuserinfo[userid] > 0"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<form action="shoutbox.php" method="post" onsubmit="return validate(this);" name="shoutform">
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="do" value="insert" />
<
input type="text" style="background-color:#DBDBDB;width:80;" name="message" id="message" value="" size="60" />
<
input style="background-color:#DBDBDB;border:1px solid color:#C0C0C0;height:21px;"
type="submit" value="$vbphrase[shout]class="button" />
</
form> </if></td>
    </
tr>
</
thead>
<
tbody id="collapseobj_forumhome_shoutbox" style="$vbcollapse[collapseobj_forumhome_shoutbox]">
    <
tr>
        <
td class="alt1" width="100%">

        
$shoutbits
        
</td>
    </
tr>
</
tbody>
</
table>
<!-- 
end shoutbox --> 

replace your shoutbox_main_message template with:

PHP Code:

<div class="smallfont">[$shout[date] <span class="time">$shout[time]</span>] <strong>$shout[username]:</strong>-
                    
$shout[pagetext]</div

I got it set in admincp to display only one shout. If you want to display more, place:

<div style="height:30px; width:100%; overflow:auto;"> in forumfome shoutbox code before $shoutbits and that will add a scrollbar. And then goodbye iframe.


And don't forget in shoutbox.php to replace the redirection.

PHP Code:

    // insert into the database
    
$DB_site->query("INSERT INTO " TABLE_PREFIX "shout
        (userid, dateline, pagetext)
    VALUES
        (
$bbuserinfo[userid], " TIMENOW ", '" addslashes($pagetext) . "')
    "
);
    
$shoutid $DB_site->insert_id();

    
header("Location: http://yoursite.com/forums");

    exit; 

The same thing can be done with homepage, by simply inserting the code in there.


And the other guy wants to make people pay for this????

Tru Smiles 11-27-2004 05:47 PM

I get "Fatal error: Call to undefined function: parse_bbcode() in /home/perfecte/public_html/comm/forum/index.php on line 542" when I try and do that with the index.php o_O I do have a few other hacks installed though.

And I think the other guy meant that he would pay people if they did this :P

Lionel 11-27-2004 06:53 PM

put this in before new code
require_once('./includes/functions_bbcodeparse.php');

as for free... here is one of the two posts

https://vborg.vbsupport.ru/showpost....&postcount=143

Tru Smiles 11-28-2004 07:34 AM

I didn't realise you had to pay for support o_O

Right, the main page is loading and everything, and the redirect code is into shoutbox.php, but when I click on shout, it just loads up a blank page with nothing. Maybe this script just doesn't like me or something :P

If I can't get it working right, I'll have to figure out how to uninstall it again.

Lionel 11-28-2004 02:40 PM

Quote:

Originally Posted by Tru Smiles
I didn't realise you had to pay for support o_O

Right, the main page is loading and everything, and the redirect code is into shoutbox.php, but when I click on shout, it just loads up a blank page with nothing. Maybe this script just doesn't like me or something :P

If I can't get it working right, I'll have to figure out how to uninstall it again.

you probably skip the step of the javascrit in the <head> </head>. This is meant to validate the form and prevent what you are saying from happening. (the blank page). Instead you get an alert box.

Tru Smiles 11-28-2004 07:36 PM

Yeah, I put that in the forumhome head the first time, and nothing o_O;;

I think I'll have to uninstall it, so, uh, thanks very much for your help ^__^

Tru Smiles 11-30-2004 07:42 AM

Actually, its gonna be very difficult to uninstall, as I have added about five more extra hacks to it >_< So, do I have to pay to get support for it? o_O

Kagen 11-30-2004 05:01 PM

my problem is i cant even run the shoutbox install or anything

X-Sector 12-05-2004 06:19 AM

I get this MySQL database error when updating the usergroup.php

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'Registered Users',
description = '',
usertitle = '',
opentag = '',
closetag = '',
passwordexpires = '0',
passwordhistory = '0',
attachlimit = '0',
avatarmaxwidth = '100',
avatarmaxheight = '100',
avatarmaxsize = '20000',
profilepicmaxwidth = '100',
profilepicmaxheight = '100',
profilepicmaxsize = '65535',
pmquota = '50',
pmsendmax = '5',
uttstore_discount = '0',
canaddshout = '0',
candropshout = '0',
candropothershout = '0',
caneditshout = '0',
caneditothershout = '0',
canreadshouts = '0',
forumpermissions = '127487',
pmpermissions = '3',
calendarpermissions = '19',
wolpermissions = '1',
adminpermissions = '0',
genericpermissions = '2889415',
genericoptions = '30',
arcadepermissions = '19'
WHERE usergroupid=2
mysql error: Unknown column 'canaddshout' in 'field list'

mysql error number: 1054

Date: Sunday 05th of December 2004 12:15:44 AM
Script: http://www.xelation.net/forums/admincp/usergroup.php
Referer: http://www.xelation.net/forums/admin...&usergroupid=2
Username: logica
IP Address: 62.255.32.11

I'm really not sure what to do..

X-Sector 12-05-2004 04:39 PM

*Bump* :(


All times are GMT. The time now is 11:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01517 seconds
  • Memory Usage 1,805KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete