MyBB Community Forums

Full Version: Don't know where to find this variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Ok I'm not sure if this question even belongs here but I figure it's a good start before anyplace else.

If this is a server question, please tell me so I can call them. Thanks Smile

Here goes:

I have a Cbox shout box on my site. It is now integratable with message board systems. Here is the quote and instructions from the site. What I need to know is where to find the name variable they mention.
Were is it?
What does the code for it look like?
Do I look for it on the server in the db or is it something that is called up from the software somewhere that 'talks' to the db?

Quote:If your site is PHP-based (e.g. phpNuke, vBulletin, phpBB), alter your Cbox HTML code in the following way:


...&amp;sec=form&amp;nme=<?=urlencode($name)?>&amp;nmekey=<?=md5('18laln315i2lgckm'.$name)?>

Where the variable $name appears, insert the variable that represents the user's name as retrieved from your userbase. This will vary depending on your CMS or forum system. After changing your code, enable user override below.
I believe the username hook is:

Quote:$mybbuser[username]

Hope this helps! Big Grin
Ok so do you think i need the bit in the brackets? or just $mybbuser?
...&amp;sec=form&amp;nme=<?=urlencode($mybb->user['username'])?>&amp;nmekey=<?=md5('18laln315i2lgckm'.$mybb->user['username'])?> 

See if that helps.
Neither one worked Sad

Any other suggestions?
lorddonk Wrote:I believe the username hook is:

Quote:$mybbuser[username]

Hope this helps! Big Grin

thats right, but if your not sure, ask tikiti, he's very helpful
If you would post a bit more code then maybe we can find the answer
Ok here's the whole code.
At the site owner's request i x'd out the boxid numbers. Hope that's ok.
Quote:<!-- BEGIN CBOX - www.cbox.ws -->
<div align="center" id="cboxdiv">
<iframe frameborder="0" width="180" height="139" src="http://www3.cbox.ws/box/?boxid=xxxxxxxx&amp;boxtag=2939&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#603913 1px solid;" id="cboxmain"></iframe><br/>
<iframe frameborder="0" width="180" height="78" src="http://www3.cbox.ws/box/?boxid=xxxxxxxx&amp;boxtag=2939&amp;sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#603913 1px solid;border-top:0px" id="cboxform"></iframe>
</div>
<!-- END CBOX -->
Hey guy, I'm sort of digging up the past here but my friend is still asking if I could integrate his cbox for him on his board.

Anyone with any ideas please let me know. If you think it's impossible, again, let me know so I can let this go buried forever and tell him it's impossible.
You probably have to add it to the index template (in the ACP).
Pages: 1 2