Author |
Message |
Blues
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jun 17, 2006
Posts: 81
Location: MD
|
Posted:
Fri Dec 28, 2007 7:38 pm |
|
So I used to have this chat program running as an integrated part of a previous site. It was loaded under Content as a separate page.
The code wont load when embedded. I even went so far as to disable the WYSIWYG editor because that was causing some problems as first. As of now with this code, even edited in MySQL, in case the code was not being accepted from within the Admin Panel, wont work right. It basically leaves a link to the addonchat website.
Code:
<applet code="Client.class"
codebase="http://client1.addonchat.com/current/"
archive="scclient_en.zip" width="600" height="400"
alt="Java Chat Software - AddonChat" MAYSCRIPT>
<param name="room" value="150488">
<a href="http://www.addonchat.com/">Java Chat Software</a>
</applet>
|
I can add the code for a direct link, but I would like the chat to load within the content pages of the site versus going to a new page with just the chat. Better yet, to be able to give the user the option would be best, but even the code to pop-up a new window wont work correctly.
I am wondering if perhaps there is a html tag I need to add to the config.php file. Any suggestions?
Here are the other codes the chat program provides for use.
Popup Link: Copy and paste the code provided below to an HTML page on your web site to add AddonChat to your site as a popup link.
Code:
<a href="http://client1.addonchat.com/sc.php?id=150488"
onClick="window.open('http://client1.addonchat.com/sc.php?id=150488',
'addonchat','width=620,height=415,status=no,scrollbars=no,menubar=no,resizable=yes');
return false">Second Chance Bird Rescue</a>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Dec 28, 2007 9:31 pm |
|
Does it have to be a Content page or can it be a block? If it can be a block, then you would be better off making your own block file and adding it to your blocks in whatever position on the page you desire. This way, you can have complete control over the code that gets rendered within the browser. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Blues
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 28, 2007 9:37 pm |
|
montego wrote: | Does it have to be a Content page or can it be a block? If it can be a block, then you would be better off making your own block file and adding it to your blocks in whatever position on the page you desire. This way, you can have complete control over the code that gets rendered within the browser. |
I've tried that, but the problem is it does the exact same thing as above. When using the integration code it gives a link to the JavaChat site whereas when using the pop up code it doesn't pop up a new window. I can't help but wonder if some of the code is not being rendered properly due to not being allowed by another file or something. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 28, 2007 9:44 pm |
|
I want to make sure we are talking the same thing. I don't mean entering in the code into the Content field when you add a block, I mean creating a few block-SomeBlockName.php file under the blocks directory which produces the code. If you use the block file approach, there is nothing that is "touching" that code unless you have a javascript conflict somewhere.
Another thing to try is a completely standalone .php script file with that code just to make sure the code is right.
Now, onto the "pop-up code". The onclick event is surely not allowed for the anchor tag and not sure you really want to allow it. Again, a separate block file might be your only approach, but you could try adding a target="_blank" instead of using the onclick event. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Blues
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 28, 2007 10:15 pm |
|
I'll be blatently honest, I have no clue how to convert the code to a php format, but I am willing to give anything a try. Any site you can point me to as a template to attempt this? I went ahead and gave it a shot at just placing the code in a block-chat.php file and adding it to the site, and as I figured it's not that simple. LOL |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Blues
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 28, 2007 10:30 pm |
|
OK, so I found a site that generate the code and this is what I now have in my block-chat.php file.
Code:
echo '<a href="http://client1.addonchat.com/sc.php?id=150488"
onClick="window.open(\'http://client1.addonchat.com/sc.php?id=150488\',
\'addonchat\',\'width=620,height=415,status=no,scrollbars=no,menubar=no,resizable=yes\');
return false">Second Chance Bird Rescue</a>';
|
But if you look at the site I am adding this to the link is outside the block, and inside the block it reads, "There isn't content right now for this block."
Here is the site: Only registered users can see links on this board! Get registered or login! It's the link at the very bottom on the right-hand side. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
Former Moderator in Good Standing
![](modules/Forums/images/avatars/0cd76dcf45da5de2cf864.jpg)
Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Fri Dec 28, 2007 11:39 pm |
|
Read the How-To on how to make blocks. You don't echo stuff, you store it in a variable called $content. Try this:
$content = <all your junk here> ; |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Blues
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 28, 2007 11:48 pm |
|
Gremmie wrote: | Read the How-To on how to make blocks. You don't echo stuff, you store it in a variable called $content. Try this:
$content = <all your junk here> ; |
Thanks Gremmie! Works fine now.
I need to look into this some more as there are numerous things I would like to create, but just don't have all the know-how. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Dec 29, 2007 9:22 am |
|
Blues wrote: | I need to look into this some more as there are numerous things I would like to create, but just don't have all the know-how. |
You are starting where many of gone before. It is an amazing journey... ![Very Happy](modules/Forums/images/smiles/icon_biggrin.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|