Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 09-23-2006, 01:07 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Looking for some help please?

Hi peeps

The 1st image is what i am trying to acheive again but with vbshout v2.1

I have done some of this myself but i am now stuck when trying to add the code
to the place i want it to show....Please see the 2nd image.

Here is the vbshout code

Code:
<form action="vbshout.php?{$session['sessionurl']}" method="post" name="vbshoutform" onsubmit="return postShout(this)">
<input type='hidden' name='do' value='shout' />
<input type='hidden' name='color' />
<input type='hidden' name='fontFamily' />
<input type='hidden' name='fontWeight' />
<input type='hidden' name='textDecoration' />
<input type='hidden' name='fontStyle' />

<div id='shout_emo' style='display:none'>
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
            <td class="tcat" align="center">
                Emoticons
            </td>
        </tr>
        <tr>
            <td class='alt2' width='100%' height='100%' align='center' valign='top'>
                $Smilie_Build
            </td>
        </tr>
        </table>
    <br />
</div>
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <thead>
        <tr>
            <td class="tcat" align="center">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_vbshout')"><img id="collapseimg_forumhome_vbshout" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_vbshout].gif" alt="" border="0" /></a>
                <a href='vbshout.php?{$session['sessionurl_q']}do=archive'>Shoutbox</a> &
<font color="red"> <b><a href='view.php?pg=rules'>Forum Rules:</a></b> Have  Fun! but No <b>Spam</b>, No <b>Tech</b> questions and <b>don't</b> ask for Help,</font><br><center><font color="blue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please Post in the correct section and respect fellow members.</font></center>
            </td>
        </tr>
        </thead>
        <tbody id="collapseobj_forumhome_vbshout" style="$vbcollapse[collapseobj_forumhome_vbshout]">
            <tr>
                <td class="alt1" align="left" width="100%">
                <if condition="!$vboptions[shout_editor_position]">
                    <if condition="$bbuserinfo[userid] > 0">
                    <table width='100%' border='0' cellpadding='0' cellspacing='0'>
                        <tr>
                        <td width='100%'>
                            <input type="text" name="shout" style="width: 90%" class="bginput" />
                        </td>
                        <td style='white-space:nowrap' width='1%'>
                            <input type="submit" value="Shout" class="button" />
                            <if condition="$vboptions[shout_extra_options]">
                            <input type='button' class='button' value='Clear' onclick='sb_Clear()' />
                            <input type='button' class='button' value='Smilies' onclick='sb_Smilies(this)' />
                            <input type='button' class='button' style='font-weight:bold' value='B' onclick='sb_PropChange_Button(this, "fontWeight")' />
                            <input type='button' class='button' style='text-decoration:underline' value='U' onclick='sb_PropChange_Button(this, "textDecoration")' />
                            <input type='button' class='button' style='font-style:italic' value='I' onclick='sb_PropChange_Button(this, "fontStyle")' />
                            <select name='font_color' onchange='sb_PropChange(this, "color")'>
                                {$DropDowns['color_selector']}
                            </select>
                            <select name='font_selector' onchange='sb_PropChange(this, "fontFamily")'>
                                {$DropDowns['font_selector']}
                            </select>
                            </if>
                        </td>
                    </tr>
                    </table>
                    <div style="height: 2px"></div>
                    </if>
                </if>
        <div id="vbshout" style="overflow:auto;height:{$vboptions['shout_box_height']}px;width:80%;">
Loading...
    </div>
                <if condition="$vboptions[shout_editor_position]">
                    <if condition="$bbuserinfo[userid] > 0">
                    <div style="height: 2px"></div>
                    <table width='100%' border='0' cellpadding='0' cellspacing='0'>
                    <tr>
                        <td width='100%'>
                            <input type="text" name="shout" style="width: 90%" class="bginput" />
                        </td>
                        <td style='white-space:nowrap' width='1%'>
                            <input type="submit" value="Shout" class="button" />
                            <if condition="$vboptions[shout_extra_options]">
                            <input type='button' class='button' value='Clear' onclick='sb_Clear()' />
                            <input type='button' class='button' value='Smilies' onclick='sb_Smilies(this)' />
                            <input type='button' class='button' style='font-weight:bold' value='B' onclick='sb_PropChange_Button(this, "fontWeight")' />
                            <input type='button' class='button' style='text-decoration:underline' value='U' onclick='sb_PropChange_Button(this, "textDecoration")' />
                            <input type='button' class='button' style='font-style:italic' value='I' onclick='sb_PropChange_Button(this, "fontStyle")' />
                            <select name='font_color' onchange='sb_PropChange(this, "color")'>
                                {$DropDowns['color_selector']}
                            </select>
                            <select name='font_selector' onchange='sb_PropChange(this, "fontFamily")'>
                                {$DropDowns['font_selector']}
                            </select>
                            </if>
                        </td>
                    </tr>
                    </table>
                    </if>
                </if>
                </td>
            </tr>
        </tbody>
        </table>


