CBOX

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Get Involved
Post Reply
MMABlogTeam
Registered User
Posts: 7
Joined: Tue Dec 04, 2018 3:29 am

CBOX

Post by MMABlogTeam » Sun Apr 21, 2019 6:38 pm

Hi there,

I have an established cbox (cbox.ws) from my main website that I want to put also on my forum as widget/gadget either in side or footer or anywhere, but have not had any luck using html or even bbcode (almost got it with bbcode but only an outline/design of the chatbox shows).

I would use mchat or an already created shoutbox extension but my cbox is already popular and would like to have active users of that also be able to use that chat on the forum as many just stick to the main site just because of the chat.

Please let me know if I missed something in my search/research that helps integrate cbox specifically.

Thanks.

MMABlogTeam
Registered User
Posts: 7
Joined: Tue Dec 04, 2018 3:29 am

Re: CBOX

Post by MMABlogTeam » Sat May 18, 2019 3:20 pm

This is the code btw

Code: Select all

<div id="cboxbutton" style="position: fixed; bottom: 8px; right: 16px; padding: 3px 20px; text-align: center; cursor: pointer; background-color: #EDF3F7; border:#C3D7E5 1px solid;border-radius: 3px; font-family: Tahoma, sans-serif; font-size: 14px; font-weight: bold"></div>
<div id="cboxwrap" style="position: fixed; bottom: 48px; right: 16px; background: #EDF3F7; padding: 3px; border:#C3D7E5 1px solid;border-radius: 3px;"></div>

<script>
/*
*	Cbox dynamic loader v.2
*/
(function () {
	var showByDefault = true;
	var cboxContainer = document.getElementById("cboxwrap");
	var cboxToggleButton = document.getElementById("cboxbutton");
	var buttonStringOpen = "Open Cbox";
	var buttonStringClose = "Close Cbox";
	var lsKey = "cbox:isOpen";

	var cboxHTML = '<!-- BEGIN CBOX - www.cbox.ws - v4.3 -->'
	+'<div id="cboxdiv" style="position: relative; margin: 0 auto; width: 250px; font-size: 0; line-height: 0;">'
	+'<div style="position: relative; height: 268px; overflow: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; border: 0px solid;"><iframe src="http://www2.cbox.ws/box/?boxid=2063208&boxtag=l6nez1&sec=main" marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" scrolling="auto" allowtransparency="yes" name="cboxmain2-2063208" id="cboxmain2-2063208"></iframe></div>'
	+'<div style="position: relative; height: 82px; overflow: hidden; border: 0px solid; border-top: 0px;"><iframe src="http://www2.cbox.ws/box/?boxid=2063208&boxtag=l6nez1&sec=form" allow="autoplay" marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" scrolling="no" allowtransparency="yes" name="cboxform2-2063208" id="cboxform2-2063208"></iframe></div>'
	+'</div>'
	+'<!-- END CBOX -->';

	var htmlInjected = false;
	var isVisible = false;
	var toggleCbox = function (show) {
		
		if (!show) {
			cboxContainer.style.display = "none";
			if (cboxToggleButton) {
				cboxToggleButton.innerHTML = buttonStringOpen;
			}
			
		}
		else {
			cboxContainer.style.display = "block";
			if (cboxToggleButton) {
				cboxToggleButton.innerHTML = buttonStringClose;
			}
		}
		
		if (show && !htmlInjected) {
			cboxContainer.innerHTML = cboxHTML;
			htmlInjected = true;
		}
		
		isVisible = show;
	}

	if (localStorage && lsKey && typeof localStorage.getItem(lsKey) === "string") {
		toggleCbox((localStorage.getItem(lsKey) === "yes"));
	}
	else {
		toggleCbox(showByDefault);
	}

	if (cboxToggleButton) {
		cboxToggleButton.onclick = function () {
			toggleCbox(!isVisible);
			
			if (localStorage && lsKey) {
				localStorage.setItem(lsKey, isVisible ? "yes" : "no");
			}
		}
	}
})();

</script>	
So far what I've tried is going to my file manager, styles, simplicity template, and pasting this code into one of the .html files like overall_footer...Still nothing..

User avatar
Mannix_
Registered User
Posts: 476
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: CBOX

Post by Mannix_ » Sat May 18, 2019 3:33 pm

Did you purge the cache after making changes to the html files?
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66268
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: CBOX

Post by Lumpy Burgertushie » Sat May 18, 2019 4:14 pm

that code works perfect on my test board. I put it at the bottom of the overall footer file.
it popsup on the right side of the page. however, that is not a good place to put it. it covers up some of the page and on small screen covers most of the page.

I would suggest in a sidebar if you have one, if not, then create one, or better yet, install the pages extension and put that code in a new page and link to it from the index menu etc.

robert
I am going to be out of town and off line for a week . see ya when I get back.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

MMABlogTeam
Registered User
Posts: 7
Joined: Tue Dec 04, 2018 3:29 am

Re: CBOX

Post by MMABlogTeam » Sat May 18, 2019 6:39 pm

Mannix_ wrote:
Sat May 18, 2019 3:33 pm
Did you purge the cache after making changes to the html files?
Thank you, it reflects the change now.
Lumpy Burgertushie wrote:
Sat May 18, 2019 4:14 pm
that code works perfect on my test board. I put it at the bottom of the overall footer file.
it popsup on the right side of the page. however, that is not a good place to put it. it covers up some of the page and on small screen covers most of the page.

I would suggest in a sidebar if you have one, if not, then create one, or better yet, install the pages extension and put that code in a new page and link to it from the index menu etc.

robert
Thanks robert, but this is what I'm seeing, the button works great, but no actual chatbox, just the outline/object...is that what you are also getting?

Image

User avatar
Lumpy Burgertushie
Registered User
Posts: 66268
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: CBOX

Post by Lumpy Burgertushie » Sun May 19, 2019 4:09 am

no, I see the complete chat boxing working as it should.

how about a link to your board where you have put the code and what file you put it in so we can check it.

robert
I am going to be out of town and off line for a week . see ya when I get back.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

MMABlogTeam
Registered User
Posts: 7
Joined: Tue Dec 04, 2018 3:29 am

Re: CBOX

Post by MMABlogTeam » Sun May 19, 2019 7:54 am

Lumpy Burgertushie wrote:
Sun May 19, 2019 4:09 am
no, I see the complete chat boxing working as it should.

how about a link to your board where you have put the code and what file you put it in so we can check it.

robert
mmahighkick.com

I put the code in overall_footer.html

thanks in advance

User avatar
Mannix_
Registered User
Posts: 476
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: CBOX

Post by Mannix_ » Sun May 19, 2019 8:14 am

MMABlogTeam wrote:
Sun May 19, 2019 7:54 am
Lumpy Burgertushie wrote:
Sun May 19, 2019 4:09 am
no, I see the complete chat boxing working as it should.

how about a link to your board where you have put the code and what file you put it in so we can check it.

robert
mmahighkick.com

I put the code in overall_footer.html

thanks in advance
It works fine here so maybe purge the cache of your browser and see if that helps
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

MMABlogTeam
Registered User
Posts: 7
Joined: Tue Dec 04, 2018 3:29 am

Re: CBOX

Post by MMABlogTeam » Sun May 19, 2019 4:03 pm

Mannix_ wrote:
Sun May 19, 2019 8:14 am
MMABlogTeam wrote:
Sun May 19, 2019 7:54 am
Lumpy Burgertushie wrote:
Sun May 19, 2019 4:09 am
no, I see the complete chat boxing working as it should.

how about a link to your board where you have put the code and what file you put it in so we can check it.

robert
mmahighkick.com

I put the code in overall_footer.html

thanks in advance
It works fine here so maybe purge the cache of your browser and see if that helps
Hmm yeah looks like it was a browser issue, thanks guys, i appreciate all the help and troubleshooting!

Post Reply

Return to “Extension Requests”