vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - vBShout v2.0 on CMPS v3.0 RC2 (https://vborg.vbsupport.ru/showthread.php?t=163418)

zeusdesign 11-27-2007 11:40 AM

thanks for mod, the developer ;)

Catziggy 11-27-2007 02:05 PM

<a href="http://www.timelessgaming.com" target="_blank">http://www.timelessgaming.com</a> if you click shout it white screens out.

anzo 11-27-2007 02:34 PM

Catziggy, please replace all code in adv_portal_vbshout with this:

Code:


<td class="alt1" align="left" width="100%">
        <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' />

        <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()' />
                                                        </if>
                                                </td>
                                        </tr>
                                        </table>
                                        <div style="height: 2px"></div>
                                        </if>
                                </if>
                                        <div id="vbshout" style="overflow:auto;height:{$vboptions['shout_box_height']}px;width:100%;">
                                                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()' />                                                                                                       
                                                        </if>
                                                </td>
                                        </tr>
                                        </table>
                                        </if>
                                </if>
                                </form>
                                </td>

<script type='text/javascript'>
<!--

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">' + 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_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>

Please tell me if it worked.

Catziggy 11-27-2007 02:46 PM

Yes tried original hack and it didnt work for me either

Loaded that script no joy

anzo 11-27-2007 03:13 PM

where's your vbshout.php file located? can you make a copy of it in the forum root?

Catziggy 11-27-2007 05:58 PM

tried :( still no joy. Thanks for persevering.

stud 12-03-2007 10:46 PM

did you give a try to see if this worked with Inferno's ShoutBox?
Would it be hard to modify it to work with both?

SmEdD 12-04-2007 06:25 AM

Actually to fix the loading issue most people will be having they need to put a copy of vbshout.php in their CMPS root dir (if different then the forums root). Then they need to change the first 2 instances of vbshout.php in that template to $vboption[bburl]/vbshout.php

The copy of vbshout.php in their root dir (not the forum dir) they need to find:
PHP Code:

require_once('./global.php'); 

And add BEFORE
PHP Code:

chdir('/PATH/TO/FORUM/ROOT'); 

I will see later what in the file causes it to get stuck loading. At least that fixed it for me.

m002.p 12-04-2007 06:30 AM

For those wishing to get a module working on the inferno vbshout versions 1.1 and 2 onwards, please take a look at this thread ;)

https://vborg.vbsupport.ru/showthread.php?t=163395

Catziggy 12-04-2007 01:04 PM

Quote:

Originally Posted by anzo (Post 1390341)
Catziggy, please replace all code in adv_portal_vbshout with this:

Code:


<td class="alt1" align="left" width="100%">
        <form action="http://yoursite/forums/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' />

        <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()' />
                                                        </if>
                                                </td>
                                        </tr>
                                        </table>
                                        <div style="height: 2px"></div>
                                        </if>
                                </if>
                                        <div id="vbshout" style="overflow:auto;height:{$vboptions['shout_box_height']}px;width:100%;">
                                                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()' />                                                                                                       
                                                        </if>
                                                </td>
                                        </tr>
                                        </table>
                                        </if>
                                </if>
                                </form>
                                </td>

<script type='text/javascript'>
<!--

postingShout = false

function requestShouts()
{
        if (!postingShout)
        {
                ShoutRequest = new vB_AJAX_Handler(true)
                ShoutRequest.onreadystatechange(showShouts)
                ShoutRequest.send('http://yoursite/forums/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">' + 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('http://yoursite/forums/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_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>

Please tell me if it worked.


I finally got it to work and the answer is REALLY simple. If all you get is a loading message on your screen then edit the adv_portal_vbshout template and search for .php. It should throw up 3 instances of vbshout.php. Just enter your full website forum adrress like the red above (mine was http://www.timelessgaming.com/forums/ ) in front as shown.

Viola. Set it up again and it works perfectly.

thanks for the mod. Been waiting for this.

Oops i see SmedD has the same answer but a different route lol.


All times are GMT. The time now is 05:38 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.01431 seconds
  • Memory Usage 1,848KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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