</form>
<br />

<script type='text/javascript'>
<!--
/* Begin Jedifans's Timestamp Modification */
    var ts_timeFormat='%H:%m:%S';// %H for hours, %m for minutes, %S for seconds
    var ts_dateFormat='%d/%M/%Y';// %d for day of month, %M for month, %Y for year
    var ts_timestampFormat='%D %T';// %D for the Date, %T for the Time
    function doConvert(time){
        time=parseFloat(time);
        time=(time.toString()=='NaN') ? parseFloat('0') : time;
        time=time*1000;
        var t=new Date();
        t.setTime(time);
        var n=new Date();
        var t_date=(t.getDate()==n.getDate() && t.getMonth()==n.getMonth() && t.getFullYear()==n.getFullYear()) ? '' : dateFormatReplace(t);
        var t_time=timeFormatReplace(t);
        var timestamp=ts_timestampFormat.replace(/%D/,t_date).replace(/%T/,t_time);
        return timestamp;
    }
    function dateFormatReplace(t){
        var ret=ts_dateFormat.replace(/%d/,addPrevZero(t.getDate())).replace(/%M/,addPrevZero(t.getMonth())).replace(/%Y/,t.getFullYear());
        return ret;
    }
    function timeFormatReplace(t){
        var ret=ts_timeFormat.replace(/%H/,addPrevZero(t.getHours())).replace(/%m/,addPrevZero(t.getMinutes())).replace(/%S/,addPrevZero(t.getSeconds()));
        return ret;
    }
    function addPrevZero(into){
        var out;
        into=into.toString();
        if(into.length<2){
            out='0'+into;
        }
        else{
            out=into;
        }
        return out;
    }
    /* 
    [[[This is for XML response rather than Text response, IGNORE]]]
    var ts_timestampRegex=new RegExp(/([0-9]+)/);
    */
    var ts_timestampRegex=new RegExp(/\<span class=\"ts\"\>\[ ([0-9]+) \]\<\/span\>/);
    var ts_results,ts_timestamp,ts_unixTimestamp,ts_converted;
    function triggerTimestampConvertions(todo){
        /*
        [[[This is for XML response rather than Text response, IGNORE]]]
        var spans=todo.getElementsByTagName('span');
        for(var i=0;i<spans.length;i++){
            if(spans[i].className=="ts"){
                ts_results=ts_timestampRegex.exec(spans[i].innerHTML);
                ts_unixTimestamp=ts_results[(ts_results.length-1)];
                ts_timestamp=doConvert(ts_unixTimestamp);
                spans[i].innerHTML=spans[i].innerHTML.replace(ts_unixTimestamp,ts_timestamp);
            }
        }
        */
        while(ts_timestampRegex.test(todo)){
            ts_results=ts_timestampRegex.exec(todo);
            ts_timestamp=doConvert(ts_results[1]);
            todo=todo.replace(ts_results[1],ts_timestamp);
        }
        return todo;
    }
/* End Jedifans's Timestamp Modification */
postingShout = false

function requestShouts()
{
    if (!postingShout)
    {
        ShoutRequest = new vB_AJAX_Handler(true)
        ShoutRequest.onreadystatechange(showShouts)
        ShoutRequest.send('vbshout.php', 'nocache=' + (5 * Math.random() * 1.33) )
    }
}

function showShouts()
{
    if (ShoutRequest)
    {
        if (ShoutRequest.handler.readyState == 4 && ShoutRequest.handler.status == 200 && ShoutRequest.handler.responseText)
        {
            Shouts           = fetch_object('vbshout')
            Shouts.innerHTML = '<table cellpadding="1" cellspacing="3" border="0" width="95%" align="left">' + triggerTimestampConvertions(ShoutRequest.handler.responseText) + '</table>'
            setTimeout('requestShouts()', 10000)
            <if condition="$vboptions[shout_messages_order]">
            document.getElementById('vbshout').scrollTop = 99999;
            </if>
        }
    }
}

function sb_CollectHV(sbForm)
{
    rString = ''
    inputObjs = sbForm.getElementsByTagName('input')
    for (i = 0; i < inputObjs.length; i++)
    {
        if (inputObjs[i].type == 'hidden' && inputObjs[i].value != '')
        {
            rString += '&' + inputObjs[i].name + '=' + PHP.urlencode(inputObjs[i].value)
        }
    }

    return rString
}

function postShout(formObj)
{
    doShout = new vB_AJAX_Handler(true)
    doShout.onreadystatechange(postedShout)

    if (postingShout)
    {
        alert('Posting in progress..')
        return false
    }

    Shout = formObj.shout.value

    if (Shout.replace(/ /g, '') == '')
    {
        alert('You must enter a shout!')
        return false
    }

    doShout.send('vbshout.php', 'do=shout&shout=' + PHP.urlencode(Shout) + sb_CollectHV(document.forms['vbshoutform']))
    sb_Clear()
    postingShout = true

    return false
}

function postedShout()
{
    if (doShout.handler.readyState == 4 && doShout.handler.status == 200)
    {
        postingShout = false
        requestShouts()
    }
}

function sb_Input_SC(sProperty, setting)
{
    eval('document.forms["vbshoutform"].shout.style.' + sProperty + ' = "' + setting + '"')
    eval('document.forms["vbshoutform"].' + sProperty + '.value = "' + setting + '"')
}

function getSelectionValue(eSelector)
{
    return eSelector.options[eSelector.options.selectedIndex].value == 'Default' ? '' : eSelector.options[eSelector.options.selectedIndex].value
}

function sb_PropChange(eSelector, sProperty)
{
    sb_Input_SC(sProperty, getSelectionValue(eSelector))
}

function sb_PropChange_Button_Value(sProperty)
{
    trueValue = ''
    switch (sProperty)
    {
        case 'fontWeight':
        falseValue = 'bold'
        break;

        case 'textDecoration':
        falseValue = 'underline'
        break;

        case 'fontStyle':
        falseValue = 'italic'
        break;
    }

    return (eval('document.forms["vbshoutform"].' + sProperty + '.value'))? trueValue : falseValue
}

function sb_PropChange_Button(cButton, sProperty)
{
    if (cButton.value.match(/\*/))
    {
        cButton.value = cButton.value.replace(/\s+\*/, '')
    }
    else
    {
        cButton.value = cButton.value + ' *'
    }

    sb_Input_SC(sProperty, sb_PropChange_Button_Value(sProperty))
}

function sb_Smilie(code)
{
    document.forms["vbshoutform"].shout.value += ' ' + code
    return false
}

function sb_Clear()
{
    document.forms["vbshoutform"].shout.value = ''
    return true;
}

function sb_Smilies(cButton)
{
    if (cButton.value.match(/\*/))
    {
        cButton.value = cButton.value.replace(/\s+\*/, '')
    }
    else
    {
        cButton.value = cButton.value + ' *'
    }
    
    document.getElementById('shout_emo').style.display = (document.getElementById('shout_emo').style.display == 'none')? '' : 'none'
}
requestShouts()

-->
</script>[IMG]file:///C:/DOCUME%7E1/SIMONS%7E1.BAS/LOCALS%7E1/Temp/moz-screenshot.jpg[/IMG][IMG]file:///C:/DOCUME%7E1/SIMONS%7E1.BAS/LOCALS%7E1/Temp/moz-screenshot-1.jpg[/IMG][IMG]file:///C:/DOCUME%7E1/SIMONS%7E1.BAS/LOCALS%7E1/Temp/moz-screenshot-2.jpg[/IMG][IMG]file:///C:/DOCUME%7E1/SIMONS%7E1.BAS/LOCALS%7E1/Temp/moz-screenshot-3.jpg[/IMG]
Here is the code i want to add in the empty place in the shout box, again see the 2nd image please

Code:
<td class="thead" width="20%">Quick Statistics</td>
<td class="alt1" valign="top"><div class="smallfont">
    <b>$vbphrase[threads]:</b> $totalthreads<br />
    <b>$vbphrase[posts]:</b> $totalposts<br />
    <b>$vbphrase[members]:</b> $numbermembers<br />
        <b>Newest Member:</b> $newusername
<br /><br />
<b>Members Online:</b>
<div>
<a href="http://www.bashys-place.com/forums/member.php?u=560"><span style="color: red; font-weight: bold;">Sherlock Holmes</span></a> , <a href="http://www.bashys-place.com/forums/member.php?u=8"><span style="color: orange; font-weight: bold;">TinyTim</span></a> , <a href="http://www.bashys-place.com/forums/member.php?u=239">superstar</a> , <a href="http://www.bashys-place.com/forums/member.php?u=378">dogby</a> ,  $activeusers
<br>
<br>
$forumjump
I was up quite late last night trying to add this extra code but alas, it beat me as usuall, It either adds it in the wrong place or not at all, I think the main issue is addin a div or sommat like that so that it creates its own part in the empty space.

I did this for the chatbox lite but am struggling here
Look forward to your advice
Attached Images
File Type: jpg forumjump in cat.JPG (65.5 KB, 0 views)
File Type: jpg vbshout extra.JPG (61.5 KB, 0 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04973 seconds
  • Memory Usage 2,268KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete