PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Blues
Regular
Regular


Joined: Jun 17, 2006
Posts: 81
Location: MD

PostPosted: Fri Dec 28, 2007 7:38 pm Reply with quote Back to top

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>
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7327
Location: Arizona

PostPosted: Fri Dec 28, 2007 9:31 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Blues
Regular
Regular


Joined: Jun 17, 2006
Posts: 81
Location: MD

PostPosted: Fri Dec 28, 2007 9:37 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7327
Location: Arizona

PostPosted: Fri Dec 28, 2007 9:44 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Blues
Regular
Regular


Joined: Jun 17, 2006
Posts: 81
Location: MD

PostPosted: Fri Dec 28, 2007 10:15 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
Blues
Regular
Regular


Joined: Jun 17, 2006
Posts: 81
Location: MD

PostPosted: Fri Dec 28, 2007 10:30 pm Reply with quote Back to top

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 to the forums!
It's the link at the very bottom on the right-hand side.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2401
Location: Iowa, USA

PostPosted: Fri Dec 28, 2007 11:39 pm Reply with quote Back to top

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> ;
View user's profile Send private message
Blues
Regular
Regular


Joined: Jun 17, 2006
Posts: 81
Location: MD

PostPosted: Fri Dec 28, 2007 11:48 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7327
Location: Arizona

PostPosted: Sat Dec 29, 2007 9:22 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum