PDA

View Full Version : Please help with integrating an applet, a template, and Vbulletin


Caliber
03-21-2002, 01:27 PM
Hello all,

We are trying to integrate Volano chat into our Vbulletin. Volano looks like a great chat program. But I am having a hard time passing the Vbulletin username to volano.

Here's the applet:

<applet codebase="http://www.mywebsite.com/vcclient" archive="COM/volano/WebVolanoChat.jar" code="COM.volano.WebVolanoChat.class" width="500" height="300">
<param name="cabbase" value="COM/volano/VolanoChat.cab">
<param name="color" value="#ffffff">
<param name="foreground" value="000080">
<param name="color.background" value="#C000FF">
<param name="color.foreground" value="#000040">
<param name="font.default" value="Verdana, Arial, Helvetica, sans-serif">
<param name="group" value="Platinum Chat Room">
<param name="text" value="english.txt">
<param name="username" value="$username">
<param name="profile" value="http://boards.mywebsite.com/forum/member.php?s=&action=getinfo&userid=$username">
<param name="member" value="false">
</applet>

When I paste this applet into an existing template, it loads just fine and the Vbulletin username is already loaded into the applet. Additionally, the profile for the user is loaded as well.

But I need the applet to appear in a pop-up window and when I use javascript to call a web page containing the applet, since it is not loaded from within the Vbulletin system, the username and profile do not load.

What I think I need to do is create a new template, let's call it volano and a php page, let's call it volano.php. I think the volano template should contain the applet, and when a user clicks of the javascript popup link, it should open the volano.php page.

What I do not know how to do is to get the volano.php page to pull the volano template from vbulletin. Am I on the right track, or is there a better way to do this? Any help would be greatly appreciated.

We also have several custom vbulletin projects that we would love to pay a developer to take on for us. We pay well, and we run what is possibly the largest and most active vbulletin site. http://boards.elitefitness.com

Many thanks,
Paul

Admin
03-21-2002, 01:37 PM
Ok create a page, call it volano.php:
<?php
error_reporting(7);
require('./global.php');
eval("dooutput(\"".gettemplate("volano")."\");");
?>
Now make sure everything you need is in the 'volano' template, and link to volano.php. :)

BTW, use $bbuserinfo[username] in the template, not $username.

Caliber
03-21-2002, 02:08 PM
Thanks FireFly,

Worked great! Only one small problem, if a user has a space in his username, his profile will not pull up correctly. Any suggestions for a work around?

Also, if you have any free time on your hands, we would love to talk about a larger size project for our site.

Again, many thanks.

Paul

Admin
03-21-2002, 02:11 PM
Ok, stick this code in the file right after the require() line:
$urlencusername = urlencode($bbuserinfo['username']);
$htmlusername = htmlspecialchars($bbuserinfo['username']);
Now use $htmlusername in the username parameter, and $urlencusername in the profile parameter.

E-mail me if you wish with more information about the project. :)

GrphicImprssion
05-13-2002, 12:18 PM
I am working on a Chat integration for my board, I know all the paramaters to allow the Java Applet to access to usernames and profiles. But i have one small problem..... My host (who is provideing the Java Chat function has set up the system files, and class files for the application (volano) to only be accessed by a page located in a certain place and certain name.
Example:
my board is at : ww w. mysite.com / index .php have the setup for the chat at w ww. my domain.com/ volano .php but the chat server will only allow access from volano.hostingcompany.com / mydomain name / chat .htm As you can see, it is hosted on a different server. So the ultimate question is: Is their a way to allow the volano. php page to redirect to chat.htm AND fill in the paramaters needed $ urlencusername and $ htmlusername in the Java Applet that is housed on the html page?

thanks
Jason