TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 777
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

IRC Chat Mod + TP - ???

Started by courage, January 07, 2006, 01:09:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

courage

I can't seem to get 3guks PJIRC Integrated Chat Mod to work with Tiny Protal 0.75. Next to index.templeate it says faileure and even if I install it nothing happens.

Rasyr

Ahh. that would likely be because the chat Mod is looking for the where the menubar is built (to add the Chat button) and cannot find it since TinyPortal changed that section as well (in adding the Forum and TPAdmin buttons).

This may have occured in other sections of the file as well.

fenris_w0lf

So, any ideas on how to get the "3guks PJIRC Integrated Chat Mod" to work with Tiny Protal 0.75 ?

Would it work to simply manually ftp the chat mod files to the server, then add a block or menu-item pointing to the php file ?

Rasyr

Inside the PJIRC mod zip file, you will find two files that tell you what you need to do to manually install it.

modification.xml and package-info.xml

Most of the files in the zip will go into a folder structure created by the package installer (unzipping the mod into its own directory should recreate the folder structure needed for the pjirc folder).

package-info.xml tells you to put the pjirc folder in the forum root, and what directories to put the other two files that it requires.

modification.xml tells you what files need to be modified and where in the file the modification needs to go and what the modification is.

This package should be relatively easy to install manually.


fenris_w0lf

Thanks Rasyr for your reply.

From what I've managed to understand (I hope..lol) the modification.xml will show what stuff gets "injected" into existing files on my forum, like a "chat link" using the icons supplied with the package etc etc....

Is that really needed for this to work ?

Wouldnt it be sufficient to do what I suggested. Upload the files and make a new "box" or menu-link (using TPadmin) that points to the php file (Chat.template.php) ?? If not...why not ?? lol

Rasyr

not just code that gets "injected" but also code that gets changed as well. Sometimes a mod will need to change some of the code to make sure it works well with the rest.

I haven't tried a manual install of pjirc yet (but I really need to as I am going to have to do it for one or two websites myself when the time comes for use to upgrade them... hehe), so I do not know for sure at the moment.


fenris_w0lf

Well, I did a fast and ugly test. I unpacked the files locally, edited the Chat.template.php file to reflect my site, irc-server, #room etc etc, uploaded the files (retained the sub-folders) and tried to direct my browser (Firefox) directly to Chat.php and got Hacker attempt (or something) then I tried Chat.template.php and got ...nothing.. ://

feline

Hi @ all

one word to IRC chat ..

Normaly ..it's not need to apply a mod .. to add a IRC chat is simple.

You need a small change to the theme index.template.php and a small php script.

step one .. open your Theme index.template.php
search for:

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
        global $context, $settings, $options, $scripturl, $boardurl, $user_info, $txt;


add after:

        // I'm using IRC Chat that will open in a new window
          echo '
           <script type="text/javascript">
            <!--
              function OpenChat() {
              F1 = window.open("' . $boardurl .'/chatboard.php?theme='.$settings['theme_url'].'&nick=' . $user_info['name'] . '", "Chat", "width=670,height=640,left=150,top=10,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");
              }
            //-->
           </script>';


and later in this section add a button for chat ..

              echo '<a class="menu" href="javascript:OpenChat();">CHAT</a></td>';


and here the chatboard.php (copy at your root)

<?php

$themeurl 
'';
$nick '';
if (isset(
$_GET['theme'])) $themeurl $_GET['theme'];
if (isset(
$_GET['nick'])) $nick $_GET['nick'];

echo 
'
<html>
 <head>
  <title>Chat</title>
  <link rel="stylesheet" type="text/css" href="' 
$themeurl '/style.css?rc1" >
 <head>
 <body>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="tborder">
   <tr>
    <td>
     <div class="titlebg"><center><b>Chat</b></center></div>
     <center>
      <script type="text/javascript" language="JavaScript"src="http://irc.everywherechat.com:8000/Java/e.js?room=MYROOM&width=650&height=610&roomstab=false&fontsize=12&ads=false&nick=' 
$nick .'"></script>
     </center>
    </td>
   </tr>
  </table>
 </body>
</html>'
;
?>



Change MYROOM to your Roomname

That's all folks  ::)

Fel

[attachment deleted by admin]

IchBin


fenris_w0lf

Yes very nice Feline!!

But this is not the PJIRC mod. The main disadvantage with everywherechat is that you're not able to use any other irc server than the one run by ewc, this was my reason from the beginning to choose PJIRC.

I can see however ways to use your code and apply it to the files I got from PJIRC, so thanks!! :)

Gonna go try some more now !!

This website is proudly hosted on Crocweb Cloud Website Hosting.