vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   What variable is use for username? (https://vborg.vbsupport.ru/showthread.php?t=142673)

mktrilogy 03-21-2007 08:31 AM

What variable is use for username?
 
I just purchase a tagbox/shoutbox. the instruction to integrate to VB is below.

Code:


if you host your own website with its own userbase, it is quite easy to integrate Cbox so that it automatically assigns the correct names to users logged in to your website.
If your site is PHP-based (e.g. phpNuke, vBulletin, phpBhttp://forum.forumer.com/images/smilies/cool.gif, alter your Cbox HTML code in the following way:


...&amp;sec=form&amp;nme=<?=urlencode($name)?>&amp;nmekey=<?=md5('16al9m891d1e8k6k'.$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.

The question is what use instead of $name ?

Help

Dismounted 03-21-2007 08:45 AM

$vbulletin->userinfo['username']

mktrilogy 03-21-2007 09:06 AM

$vbulletin->userinfo['username'] = does vbulletin = i use vb3_ ?

Code:

<!-- BEGIN CBOX - http://www.cbox.ws -->
<div align="center" id="cboxdiv">
<iframe frameborder="0" width="720" height="305" src="http://www2.cbox.ws/box/?boxid=xxxxxxx&amp;boxtag=2379&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#000000 1px solid;" id="cboxmain"></iframe><br/>
<iframe frameborder="0" width="720" height="75" src="http://www2.cbox.ws/box/?boxid=1482560&amp;boxtag=2379&amp;sec=form&amp;nme=<?=urlencode($vbulletin->userinfo['username'])?>&amp;nmekey=<?=md5('21aj9i97519l2mgo'.$vbulletin->userinfo['username'])?>" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#000000 1px solid;border-top:0px" id="cboxform"></iframe>
</div>
<!-- END CBOX -->


this is the code it wont work :(

Help pls :)

mktrilogy 03-22-2007 11:01 PM

bump pls. anyone can help?

Dismounted 03-23-2007 08:51 AM

Where is this loaded?

jamesk 03-23-2007 08:05 PM

$bbuserinfo[username]

mktrilogy 03-24-2007 02:21 AM

Quote:

Originally Posted by Dismounted (Post 1210194)
Where is this loaded?


Forumhome

just below the whats going on?

Quote:

Originally Posted by jamesk (Post 1210591)
$bbuserinfo[username]

I tried it but wont work.

Dismounted 03-24-2007 02:27 AM

Use this:
HTML Code:

<!-- BEGIN CBOX - http://www.cbox.ws -->
<div align="center" id="cboxdiv">
<iframe frameborder="0" width="720" height="305" src="http://www2.cbox.ws/box/?boxid=1482560&amp;boxtag=2379&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#000000 1px solid;" id="cboxmain"></iframe><br/>
<iframe frameborder="0" width="720" height="75" src="http://www2.cbox.ws/box/?boxid=1482560&amp;boxtag=2379&amp;sec=form&amp;nme=$bbuserinfo[username]&amp;nmekey=<if condition="$nme = md5('21aj9i97519l2mgo' . $bbuserinfo[username])">$nme</if>" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#000000 1px solid;border-top:0px" id="cboxform"></iframe>
</div>
<!-- END CBOX -->


mktrilogy 03-24-2007 04:51 AM

I got this error :)


Code:

vBulletin Message

The following template conditional expression contains function calls:

<if condition="$nme = md5('21aj9i97519l2mgo' . $bbuserinfo[username])">

md5        md5(\'21aj9i97519l2mgo\' . $bbuserinfo[username])

With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression.

The following functions are allowed in template conditional expressions:
in_array() is_array() is_numeric() isset() empty() defined() array() can_moderate() can_moderate_calendar() exec_switch_bg() is_browser() is_member_of()

there is a site i saw that was able to integrate this. i got in touch with the admin but no reply, thanks for looking out bro.

The site :

http://www.talkjesus.com/

Dismounted 03-24-2007 05:06 AM

Create a plugin at 'forumhome_complete' and insert this:
PHP Code:

$nme md5('21aj9i97519l2mgo' $vbulletin->userinfo['username']); 

Then instead of my previous code, use:
HTML Code:

<!-- BEGIN CBOX - http://www.cbox.ws -->
<div align="center" id="cboxdiv">
<iframe frameborder="0" width="720" height="305" src="http://www2.cbox.ws/box/?boxid=1482560&amp;boxtag=2379&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#000000 1px solid;" id="cboxmain"></iframe><br/>
<iframe frameborder="0" width="720" height="75" src="http://www2.cbox.ws/box/?boxid=1482560&amp;boxtag=2379&amp;sec=form&amp;nme=$bbuserinfo[username]&amp;nmekey=$nme" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#000000 1px solid;border-top:0px" id="cboxform"></iframe>
</div>
<!-- END CBOX -->


mktrilogy 03-24-2007 05:16 AM

sorry, how do we do that? Create a plugin at 'forumhome_complete' and insert this: ?

Update, I was able to create new plugin, i made it active. and named it cbox.

Wow, it works Thanks for this :)

If its not too much to ask, how do we make this only viewable to login users?


All times are GMT. The time now is 04:54 PM.

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.01063 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete