Status
Not open for further replies.

JaiKai

Customer
Hi,

Installed vBShout at the weekend and today a member is saying hes getting weird code when viewing the forum home page.

I've attached the code as a txt file but to me it looks like some sort of programming code like java but rather than parsing
its getting displayed instead of the html.

Hes running firefox which is the latest version.

Code below :

'+tabText+(canClose=='1'?' [X]':'')+'
');if(typeof extraParams=='undefined') {return true;} var newTab=fetchElem('tab',instanceId,'div','[data-tabid="'+tabId+'"]');for(var i in extraParams) {newTab.attr('data-'+i,extraParams);} return true;};function closeTab(tabId,instanceId) {tabList[instanceId][tabId]=false;if(tab[instanceId]==tabId) {console.log(timeStamp()+"Attempting to switching from %s to %s for instance %s.",tab[instanceId],'shouts',instanceId);fetchElem('tab',instanceId,'div','[data-tabid="shouts"]').trigger('click');} fetchElem('tab',instanceId,'div','[data-tabid="'+tabId+'"]').remove();return true;};function setShoutTarget(username,instanceId) {var everyone=fetchElem('everyone',instanceId,'span');if(everyone) {if(!username) {everyone.html(vbphrase['dbtech_vbshout_everyone']);} else {everyone.html($.trim(username));}}};function closeMenu(instanceId) {if(menuId[instanceId]) {fetchElem('menu',instanceId,'ul','[data-userid="'+menuId[instanceId]+'"]').fadeOut('fast');menuId[instanceId]=0;}};function beginShoutEdit(instanceId,shoutid) {paused[instanceId]=true;shoutId[instanceId]=shoutid;fetchElem('editor',instanceId).val(fetchElem('shout_raw',instanceId,'input','[data-shoutid="'+shoutid+'"]').val());fetchElem('editor',instanceId).trigger('keyup');fetchElem('target',instanceId,'span').fadeOut('fast').promise().done(function() {fetchElem('delete',instanceId,'span').fadeIn('fast');fetchElem('cancel',instanceId,'span').fadeIn('fast');fetchElem('editing',instanceId,'span').fadeIn('fast');});};function deleteShout(instanceId,shoutid) {console.log(timeStamp()+'Attempting to delete shout: %s... in instance %s',shoutid,instanceId);var extraParams={};if(pmUserId[instanceId]) {extraParams['type']='pm_'+pmUserId[instanceId]+'_';} else if(chatroom[instanceId]) {extraParams['type']='chatroom_'+chatroom[instanceId]+'_';} extraParams['shoutid']=shoutid;paused[instanceId]=true;vBShout_unIdle(instanceId,true,'deleteshout');ajaxCall('delete',instanceId,extraParams);fetchElem('cancelbutton',instanceId,'input').trigger('click');};function saveShout(instanceId) {var editor=fetchElem('editor',instanceId);if(!editor.val().length) {return false;} vBShout.instanceOptions[instanceId].floodchecktime=parseInt(vBShout.instanceOptions[instanceId].floodchecktime);if(shoutDelay[instanceId]) {setMessage(vbphrase['dbtech_vbshout_must_wait_x_seconds'].replace('%time%',vBShout.instanceOptions[instanceId].floodchecktime).replace('%time2%',(vBShout.instanceOptions[instanceId].floodchecktime-shoutDelay[instanceId])),'error',instanceId);return false;} var extraParams={};if(shoutId[instanceId]) {console.log(timeStamp()+'Attempting to save shout: %s to instance: %s...',shoutId[instanceId],instanceId);} else {console.log(timeStamp()+'Attempting to insert shout to instance: %s...',instanceId);} if(pmUserId[instanceId]) {extraParams['type']='pm_'+pmUserId[instanceId]+'_';} else if(chatroom[instanceId]) {extraParams['type']='chatroom_'+chatroom[instanceId]+'_';} extraParams['message']=PHP.urlencode($.trim(editor.val()));paused[instanceId]=true;vBShout_unIdle(instanceId,true);shoutDelay[instanceId]=vBShout.instanceOptions[instanceId].floodchecktime;ajaxCall('save',instanceId,extraParams);if(shoutId[instanceId]) {fetchElem('cancelbutton',instanceId).trigger('click');} else {editor.val('');} return false;};function saveStyleProps(instanceId,type,value,noupdate) {var property=type;var setValue=value;switch(type) {case'bold':property='fontWeight';setValue=(value?type:'');break;case'italic':property='fontStyle';setValue=(value?type:'');break;case'underline':property='textDecoration';setValue=(value?type:'');break;case'font':property='fontFamily';var fontfield=fetchElem('fontbar',instanceId,'div'),fontrow=fetchElem('fontrow',instanceId,'ul');if(fontfield.text()!=value) {fontfield.text(value);fontrow.val(value);} break;case'size':property='fontSize';var sizefield=fetchElem('sizebar',instanceId,'div'),sizerow=fetchElem('sizerow',instanceId,'ul');if(sizefield.text()!=value) {sizefield.text(value);sizerow.val(value);} break;case'color':var colorfield=fetchElem('colorbar',instanceId,'img'),colorrow=fetchElem('colorrow',instanceId,'ul');if(rgbToHex(colorfield.css('backgroundColor'))!=value) {colorfield.css('backgroundColor',value);} break;} console.log(timeStamp()+"Style property %s set. Value: %s. Instance ID: %s",type,setValue,instanceId);if(type=='size') {fetchElem('frame',instanceId,'div').css(property,setValue);} else {fetchElem('editor',instanceId).css(property,setValue);} if(vBShout.editorOptions[instanceId][type]!=value&&!noupdate) {console.log(timeStamp()+"Style property %s changed. Old value: %s - New value: %s. Instance ID: %s",type,vBShout.editorOptions[instanceId][type],value,instanceId);vBShout.editorOptions[instanceId][type]=value;var extraParams={};extraParams['editor']=vBShout.editorOptions[instanceId];if(pmUserId[instanceId]) {extraParams['type']='pm_'+pmUserId[instanceId]+'_';} else if(chatroom[instanceId]) {extraParams['type']='chatroom_'+chatroom[instanceId]+'_';} paused[instanceId]=true;vBShout_unIdle(instanceId,true,'savestyles');ajaxCall('styleprops',instanceId,extraParams);}};function fetchShouts(instanceId,type,force) {paused[instanceId]=true;if(!type) {type=tab[instanceId];} if(!(idleTime[instanceId]>=vBShout.instanceOptions[instanceId].idletimeout&&vBShout.instanceOptions[instanceId].idletimeout>0)||force==true) {var extraParams={};if(typeof aopTime[instanceId][tab[instanceId]]=='undefined') {force=true;} switch(type) {case'shout':extraParams['shoutid']=shoutId[instanceId];break;} for(var i in tabList[instanceId]) {if(tabList[instanceId]) {extraParams['tabs['+i+']']=1;}} extraParams['type']=type;if((vBShout.instanceOptions[instanceId].optimisation&&!force)&&type!='activeusers') {if(type=='shouts'||type=='aop') {type='shouts'+instanceId;} if(type=='shoutnotifs'||type=='systemmsgs') {type=type+instanceId;} console.log(timeStamp()+'Fetching '+type+'...');aopFile[instanceId]='dbtech/vbshout/aop/'+type+'.txt';$.ajax({type:'GET',url:aopFile[instanceId]+'?v='+Math.random()*99999999999999,complete:function(xhr,statusText){},success:function(data,statusText,xhr) {var d=new Date();var dateline=data;var timenow=parseInt(d.getTime()/1000);if(dateline>aopTime[instanceId][tab[instanceId]]) {console.log(timeStamp()+tab[instanceId]+" AOP file returned new shouts: \n"+dateline+"\n"+aopTime[instanceId][tab[instanceId]]);fetchShouts(instanceId,tab[instanceId],true);return false;} if(dateline==0) {console.log(timeStamp()+"AOP file returned 0");fetchShouts(instanceId,tab[instanceId],true);return false;} if((timenow-dateline)>60) {console.log(timeStamp()+"AOP file hasn't been modified for 60 seconds: "+(timenow-dateline));aopTime[instanceId][tab[instanceId]]=(timenow+5);fetchShouts(instanceId,tab[instanceId],true);return false;} else {paused[instanceId]=false;countDown[instanceId]=vBShout.instanceOptions[instanceId]['refresh'];}},error:function(data,statusText,error) {fetchShouts(instanceId,tab[instanceId],true);}});} else {ajaxCall('fetch',instanceId,extraParams,'GET');}}};function ajaxCall(varname,instanceId,extraParams,type) {if(typeof type=='undefined') {type='POST';extraParams['securitytoken']=SECURITYTOKEN;} extraParams['do']='ajax';extraParams['action']=varname;extraParams['instanceid']=instanceId;extraParams['tabid']=tab[instanceId];if(vBShout.userOptions.is_detached=='1') {extraParams['detached']='1';}if(pmUserId[instanceId]){extraParams['pmuserid']=pmUserId[instanceId];}if(chatroom[instanceId]){extraParams['chatroomid']=chatroom[instanceId];}if(shoutId[instanceId]){extraParams['shoutid']=shoutId[instanceId];}extraParams['shoutorder']=vBShout.instanceOptions[instanceId].shoutorder;extraParams['pmtime']=vBShout.userOptions.pmtime;if(type=='GET'){extraParams['v']=Math.random()*99999999999999;}$.ajax({type:type,url:'vbshout.php',data:(SESSIONURL?SESSIONURL+'&':'')+$.param(extraParams),complete:function(xhr,statusText){},success:function(data,statusText,xhr){var tagData=$(data);data={};paused[instanceId]=false;countDown[instanceId]=vBShout.instanceOptions[instanceId]['refresh'];if(!hasFetched[instanceId]&&vBShout.instancePermissions[instanceId].autoidle){paused[instanceId]=hasFetched[instanceId]=true;}var arrVals=['aoptimes','chatrooms','shouts'],singleVals=['ajax','activereports','activeusers2','content','editor','error','pmtime','pmuserid','sticky'];if(tagData.find('activeusers').length){var tagData2=tagData.find('activeusers');data['activeusers']={'count':tagData2.attr('count'),usernames:tagData2.text()};}if(tagData.find('chatroom').length){var tagData2=tagData.find('chatroom');if(typeof tagData2.attr('chatroomid')!=undefined){data['chatroom']={'chatroomid':tagData2.attr('chatroomid'),'title':tagData2.text()};}}for(var i in singleVals){if(tagData.find(singleVals).length){data[singleVals]=tagData.find(singleVals).text();}}for(var i in arrVals){if(tagData.find(arrVals).length){data[arrVals]={};tagData.find(arrVals).children().each(function(j){data[arrVals][j]={};$(this).children().each(function(){data[arrVals][j][$(this).prop('tagName')]=$(this).text();});});}}if(data.error){var tmp=data.error.split('_');if(tmp[0]=='disband'){var chatroomid=parseInt(tmp[1]);if(chatroomid){if(chatroom[instanceId]==chatroomid){chatroom[instanceId]=0;fetchElem('tab',instanceId,'div','[data-tabid="shouts"]').trigger('click');}closeTab(fetchElem('tab',instanceId,'div','[data-tabid^="chatroom_'+chatroomid+'_"]').attr('data-tabid'),instanceId);return false;}}setMessage(data.error,'error',instanceId);fetchElem('editor',instanceId).val(editorContents[instanceId]);console.error(timeStamp()+"AJAX Error: %s",data.error);return true;}if(typeof data.sticky!='undefined'){if(!data.sticky){fetchElem('frame_sticky',instanceId,'div').fadeOut('fast');}else{setMessage(data.sticky,'sticky',instanceId);}}if(typeof data.activeusers!='undefined'){fetchElem('activeusers',instanceId,'span').text(data.activeusers.count);fetchElem('sidebar',instanceId,'div').html(data.activeusers.usernames);}if(typeof data.activereports!='undefined'){fetchElem('shoutreports',instanceId,'span').text(data.activereports);}if(typeof data.editor!='undefined'){fetchElem('editor',instanceId).val(data.editor);fetchElem('editor',instanceId).trigger('keyup');}if(typeof data.content!='undefined'){fetchElem('content',instanceId,'div').html(data.content);}if(typeof data.archive!='undefined'&&typeof data.shoutid!='undefined'){fetchElem('message_'+data.shoutid,instanceId).html(data.archive);}if(typeof data.pmuserid!='undefined'){var tmp=fetchElem('lookup',instanceId,'input');userIds[data.pmuserid]=tmp.val();createTab('pm_'+data.pmuserid+'_'+instanceId,instanceId,tmp.val(),'1',{'userid':data.pmuserid});fetchElem('tab',instanceId,'div','[data-tabid="pm_'+data.pmuserid+'_'+instanceId+'"]').trigger('click');tmp.val('');}if(typeof data.chatroom!='undefined'){fetchElem('roomname',instanceId,'input').val('');createTab('chatroom_'+data.chatroom.chatroomid+'_'+instanceId,instanceId,data.chatroom.title,'1',{'chatroomid':data.chatroom.chatroomid});fetchElem('tab',instanceId,'div','[data-tabid="chatroom_'+data.chatroom.chatroomid+'_'+instanceId+'"]').trigger('click');}if(typeof data.aoptime!='undefined'){if(aopTime[instanceId][tab[instanceId]]
 
That's the vbshout.js file. Please try disabling all other mods and addons, as something may be interfering with the page contents.
 
Status
Not open for further replies.

Legacy vBShout

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,171
Customer rating
5.00 star(s) 1 ratings
Back
Top