Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 8.0
Author Message
Blues
Regular
Regular



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

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

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: 9457
Location: Arizona

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

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.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Blues







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

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.
 
montego







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

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.
 
Blues







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

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
 
Blues







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

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: Second Chance Bird Rescue It's the link at the very bottom on the right-hand side.
 
Gremmie
Former Moderator in Good Standing



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

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

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> ;

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
Blues







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

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.
 
montego







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

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 8.0

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©