Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: 3guk on September 14, 2005, 04:03:08 PM

Title: Complete PJIRC Integration
Post by: 3guk on September 14, 2005, 04:03:08 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=182)

The Complete PJIRC Integration mod integrates the java PJIRC client fully with SMF.

It takes user names and gives them to PJIRC meaning that users can easily be identfied by their forum name.

The script also features an auto ident for admins, meaning that admins with registered user names on the IRC server can auto Ident without having to manually type /nickserv identify password.

In addition to this it also provides the admin with a guest dissalow function telling the guest to sign up before they can use the chat service.

This mod is based on OIDanTheManIO's mod but takes it a little further and integrates it much more with SMF.

To Do:

-- Admin Interface
-- Working Properly With Mozilla


Anymore suggestions for things that should be added ?
Title: Re: Complete PJIRC Integration
Post by: Elmacik on September 14, 2005, 04:04:10 PM
umm.. this would be great..
but.. where is the file?
Title: Re: Complete PJIRC Integration
Post by: 3guk on September 14, 2005, 04:09:28 PM
Should be fixed now !!

Let me know if you find any bugs.
Title: Re: Complete PJIRC Integration
Post by: Elmacik on September 15, 2005, 02:29:49 AM
i glanced at some chat codes for SMF but saw that chaning the irc server is impossible.
i think this is not operative in PJIRC too ..

is there a way to make it possible?
and isnt it possible to hide the server (name, motd, address etc..) to prevent users to register the others' user names on that server?
Title: Re: Complete PJIRC Integration
Post by: 3guk on September 15, 2005, 02:34:36 PM
Forgive me if you have misunderstood.

But you want users to be able to change the irc server that it is connected too ? This could be done but the whole idea of a chat script is to help users that dont have any knowledge of irc to be able ot chat in a java window rather than MIRC.

I can however code this for you if you need it ??

I do not think you can hide the irc address and again they could register others names but PJIRC takes the server name from the html code and hence without it there it would not work.

Cheers
Title: Re: Complete PJIRC Integration
Post by: Elmacik on September 15, 2005, 04:09:45 PM
thanks for the answer.

i meant to change the irc server myself as the site owner. i didnt mean to let the users change it :)
but i want to learn if its possible for me to do it by editing the files..
or will we need to re-code it for a different server ? (i hope not :( )
Title: Re: Complete PJIRC Integration
Post by: Menni on September 16, 2005, 04:11:43 AM
Would you plese tell me exactly what should I do? :)
Title: Re: Complete PJIRC Integration
Post by: Elmacik on September 16, 2005, 04:46:34 AM
for a simple usage, just install it via your package manager (in admin panel->packages)
you will see the chat button in default theme ;)
Title: Re: Complete PJIRC Integration
Post by: Menni on September 16, 2005, 05:56:04 AM
I have installed pjirc integrated chat mod to no button theme(sitra). Can I install this mod above it?
Title: Re: Complete PJIRC Integration
Post by: Elmacik on September 16, 2005, 09:05:29 AM
button appears only in default theme. you have to add the buttons to the other themes manually.
Title: Re: Complete PJIRC Integration
Post by: 3guk on September 16, 2005, 01:11:01 PM
You just need to edit the chat.template file it all in there and it should be commented for easy use.
Title: Re: Complete PJIRC Integration
Post by: Menni on September 17, 2005, 07:02:25 AM
I got mod working in default, but what should I change to make it work in sitra?
Title: Re: Complete PJIRC Integration
Post by: 3guk on September 17, 2005, 08:11:57 AM
Ok,

If you want it to work with a specific theme then you have to :

Open your themes index.template.php and then around line 445 will be different for each them but it is usually quite a long way down.

Find :
   // Show the [home] and [help] buttons.

echo '

<a href=" http://www.ukslc.org/forum ">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];


Yours again may look slightly different as I have removed the help button.

But on a new line just underneath it add :          echo' <a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];
                     
         
Title: Re: Complete PJIRC Integration
Post by: Menni on September 17, 2005, 08:21:50 AM
Now I'm confused. I got pjirc integrated chat mod allready working in my forum. I got your mod working in default but not in sitra theme.
this is what I got:
// Show the [home] and [help] buttons.

echo '
<div class="menu" style="background-image: url(' . $settings['images_url'] . '/menu.jpg); background-repeat: repeat-x; text-align: center;">
<a href="', $scripturl, '">',$txt[103],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />
<a href="', $scripturl, '?action=help" target="_blank">',$txt[119],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">',$txt[182],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">',$txt[2],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">',$txt[79],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';
// Integrated Chat Mod Icon
      if (!$context['user']['is_guest'])
           echo '
                     <a href="http://www.myforum.net/keskustelu/chat.php" target="_blank">Chat</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';
                     
// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">',$txt['calendar24'],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';

// The [Gallery]!
    echo '
            <a href="http://www.myforum.net/galleria/index.php?cat=">Galleria</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">',$txt[34],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />
<a href="', $scripturl, '?action=register">',$txt[97],'</a>';
Title: Re: Complete PJIRC Integration
Post by: Menni on September 17, 2005, 08:49:42 AM
I specify that I allready have chat buttons and stuff working (alltough theme is no-button theme;)). But how i modify pjirc integrated chat mod to work like your mod?
Or do I have to remove the other to get your mod working?
Title: Re: Complete PJIRC Integration
Post by: marinelife on October 06, 2005, 10:35:06 AM
Does this work with SMF 1.1RC1
Title: Re: Complete PJIRC Integration
Post by: dtm.exe on October 06, 2005, 10:39:31 AM
Quote from: marinelife on October 06, 2005, 10:35:06 AM
Does this work with SMF 1.1RC1

No, but my mod works with RC1.

PJIRC Integrated Chat Mod (http://www.simplemachines.org/community/index.php?topic=45237.0)
Title: Re: Complete PJIRC Integration
Post by: deathwantsme on October 24, 2005, 12:11:13 AM
I get 2 buttons for the chat with this in the default CSS and would like to know how to add just 1 button on other CSS' Can anyone help me?
Title: Re: Complete PJIRC Integration
Post by: d3v on November 30, 2005, 08:04:23 PM
so seriously what's the difference between this and the one posted by dtm.exe

maybe I got the wrong idea but it seems this is a small hack off his work
Title: Re: Complete PJIRC Integration
Post by: KenC on December 21, 2005, 10:35:38 PM
I have a question please ...

I installed the mod via package mgr w/o error, but receive
a "Unable to load the 'main' template" message when trying
to access the chat.  I'm using the default template.

Any thoughts ?

thx

Title: Re: Complete PJIRC Integration
Post by: Sonic-Prophet on December 22, 2005, 01:54:12 AM
Hey guys, I'm hoping someone here can help me? I've searched though all the threads, I've tried the code mod that is listed a few posts back in this thread, but I still can't get 3guks integrated PJIRC mod to work on our forum. It works perfectly on the default forum, but not with our theme. Any suggestions? When I apply the code suggested a few posts back, I get this:

Template Parse Error!

There was a problem loading the /Themes/BlackDay//index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Any help would be greatly appreciated!
Thanks - Jason (montrealmusiciansonline.com)
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 22, 2005, 05:12:49 AM
Post your index.template.php here.

I should be able to tell you what is wrong then.
Title: Re: Complete PJIRC Integration
Post by: KenC on December 22, 2005, 08:05:19 AM
Quote from: 3guk on December 22, 2005, 05:12:49 AM
Post your index.template.php here.

I should be able to tell you what is wrong then.


http://www.counselman.net/index.template.php
http://www.counselman.net/index.template.php~

Hope this is what you're looking for ...

Thx !!
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 22, 2005, 08:44:43 AM
Should have explained myself better,

I was talking to sonic about index.template,

KenC could you tell me what version of SMF you are running,

I might need to mod it slightly for the latest edition of SMF.
Title: Re: Complete PJIRC Integration
Post by: KenC on December 22, 2005, 08:48:15 AM
Quote from: 3guk on December 22, 2005, 08:44:43 AM
Should have explained myself better,

I was talking to sonic about index.template,

KenC could you tell me what version of SMF you are running,

I might need to mod it slightly for the latest edition of SMF.

oh .. IC  ;D

the most recent -  SMF 1.1 RC1
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 22, 2005, 08:57:03 AM
That could be why not tested it with RC1.

Will try it now and see what the problem is.

Regards
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 22, 2005, 09:01:56 AM
Works fine on RC1 for me.

With the default template.

Anyone else having this problem ?

Try to uninstall and then re-install.
Title: Re: Complete PJIRC Integration
Post by: KenC on December 22, 2005, 09:08:55 AM
Quote from: 3guk on December 22, 2005, 09:01:56 AM
Works fine on RC1 for me.

With the default template.

Anyone else having this problem ?

Try to uninstall and then re-install.

uninstalled and re-install with the same result -   Unable to load the 'main' template. 

note: i am using the default temp and error msg is not during installation, but when clicking
the chat button.   hope this helps ...

Title: Re: Complete PJIRC Integration
Post by: Sonic-Prophet on December 22, 2005, 05:48:44 PM
Hey 3guks, sorry it to long to respond, I was @ work all day, & didn't have time to check the board. Here is my index.template.php:

<?php
// Version: 1.0; index

/* This template is, perhaps, the most important template in the theme.  It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below.  It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />
<meta name="keywords" content="Montreal, Musicians, Online, Bands, Groups, Music, Musicians Wanted, guitarists, singers, drummers, bass players, Music equipment for sale" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
// --></script>
<title>'
$context['page_title'], '</title>';

// This is here because Gecko browsers properly support white-space....
if ($context['browser']['is_gecko'])
echo '
<style type="text/css"><!--
.code
{
white-space: pre;
}
--></style>'
;

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="' 
$scripturl '?action=;topic=' $context['current_topic'] . '.0;prev_next=prev" />
<link rel="next" href="' 
$scripturl '?action=;topic=' $context['current_topic'] . '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?action=;board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!--
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
document.getElementById("upshrinkTemp").src = "'
$scripturl'?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc='$context['session_id'], ';" + (new Date().getTime());';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

current_header = mode;
}
// --></script>
</head>
<body>'
;

// Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<div id="headerarea" style="padding: 12px 30px 4px 30px;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">';

// The logo and the three info boxes.
echo '
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%">
<tr>
<td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">'
;

// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
 <td rowspan="2" align="left">
<img src="'
$settings['images_url'], '/mmobanner.jpg"/></td>
</tr>
 </table>'
; echo '
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top">
<table width="99%" cellspacing="1" cellpadding="5" class="tborder"><tr>
<td class="titlebg" width="100%"'
;
if (!empty(
$context['user']['avatar'])) {
echo
'colspan="2"';
}
echo
'>User Info</td></tr><tr>';

if (!empty($context['user']['avatar']))
echo '<td valign="middle" class="windowbg">'$context['user']['avatar']['image'], '</td>';

echo '<td width="100%" valign="top" class="windowbg2" style="font-family: verdana, arial, sans-serif; font-size: x-small;">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
'
$txt['hello_member'], ' <b>'$context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', '$txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>'
$txt[616], '</b>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=regcenter">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'];

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
}

echo '<br />
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />
'
$context['current_time'];
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
'
$txt['welcome_guest'], '<br />
'
$context['current_time'], '<br />

<form action="'
$scripturl'?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="302400">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
'
$txt['smf52'], '
</form>'
;
}

echo '
</td></tr></table>

<form action="'
$scripturl'?action=search2" method="post" style="margin: 0; margin-top: 7px;">
<b>'
$txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 8ex;" />&nbsp;
<a href="'
$scripturl'?action=search;advanced">'$txt['smf298'], '</a>
<input type="hidden" name="advanced" value="0" />'
;

// If we're on a certain board, limit it to this board ;).
if (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>

</td>
<td width="262" style="padding-left: 5px;" valign="top">'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<table width="99%" cellspacing="1" cellpadding="5" class="tborder">
<tr>
<td class="titlebg" width="100%">News Box</td>
</tr>
<tr>
<td class="windowbg2" width="100%" style="font-size: x-small">'
$context['random_news_line'], '</td></tr></table>';

// The "key stats" box.
echo '
<br /><table width="99%" cellspacing="1" cellpadding="5" class="tborder">
<tr>
<td class="titlebg" width="100%">Key Stats</td>
</tr>
<tr>
<td class="windowbg2" width="100%" style="font-size: x-small"><b>'
$modSettings['totalMessages'], '</b> '$txt[95], ' '$txt['smf88'], ' <b>'$modSettings['totalTopics'], '</b> '$txt[64], ' '$txt[525], ' <b>'$modSettings['memberCount'], '</b> '$txt[19], '<br />
'
$txt[656], ': <b> <a href="'$scripturl'?action=profile;u='$modSettings['latestMember'], '">'$modSettings['latestRealName'], '</a></b>
</td></tr></table>'
;

echo '
</td>
</tr>
</table>

<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />';

// Show the menu here, according to the menu sub template.
template_menu();

echo '
</div>'
;

// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '</td>
</tr></table>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!--
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// --></script>
<table cellspacing="2" cellpadding="2" class="tboarder" width="100%">
<tr>
<td valign="top" width="100%">
'
theme_copyright(), '<br /><font size="1">Theme by <a href="mailto:[email protected]">Sonic</a>
Based on "Black Day" <br>
By <a href="http://dev.nesian.info" target="_blank">Nesianstyles</a> | Button set by Andrea</font>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

echo '
</div>'
;

// This is an interesting bug in Internet Explorer AND Safari.  Rather annoying, it makes overflows just not tall enough.
if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!--'
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
else
{
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
window_oldOnload();
}'
;
}

echo '
// --></script>'
;
}

echo '
</body>
</html>'
;
}

// Show a linktree.  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav" style="font-size: smaller;">';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &nbsp;|&nbsp; ';
}

echo '</span>';
}

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

// Show the [home] and [help] buttons.
echo '
<a href="'
$scripturl'">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/home.gif" alt="' $txt[103] . '" style="margin: 2px 0;" border="0" />' $txt[103]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/help.gif" alt="' $txt[119] . '" style="margin: 2px 0;" border="0" />' $txt[119]), '</a>'$context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="'
$scripturl'?action=search">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/search.gif" alt="' $txt[182] . '" style="margin: 2px 0;" border="0" />' $txt[182]), '</a>'$context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="'
$scripturl'?action=admin">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin.gif" alt="' $txt[2] . '" style="margin: 2px 0;" border="0" />' $txt[2]), '</a>'$context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="'
$scripturl'?action=profile">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/profile.gif" alt="' $txt[79] . '" style="margin: 2px 0;" border="0" />' $txt[467]), '</a>'$context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="'
$scripturl'?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/calendar.gif" alt="' $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' $txt['calendar24']), '</a>'$context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="'
$scripturl'?action=login">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/login.gif" alt="' $txt[34] . '" style="margin: 2px 0;" border="0" />' $txt[34]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=register">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/register.gif" alt="' $txt[97] . '" style="margin: 2px 0;" border="0" />' $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/logout.gif" alt="' $txt[108] . '" style="margin: 2px 0;" border="0" />' $txt[108]), '</a>';
}

?>


Thanks for your help man!  :)
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 22, 2005, 05:58:37 PM

<?php
// Version: 1.0; index

/* This template is, perhaps, the most important template in the theme.  It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below.  It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />
<meta name="keywords" content="Montreal, Musicians, Online, Bands, Groups, Music, Musicians Wanted, guitarists, singers, drummers, bass players, Music equipment for sale" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
// --></script>
<title>'
$context['page_title'], '</title>';

// This is here because Gecko browsers properly support white-space....
if ($context['browser']['is_gecko'])
echo '
<style type="text/css"><!--
.code
{
white-space: pre;
}
--></style>'
;

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="' 
$scripturl '?action=;topic=' $context['current_topic'] . '.0;prev_next=prev" />
<link rel="next" href="' 
$scripturl '?action=;topic=' $context['current_topic'] . '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?action=;board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!--
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
document.getElementById("upshrinkTemp").src = "'
$scripturl'?action=jsoption;var=collapse_header;val=" + (mode ? 1 : 0) + ";sesc='$context['session_id'], ';" + (new Date().getTime());';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

current_header = mode;
}
// --></script>
</head>
<body>'
;

// Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<div id="headerarea" style="padding: 12px 30px 4px 30px;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">';

// The logo and the three info boxes.
echo '
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%">
<tr>
<td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">'
;

// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
 <td rowspan="2" align="left">
<img src="'
$settings['images_url'], '/mmobanner.jpg"/></td>
</tr>
 </table>'
; echo '
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top">
<table width="99%" cellspacing="1" cellpadding="5" class="tborder"><tr>
<td class="titlebg" width="100%"'
;
if (!empty(
$context['user']['avatar'])) {
echo
'colspan="2"';
}
echo
'>User Info</td></tr><tr>';

if (!empty($context['user']['avatar']))
echo '<td valign="middle" class="windowbg">'$context['user']['avatar']['image'], '</td>';

echo '<td width="100%" valign="top" class="windowbg2" style="font-family: verdana, arial, sans-serif; font-size: x-small;">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
'
$txt['hello_member'], ' <b>'$context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', '$txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>'
$txt[616], '</b>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=regcenter">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'];

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
}

echo '<br />
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />
'
$context['current_time'];
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
'
$txt['welcome_guest'], '<br />
'
$context['current_time'], '<br />

<form action="'
$scripturl'?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="302400">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
'
$txt['smf52'], '
</form>'
;
}

echo '
</td></tr></table>

<form action="'
$scripturl'?action=search2" method="post" style="margin: 0; margin-top: 7px;">
<b>'
$txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 8ex;" />&nbsp;
<a href="'
$scripturl'?action=search;advanced">'$txt['smf298'], '</a>
<input type="hidden" name="advanced" value="0" />'
;

// If we're on a certain board, limit it to this board ;).
if (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>

</td>
<td width="262" style="padding-left: 5px;" valign="top">'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<table width="99%" cellspacing="1" cellpadding="5" class="tborder">
<tr>
<td class="titlebg" width="100%">News Box</td>
</tr>
<tr>
<td class="windowbg2" width="100%" style="font-size: x-small">'
$context['random_news_line'], '</td></tr></table>';

// The "key stats" box.
echo '
<br /><table width="99%" cellspacing="1" cellpadding="5" class="tborder">
<tr>
<td class="titlebg" width="100%">Key Stats</td>
</tr>
<tr>
<td class="windowbg2" width="100%" style="font-size: x-small"><b>'
$modSettings['totalMessages'], '</b> '$txt[95], ' '$txt['smf88'], ' <b>'$modSettings['totalTopics'], '</b> '$txt[64], ' '$txt[525], ' <b>'$modSettings['memberCount'], '</b> '$txt[19], '<br />
'
$txt[656], ': <b> <a href="'$scripturl'?action=profile;u='$modSettings['latestMember'], '">'$modSettings['latestRealName'], '</a></b>
</td></tr></table>'
;

echo '
</td>
</tr>
</table>

<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />';

// Show the menu here, according to the menu sub template.
template_menu();

echo '
</div>'
;

// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '</td>
</tr></table>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!--
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// --></script>
<table cellspacing="2" cellpadding="2" class="tboarder" width="100%">
<tr>
<td valign="top" width="100%">
'
theme_copyright(), '<br /><font size="1">Theme by <a href="mailto:[email protected]">Sonic</a>
Based on "Black Day" <br>
By <a href="http://dev.nesian.info" target="_blank">Nesianstyles</a> | Button set by Andrea</font>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

echo '
</div>'
;

// This is an interesting bug in Internet Explorer AND Safari.  Rather annoying, it makes overflows just not tall enough.
if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!--'
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
else
{
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
window_oldOnload();
}'
;
}

echo '
// --></script>'
;
}

echo '
</body>
</html>'
;
}

// Show a linktree.  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav" style="font-size: smaller;">';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &nbsp;|&nbsp; ';
}

echo '</span>';
}

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

// Show the [home] and [help] buttons.
echo '
<a href="'
$scripturl'">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/home.gif" alt="' $txt[103] . '" style="margin: 2px 0;" border="0" />' $txt[103]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/help.gif" alt="' $txt[119] . '" style="margin: 2px 0;" border="0" />' $txt[119]), '</a>'$context['menu_separator'];

echo 
'<a href="'$scripturl'?action=chat">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/chat.gif" alt="' $txt[103] . '" border="0" />' $txt[103]), '</a>'$context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="'
$scripturl'?action=search">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/search.gif" alt="' $txt[182] . '" style="margin: 2px 0;" border="0" />' $txt[182]), '</a>'$context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="'
$scripturl'?action=admin">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin.gif" alt="' $txt[2] . '" style="margin: 2px 0;" border="0" />' $txt[2]), '</a>'$context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="'
$scripturl'?action=profile">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/profile.gif" alt="' $txt[79] . '" style="margin: 2px 0;" border="0" />' $txt[467]), '</a>'$context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="'
$scripturl'?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/calendar.gif" alt="' $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' $txt['calendar24']), '</a>'$context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="'
$scripturl'?action=login">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/login.gif" alt="' $txt[34] . '" style="margin: 2px 0;" border="0" />' $txt[34]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=register">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/register.gif" alt="' $txt[97] . '" style="margin: 2px 0;" border="0" />' $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/logout.gif" alt="' $txt[108] . '" style="margin: 2px 0;" border="0" />' $txt[108]), '</a>';
}

?>


Should work. Just try that index.template instead of your one.
Title: Re: Complete PJIRC Integration
Post by: Sonic-Prophet on December 22, 2005, 06:28:46 PM
That's the stuff man! Thank you so much 3guk! Let me know if you like blues/jazz/classic rock, & if you do, when our CD's finished, I'll send you a copy for helpin' us out!
Peace - Jason
Title: Re: Complete PJIRC Integration
Post by: bbgmp on December 28, 2005, 12:11:25 PM
How can I edit the chat.template.php so that it doesn't put a suffix at the end of each username? If I remove the $userchatsuffix = "mysite"; line completely, I still end up with an underscore _ after each nickname. Is there a way around this?
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 28, 2005, 04:09:24 PM
Replace line 83 with
<param name="nick" value="'. $userchatguestname . '">
Title: Re: Complete PJIRC Integration
Post by: bbgmp on December 30, 2005, 09:02:04 AM
Thanks  :)
Title: Re: Complete PJIRC Integration
Post by: d3v on January 01, 2006, 09:28:40 PM
QuoteHow can I edit the chat.template.php so that it doesn't put a suffix at the end of each username? If I remove the $userchatsuffix = "mysite"; line completely, I still end up with an underscore _ after each nickname. Is there a way around this?

Quote from: 3guk on December 28, 2005, 04:09:24 PM
Replace line 83 with
<param name="nick" value="'. $userchatguestname . '">

That didn't do the trick..is there anything else?
Title: Re: Complete PJIRC Integration
Post by: 3guk on January 03, 2006, 06:55:28 AM
Thats odd, are you sure you re-uploaded the file ?

I can't think of anything else that it could be ?
Title: Re: Complete PJIRC Integration
Post by: Lene on January 03, 2006, 01:16:29 PM
Does this work with the 1.1 RC 2?
Title: Re: Complete PJIRC Integration
Post by: TVTroll on January 06, 2006, 12:05:17 AM
One small question:

Is there a way to level the chat icon with the other icons? Mine is sitting lower than the rest. I posted a picture of what I'm talking about below.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.photobucket.com%2Falbums%2Fd163%2Fjustsimpsons%2Fforumchat.gif&hash=ecdd8a2d2d1dd9643540f1520fa3ffc94c638818)

Thanks for your help.
Title: Re: Complete PJIRC Integration
Post by: TVTroll on January 06, 2006, 03:09:43 PM
Nevermind, I figured it out myself, and for anyone else who is interested you can fix it by doing the following:

Find the following code:

<a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="Chat" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '

and replace with:

<a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="Chat" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
Title: Re: Complete PJIRC Integration
Post by: misjka on January 09, 2006, 12:53:29 AM
Hi!
I tried to install this on a 1.0.5 board, but got Failure on index.template.php in Package Mgr (although file permission were 777 on that one) :(, and consequently the Chat button does not occur on the Default Theme :(... May it have something to do with that I'm running TinyPortal 0.75 on this board, maybe???
Title: Re: Complete PJIRC Integration
Post by: fenris_w0lf on January 10, 2006, 03:36:58 PM
Hi,

I have the following:

"SMF 1.1 RC1" with "Oxygen / TinyPortal v.0.75 by Bloc"

also mods:

"Enhanced Quick Reply 1.0"
"Real Name Mod    2.0"
"Users Online Today Mod  1.1.2"

Will this PJIRC mod work with the above ???
Title: Re: Complete PJIRC Integration
Post by: 3guk on January 11, 2006, 12:16:38 PM
I suppose the best way is to try it and see !! :)

I assume it would.
Title: Re: Complete PJIRC Integration
Post by: fenris_w0lf on January 11, 2006, 12:28:27 PM
hehe 3quk ! :)

yes youre prolly right, thing is the forum has quite alot of users, and I'm not all that sure about how to restore from a backup if the mod breaks something.....heck I'm not even sure how to backup   :(  (other than manually copying all the files to my pc)

So, I take it there's nothing you see from the stuff I posted that suggest that it wont work ?
Title: Re: Complete PJIRC Integration
Post by: fenris_w0lf on January 16, 2006, 05:42:16 PM
Well, I tried to apply the mod and got this:


Quote!!
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

QuoteInstall Actions
Installations actions for "3guks PJIRC Integrated Chat Mod":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Themes/default/index.template.php    Test failed
2.    Execute Modification    ./index.php    Test successful
3.    Extract Tree    ./pjirc    
4.    Extract File    ./Sources/Chat.php    
5.    Extract File    ./Themes/default/Chat.template.php    
6.    Extract File    ./Themes/default/images/english/chat.gif
:(
Title: Re: Complete PJIRC Integration
Post by: kaos1409 on January 17, 2006, 12:31:03 PM
I'm using the mod with 1.05, and it seems the calls to SSI.php are faiiling?

I'm getting the following error messages under key stats:
Notice: Undefined index: common_stats in /home/sensnati/public_html/talk/Sources/Load.php(1040) : eval()'d code on line 485
Posts in
Notice: Undefined index: common_stats in /home/sensnati/public_html/talk/Sources/Load.php(1040) : eval()'d code on line 485
Topics by
Notice: Undefined index: common_stats in /home/sensnati/public_html/talk/Sources/Load.php(1040) : eval()'d code on line 485
Members
Latest Member:
Notice: Undefined index: common_stats in /home/sensnati/public_html/talk/Sources/Load.php(1040) : eval()'d code on line 486

I also noticed that when the chat appears, its not using the currently logged in user - I'm assuming because of the errors above, the script doesn't continue and doesn't get the active username?


http://www.sensnation.com/talk/chat.php

Your help would be much appreciated!
Title: Re: Complete PJIRC Integration
Post by: kaos1409 on January 17, 2006, 12:33:23 PM
My bad.. thats leftover from the other PJIRC chat mod yours works great!!!
Title: Re: Complete PJIRC Integration
Post by: AntaresMHD on January 23, 2006, 10:03:20 AM
Greetings from... Venezuela...
Well, this is my first post, so please, please try to be nice XD

I'm having some troubles with this mod... First, I tried to upload it with the package manager, but after it "uploads" it, the Administration Center is redirected to the index forum, and when I go back to the SMF Center, there's no package uploaded  >:( ... I tried used the ftp, and it worked (the uploading, not the installation), 'cuz the name of the mod is shown in the package list... I'll show you: (Note: it's on spanish because... i'm from Venezuela... Oh, I already said that  :) )

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg43.imageshack.us%2Fimg43%2F2323%2Fimg0019ek.jpg&hash=e08702d97c1a78854a3e57617388b37f4c193e67)

When I try ty aply the mod by the package manager, it shows this message:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg43.imageshack.us%2Fimg43%2F2448%2Fimg0027dy.jpg&hash=3029c2d9e808517dcf0eaedf2b85ff9ec028f69c)

And also, when i try to install the mod by using the ftp (putting the archives in the package in their respective folders), nothing happens. Could you please help me? I'm kind of a... newbie in this matter...
Thanks...
Title: Re: Complete PJIRC Integration
Post by: Washi on February 02, 2006, 06:19:42 PM
3guk, first of all, I wanna applaud you for this. I love it.

I'm about to upgrade to 1.0.6, and I was wondering if it'd work ok with the 1.0.6 version, or if I had to change something in the package. Lemme know. :D
Title: Re: Complete PJIRC Integration
Post by: robone on February 03, 2006, 02:26:47 PM
Hi 3guk...I remember when you and I were discussing the changes to the original version of this mod. You have done a good job.

Have you thought about how we can show members how many people are chatting before they log on.
Title: Re: Complete PJIRC Integration
Post by: vibez on February 04, 2006, 02:53:19 PM
Hi,

are there an plans on getting this working on 1.1RC2?
Title: Re: Complete PJIRC Integration
Post by: fenris_w0lf on February 05, 2006, 07:18:08 AM
Anyone having problems installing or otherwise, might want to have a look at this post:

How to integrate PJIRC into TP quick'n'easy (http://www.tinyportal.net/smf/index.php?topic=2267.0)
Title: Re: Complete PJIRC Integration
Post by: crazie on February 10, 2006, 08:40:34 PM
I installed the chat feature fine, but I'm not going to use it.  I mainly just installed it to see how it works, etc.  Now, I have it installed, and it won't uninstall.

I get the following errors:


1.    Execute Modification    setup.mod  Modification parse error
2.    Execute Modification    - Modification parse error

Any suggestions?
Title: Re: Complete PJIRC Integration
Post by: dtm.exe on February 10, 2006, 09:23:20 PM
Quote from: crazie on February 10, 2006, 08:40:34 PM
I installed the chat feature fine, but I'm not going to use it.  I mainly just installed it to see how it works, etc.  Now, I have it installed, and it won't uninstall.

I get the following errors:


1.    Execute Modification    setup.mod  Modification parse error
2.    Execute Modification    - Modification parse error

Any suggestions?

The mod wasn't packaged correctly, apparently.  Either that OR this mod is not compatible with your version of SMF.
Title: Re: Complete PJIRC Integration
Post by: crazie on February 10, 2006, 09:48:47 PM
Well, it's still working, and works fine.  I guess I'll just leave it...lol. 

Is it even possible for it to install flawlessly if it wasn't packaged correctly?  BTW, I'm using 1.1RC2.  It's not a big deal, since it's not going to waste my bandwidth (is it?), so I'm not worried if it stays.

Also, wanted to say thanks for the mod, very nice work!
Title: Re: Complete PJIRC Integration
Post by: aussieholden on February 13, 2006, 09:25:17 PM
I would like to be able to use this mod but it doesn't work on my version of SMF1.1 RC2 when will it be ready for us to use ?
Title: Re: Complete PJIRC Integration
Post by: crazie on February 13, 2006, 11:15:17 PM
It's working with 1.1RC2 right now.  That's what I'm using with it.  My only issue (if you consider it an issue) is that it won't uninstall.  ::)
Title: Re: Complete PJIRC Integration
Post by: aussieholden on February 14, 2006, 02:24:06 AM
QuoteIt's working with 1.1RC2 right now.  That's what I'm using with it.  My only issue (if you consider it an issue) is that it won't uninstall.

It installs but there is no access to the chatroom anywhere to be seen.

1. Execute Modification ./Themes/default/index.template.php Test failed  

I also get that before installation and yes it's set to 777.
Title: Re: Complete PJIRC Integration
Post by: crazie on February 14, 2006, 06:10:39 PM
I'm not real good with this stuff, but are you installing into the default theme?  If you are using a custom theme, I don't think it will alter the index.template.php file.  So you may have to do that manually (I'm not sure exactly how).

I think what you are missing is simply the "Chat" button.  You may have to enter that manually if you are using something other than the default theme.
Title: Re: Complete PJIRC Integration
Post by: aussieholden on February 14, 2006, 09:14:17 PM
I'm using the default theme all the time and there are also no options in the admin area for the chatroom. so I would say it still doesn't work for SMF1.1 RC2 properly.
Title: Re: Complete PJIRC Integration
Post by: crazie on February 14, 2006, 10:05:58 PM
Well, maybe one of the guys/gals who know what they are doing can help you.  All I can tell you is that I'm using 1.1RC2 and had no stumbles at all when I installed it.
Title: Re: Complete PJIRC Integration
Post by: 3guk on February 27, 2006, 08:13:28 AM
Guys,

Im hoping to pick this mod up again soon and get it working with the latest versions, as well as a proper admin interface along with a few other things.

Its had to take a back seat whilst I have worked on other projects, most of these are now pretty much managing themselves so I should be able to pick up this one !!
Title: Re: Complete PJIRC Integration
Post by: The Burning Man on June 12, 2006, 04:57:04 PM
Installation and setup was seemless, great mod! One issue remains for me, and that was brought up by another user. I won't post a screenshot because that user did. The issue with the padding is annoying as all will get at. A fix would be great.
Title: Re: Complete PJIRC Integration
Post by: MULITRI on June 14, 2006, 06:23:29 AM
Hello:

I've readed the whole topic and i didn't found what can answer my doubt, so i'm going to ask replying here.

Does this mod install the applet to run and the needed information in the chatter computer or it runs from the server where is the forum installed and hosted?

I want to know this because if it runs directly in the server it may cause a server resources consumption which could break terms of service in many hosting websites.

I hope i've explained right my doubt and get an answer.

Thanks in advance.
Title: Re: Complete PJIRC Integration
Post by: The Burning Man on June 14, 2006, 10:16:12 PM
This is run on the server provided by the Serenity-IRC team. It is embeded into your forum as a Java Applet, so the bandwidth used by your server is very minimal, if any is noticable at all.
Title: Re: Complete PJIRC Integration
Post by: Jason kiDD on June 29, 2006, 10:10:30 AM
When you get this to work with 1.1 rc2 let me know..  8)
Title: Re: Complete PJIRC Integration
Post by: Vinspire on July 02, 2006, 08:04:45 PM
Quote from: 3guk on February 27, 2006, 08:13:28 AM
Guys,

Im hoping to pick this mod up again soon and get it working with the latest versions, as well as a proper admin interface along with a few other things.

Its had to take a back seat whilst I have worked on other projects, most of these are now pretty much managing themselves so I should be able to pick up this one !!

Is there any new updates dude ? The admin cp is very needed :(
Title: Re: Complete PJIRC Integration
Post by: Zeremi on July 04, 2006, 06:55:18 AM
Hi! (SMF version 1.1.RC2)

I did try the other chat but it didnt work, so I try this... Well, something is wrong still.

When using package manager it says:

"
!!
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
"

And

1.     Execute Modification     ./Themes/default/index.template.php     Test failed


What should I do?

Thanks!
-Zeremi
Title: Re: Complete PJIRC Integration
Post by: icman on August 14, 2006, 01:00:25 PM
thank
Title: Re: Complete PJIRC Integration
Post by: 3guk on September 17, 2006, 01:44:30 PM
Sorry about the lack of replies, still don't have the time to take this back up again, I might start next week on a new version for RC3, but until I can sort my quick edit problems out, can't really do anything.
Title: Re: Complete PJIRC Integration
Post by: aglioeolio on September 30, 2006, 09:54:35 PM
THanks a LOT for This MOD 3guk

It´s simply fantastic, working like a charm on RC2 and Tportal  ;D
Title: Re: Complete PJIRC Integration
Post by: 3guk on October 01, 2006, 08:08:13 AM
Good,

I am glad its working for you !! Sorry guys, still do not have the time to take this mod up again, I only just have enough time to check this place once every month let alone work on coding a mod !! Sorry !!
Title: Re: Complete PJIRC Integration
Post by: Vinspire on October 02, 2006, 04:04:57 PM
So, is the RC 3 out ? thanks :)
Title: Re: Complete PJIRC Integration
Post by: sagui on October 03, 2006, 10:47:17 AM
who and that already mod installed this in the version rc3?    I do not obtain to find this line in index.template.php

   <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '



know as installing?
Title: Re: Complete PJIRC Integration
Post by: crmrchnt on October 16, 2006, 05:49:54 PM
 Type Action Description
1. Execute Modification ./Themes/default/index.template.php Test failed
2. Execute Modification ./index.php Test successful
3. Extract Tree ./pjirc 
4. Extract File ./Sources/Chat.php 
5. Extract File ./Themes/default/Chat.template.php 
6. Extract File ./Themes/default/images/english/chat.gif
its not installing for me
Title: Re: Complete PJIRC Integration
Post by: robotman321 on October 22, 2006, 07:26:26 PM
so nothing yet i presum i am really looking foward to this mod :)
Title: Re: Complete PJIRC Integration
Post by: Vinspire on October 23, 2006, 12:20:26 AM
someone should contact 3guk and inform him about this  :'(
Title: Re: Complete PJIRC Integration
Post by: robotman321 on October 24, 2006, 04:21:11 PM
yeha someone really should
Title: Re: Complete PJIRC Integration
Post by: aglioeolio on November 01, 2006, 01:18:59 PM
You should try to install this manually, not through package manager...

its easy, just make modifications in "Themes\your theme\Index.template.php" and "Board root\Index.php" , then upload the other files to their right destination folders and you´re ready to go...




just open file "modification.xml" with notepad and follow the edits described, and remember to close all php tags




and of course backup this 2 files Index.template.php and index.php before editing, if you´re not familiar with this type of editing

Title: Re: Complete PJIRC Integration
Post by: Vinspire on November 02, 2006, 01:45:14 AM
Quote from: aglioeolio on November 01, 2006, 01:18:59 PM
You should try to install this manually, not through package manager...

its easy, just make modifications in "Themes\your theme\Index.template.php" and "Board root\Index.php" , then upload the other files to their right destination folders and you´re ready to go...




just open file "modification.xml" with notepad and follow the edits described, and remember to close all php tags




and of course backup this 2 files Index.template.php and index.php before editing, if you´re not familiar with this type of editing



Will try to have a look at it later then.

Anyway, before I start editing ... Did you tried this methods and working yet ?
Title: Re: Complete PJIRC Integration
Post by: aglioeolio on November 02, 2006, 05:09:24 AM
Only in RC2, not RC3 yet - but I thnk is the same isn´t?

I edited only "index.php" file to validate the "action" url, and place a .gif image to registered users with "index.php?action=chat" link

the others package files are just uploaded not edited - you can edit themes\default\chat.template.php to start the chat in a custom IRC chanel, disable guests in chat, etc.
Title: Re: Complete PJIRC Integration
Post by: Vinspire on November 02, 2006, 07:47:45 AM
Quote from: aglioeolio on November 02, 2006, 05:09:24 AM
Only in RC2, not RC3 yet - but I thnk is the same isn´t?

I edited only "index.php" file to validate the "action" url, and place a .gif image to registered users with "index.php?action=chat" link

the others package files are just uploaded not edited - you can edit themes\default\chat.template.php to start the chat in a custom IRC chanel, disable guests in chat, etc.

Ermmm ... In RC 2 & RC 3 is totally a different story.

Well, I just tried installing this mod in RC3 and it work :)
Title: Re: Complete PJIRC Integration
Post by: Firestarter on December 03, 2006, 09:21:29 PM
Are there any plans to make pjirc compatable with smf 1.1
Title: Re: Complete PJIRC Integration
Post by: robotman321 on December 03, 2006, 10:44:48 PM
lol thats what i was thinking i hope somthing comes of it :)
Title: Re: Complete PJIRC Integration
Post by: Firestarter on December 04, 2006, 12:20:14 PM
The only problem with the installation is that it can't edit the index.template.php
Title: Re: Complete PJIRC Integration
Post by: Firestarter on December 04, 2006, 12:31:54 PM
after a test install I can use
"http://forums.sftp.biz/index.php?action=chat"
and get to the chat
Title: Re: Complete PJIRC Integration
Post by: Firestarter on December 04, 2006, 04:52:09 PM
Ok I got the pjirc working with SMF 1.1 but had to edit the index.template.php file.  Use this at your own risk

Please don't do this if you don't know what you are doing and make a backup of the files before trying.

First I installed ignoring the unable to edit the index.template.php.
Or you can manually upload and edit index.php and index.template.php

Then I edited index.template.php by adding some code

just before the login and logout button

if you are not sure where to add this search for the line "// If the user is a guest, show [login] button."  and paste the followin before that line

   // the [3guks_PJIRC] button
      echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="Chat" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '</a>
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

the find a line like this "array('gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))"
and edit it "array('chat','gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))"
Title: Re: Complete PJIRC Integration
Post by: robotman321 on December 04, 2006, 11:24:16 PM
HAHA it works!!!! i love it just need to figure out how to take the button and make it like the rest of the SMF 1.1 bar lol
Title: Re: Complete PJIRC Integration
Post by: robotman321 on December 05, 2006, 12:15:24 AM
this mod owns all when it works if anyone needs help setting up pm me cause i got mine workin :)
Title: Re: Complete PJIRC Integration
Post by: neskiairti on December 13, 2006, 05:58:34 PM
I have a question..
will you ever add a function to choose of multiple chatrooms and servers?
off my site, i run 8 channels on 3 servers.. many names do not match the forum names.. but either way, I need a way for the user to select which area they are going to.. and choose their name..
Title: Re: Complete PJIRC Integration
Post by: robotman321 on December 15, 2006, 12:06:43 AM
lol from the way to code looks and the time it is taking him to get back i'd say dont count on it unless someone can think it up :/
Title: Re: Complete PJIRC Integration
Post by: 3guk on December 28, 2006, 11:13:21 AM
Guys,

I hate to take so long to reply, but my personal life at the moment is resulting in me not getting much time on the computer let alone working on modifications.

Am going to take a look at it within the next month or so and update it to 1.1, if anyone has any sensible feature requests then I can probably integrate them such that they work.

I can and will install it on peoples server if you would like for the time being, just PM me and hopefully we can go from there.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on December 29, 2006, 04:57:30 PM
a sensible feature, um could you make a place at the bottom by your users online that would allow you to see who is in the chatroom?
Title: Re: Complete PJIRC Integration
Post by: Skunkie on January 02, 2007, 01:54:50 AM
3guk, i just wanted to say thank you for this mod.  I look forward to any future updates.

Hope your New Year went well!
Title: Re: Complete PJIRC Integration
Post by: 3guk on January 02, 2007, 11:16:59 AM
Just so everyone knows, it will work with 1.1, you will just need to do a few minor mods to it first, until I package up a new version !!
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 05, 2007, 02:56:58 AM
yes explained in firestarters thread here: http://www.simplemachines.org/community/index.php?topic=49444.msg839163#msg839163
Title: Re: Complete PJIRC Integration
Post by: 3guk on January 16, 2007, 12:49:17 PM
I have packaged up a brand new version to work with 1.1

Nothing much changed you will still have to edit chat.template.php to get your settings set to your server.

I am working on a control panel but at least it now works with 1.1

Title: Re: Complete PJIRC Integration
Post by: neskiairti on January 17, 2007, 04:08:50 AM
a control panel, plus an optional "chat startup" screen, where you can choose your server, (if the admin enables that) choose your username, choose your starting room, choose all those details, from password to port.
Title: Re: Complete PJIRC Integration
Post by: White_Wolf on January 21, 2007, 10:42:59 AM
Somebody let me know when this mod actually works. I am running SMF 1.1.1
I get the index.template.php error, and I am not doing Firestarters hack to that file because I'm not sure what all that code means, and I'd be afraid of installing this mod, it screws something up, and I can't uninstall it. Somebody else here mentioned they couldn't install it. So I think this mod is way to buggy for me to play with.
Title: Re: Complete PJIRC Integration
Post by: 3guk on January 30, 2007, 03:01:52 PM
Have you tried the new version white wolf ??

Chances are you have a mod installed that has edited your index.template.php file.

Install it regardless of the error. The only thing you will be lacking is a button to the chat file. Thats the problem with the way these things install, if something else has played with index.template then they struggle to install.
Title: Re: Complete PJIRC Integration
Post by: Vinspire on January 31, 2007, 09:59:39 PM
3guk, I love this mod of urs  :D

Any hint on when the Control Panel will be available ?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on February 04, 2007, 02:06:55 PM
firestarters hack is no longer needed due to the fact that it does put the code in as said above, the only thing it misses is adding the 'chat' into the array with all the others.  I still have yet to understand this as to why it does not work right.  Still cant wait till he makes this control panel up :p
Title: Re: Complete PJIRC Integration
Post by: maxprofit on February 08, 2007, 08:34:51 AM
Does this mode uninstall properly now? If it does not uninstall what files do we need to back up and replace and or delete to remove this mode.

TIA
Title: Re: Complete PJIRC Integration
Post by: ZeroSkill on February 08, 2007, 03:54:47 PM
I'm using a different theme than default one. Can you please tell me where I've to add the code or can you add it for me please?

<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
 
echo '
  <link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';


/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<script language="javascript" type="text/javascript" src="'
$settings['images_url'], '/preloader.js"></script>
</head>
<body>'
;
// header goes below here
echo '
<!-- Added Header -->
<a name="top"></a>
<div align="center">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="45" height="192"><img src="'
$settings['images_url'], '/forum_body_01.jpg" width="45" height="192" alt="" /></td>
<td width="910" height="192" align="left" valign="top">
<table width="910" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="910" height="139" background="'
$settings['images_url'], '/forum_body_02.jpg" align="center" valign="bottom">
<div class="title-text" style="padding:0 0 18px 0;">'
$context['forum_name'], '</div>
</td>
</tr>
<tr>
<td width="910" height="18" align="left" valign="middle" background="'
$settings['images_url'], '/forum_body_04.jpg">
'
template_menu();
echo 
'
</td>
</tr>
<tr>
<td width="910" height="35"><img src="'
$settings['images_url'], '/forum_body_05.jpg" width="910" height="35" alt="0" /></td>
</tr>
</table>
</td>
<td width="45" height="192"><img src="'
$settings['images_url'], '/forum_body_03.jpg" width="45" height="192" alt="" /></td>
</tr>
</table>
<!-- END header -->
<!-- BEGIN content sections -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" align="center" valign="top" class="content-bg">
<!-- End added header -->
<table width="860" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="860" align="left" valign="top">
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>';


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';
}

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' '' '
<span class="smalltext"><a href="'
$scripturl'?action=pm">Private Messages</a>: '$context['user']['unread_messages'], ' Unread, '$context['user']['messages'], ' Total.</span><br />';
}

// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" class="input1" value="Username" onBlur="if(this.value==\'\') this.value=\'Username\';" onFocus="if(this.value==\'Username\') this.value=\'\';" /> <input type="password" name="passwrd" class="input1" value="password" onBlur="if(this.value==\'\') this.value=\'password\';" onFocus="if(this.value==\'password\') this.value=\'\';" />
<select name="cookielength" class="input1">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input class="button" type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="input1" type="text" name="search" onBlur="if(this.value==\'\') this.value=\'Search...\';" onFocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." style="width: 190px;" />&nbsp;
<input class="button" type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;




// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="left">
Theme by <a target="_blank" style="font-size:10px;">m3talc0re</a>.
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="right">
<a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a>&nbsp;|&nbsp;<a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a>&nbsp;|&nbsp;<a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>&nbsp;|&nbsp;<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" style="font-size:10px;">CSS</a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;

window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>
<!-- Added footer -->
</td>
</tr>
</table>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="855" height="25" align="left" valign="middle" id="copyright-text">
</td>
<td rowspan="2" width="45" height="50" align="right" valign="top">
<a href="#top"><img src="'
$settings['images_url'], '/header_09.jpg" width="45" height="47" alt="Back To Top" title="Back To Top" /></a></td>
</tr>
<tr>
<td width="855" height="20" align="left" valign="middle" id="legal-text">
</td>
</tr>
</table>
<!-- END Legal -->
</td>
</tr>
</table>
<!-- END content sections -->
<!-- BEGIN footer -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="81" align="left" valign="top">
<img src="'
$settings['images_url'], '/header_11.jpg" width="500" height="81" alt="" /></td>
<td width="500" height="81" align="left" valign="top">
<img src="'
$settings['images_url'], '/header_12.jpg" width="500" height="81" alt="" /></td>
</tr>
</table>
<!-- END footer -->
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Footer goes above here
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex; padding-left:8px; padding-right:8px;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;&raquo;&nbsp;';
}

echo '</div>';
}

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

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<ul class="main-navigation">'
;

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-home"><a href="'
$scripturl'">' $txt[103] , '</a></li>' $current_action == 'home' '' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-help"><a href="'
$scripturl'?action=help">' $txt[119] , '</a></li>' $current_action == 'help' '' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-search"><a href="'
$scripturl'?action=search">' $txt[182] , '</a></li>' $current_action == 'search' '' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-admin"><a href="'
$scripturl'?action=admin">' $txt[2] , '</a></li>' $current_action == 'admin' '' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-profile"><a href="'
$scripturl'?action=profile">' $txt[79] , '</a></li>' $current_action == 'profile' '' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-messages"><a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a></li>' $current_action == 'pm' '' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-calendar"><a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a></li>' $current_action == 'calendar' '' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-members"><a href="'
$scripturl'?action=mlist">' $txt[331] , '</a></li>' $current_action == 'mlist' '' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-login"><a href="'
$scripturl'?action=login">' $txt[34] , '</a></li>' $current_action == 'login' '' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-register"><a href="'
$scripturl'?action=register">' $txt[97] , '</a></li>' $current_action == 'register' '' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-logout"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a></li>' $current_action == 'logout' '' '';

// The end of tab section.
echo '</ul>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>

Title: Re: Complete PJIRC Integration
Post by: robotman321 on February 08, 2007, 11:52:37 PM
it will uninstall almost flawlessly, but after you add the 'chat' into the array that was mentioned you will have to go back in and take that our manually otherwise you will have a "chat" on your nav bar with the link the the index page =\
Title: Re: Complete PJIRC Integration
Post by: robotman321 on February 08, 2007, 11:54:47 PM
with a custom theme i am still working on that because i havent nailed it but i tried adding this code: // the [3guks_PJIRC] button
      echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="Chat" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '</a>
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

to the nav bar echos but it just screwed up my index look, idk how it will work right
Title: Re: Complete PJIRC Integration
Post by: maxprofit on February 09, 2007, 03:57:43 PM
robotman321 Thanks re the uninstall.  
Title: Re: Complete PJIRC Integration
Post by: robotman321 on February 09, 2007, 04:00:25 PM
np just helpin out a fellow forumist (made that up :P)
Title: Re: Complete PJIRC Integration
Post by: maxprofit on February 09, 2007, 04:23:02 PM
Just to clarify since I do not want to mess up my FORUM. I am currently running a PJIRC web chat outside the FORUM and it works great. You can test it out here http://maxprofitsignals.com/maxchat/chatlogin.html

but would like to integrate PJIRC into FORUM so that members registered names can be used as the nicks and keep guests out.

I use the Financial Othernet Server and have a room registered there. Problem I can see is what if that othernet server does not like the FORUM registered nick? Some nicks are banned in some IRC servers. What happens? Is there a default nick?

Also regarding uninstall, It will "uninstall" everything that package manager installed? .. I realize that any manual editing has to be removed manually.

I want to give it a try but after reading an earlier post on unable to unstall has made me cautious.

TIA
Title: Re: Complete PJIRC Integration
Post by: robotman321 on February 10, 2007, 11:29:16 AM
thats fine everything will go away guarrenteed except the "chat" in your nav bar, wherin you need to manually edit the index.template.php file so it does not show up there. (if you are using the core theme :P
Title: Re: Complete PJIRC Integration
Post by: softtouch on February 11, 2007, 12:40:45 AM
How bad, would really like to use this, but can't, because it uses the action "chat" which is used too by flashchat already...
Title: Re: Complete PJIRC Integration
Post by: URPG on February 13, 2007, 06:10:01 AM
do you need two different chats?

I'd like to know if it runs smooth on 1.1.2. please :)
Title: Re: Complete PJIRC Integration
Post by: ADINSX on February 14, 2007, 11:15:24 PM
Quote from: URPG on February 13, 2007, 06:10:01 AM
do you need two different chats?

I'd like to know if it runs smooth on 1.1.2. please :)

I've been trying to get it run on 1.1.2 + (theme other than default), and I've really been struggling. So no, not without changing the code.
Title: Re: Complete PJIRC Integration
Post by: gursikh on February 16, 2007, 12:08:27 AM
I'm currently successfully using it on a 1.1.2 site with a theme other than default.

No major problems.

Title: Re: Complete PJIRC Integration
Post by: robotman321 on February 26, 2007, 09:51:17 PM
same it works fine on 1.1.2 until you have to uninstall it then it can get messy
Title: Re: Complete PJIRC Integration
Post by: TrueSatan on March 01, 2007, 06:09:02 AM
 I've got it installed on 1.1.2 with no real problems...I had to do a manual install simply because other mods had already altered the files concerned not because of a problem in the package...other users who report installation problems have almost certainly had the files this package alters already altered by other packages.

I set up everything on the IRC server via a standalone IRC client but am struggling to make the chat.template.php edits needed to get it to work...I'm an experienced computer user (if you'd call 30 years of fiddling about with them experienced) and not bad at working on code but this is the first time I've used IRC...it just never appealed to me. Any help would be appreciated.

I left asterisked out my password. The script says adminIDnumber...I entered my user name so I'm wondering if that is right...my IRC username is different from my forum username...is this a problem?

<?php

function template_main()
{
global 
$context$scripturl$boardurl ;

//Define All The Variables

//Text To Display If No Guests Allowed Is On
$guesttext '<a href="'$boardurl '/index.php?action=register ">Register Today</a></br> Chat is not enabled for guests.';

//Would you like to allow or disallow guests ?

// 1 = On Guests Please 
// 0 = No Guests
$userchatguest "1";

// If We Are Allowing Guests What Do We Call Them ? ???= Random String Of 3 Numbers
$userchatguestname "Cafe42_Guest???";

//If That Name Is Already Taken We Need To Give Them A New Name
$userchatguestalternate "Cafe42_Guest????";

//Guest Full Name
$userchatguestfullname "Cafe42 Site Guest";

// Suffix To Append To The End Of Each Name To Prevent Duplicates
$userchatsuffix "Cafe42";

//Alternate Name If Username Is In Use ??? = Random String Of 3 Numbers
$userchatalternate "Cafe42???";

//Users Full Name To Display
$userchatfullname "Cafe42 User";

//Irc Server To Connect To
$userchatserver "irc.serenity-irc.net";

//Irc Channel To Connect To
$userchatchannel "Cafe42";

// Auto Ident One User , Usually Admin
// 1 = On Ident Admin
// 0 = Off Dont Ident Admin
$userchatident "1";

//User Id To Auto Ident On
$userchatidentid "TrueSatan";

//If Auto Admin Ident Is On Then This Is The Pass To Ident With
$userchatidentpw "******";

//Quit Message For Users Leaving Chat
$userchatquitmsg "Obviously Cafe42 chat isnt exciting enough :-P";


//Scripty Stuff Below Here, You Shouldnt Need To Change
$userchatname $context['user']['name'];

//Make sure the names are IRCable

$userchatname str_replace(" ","_",$context['user']['name']);
$userchatname str_replace(".","_",$userchatname);
$initialchar substr($userchatname,0,1);
if ( (
$initialchar >= "0")  &&  ($initialchar <= "9") ) {
   
$userchatname "_" $userchatname ;
   }

echo
' <br></br> ';

if  (
$userchatguest == ('0') AND $context['user']['is_guest'])
echo
'<div align="center">'$guesttext .'</div>';

else

echo 
'
<center> 
<applet codebase="'
$boardurl'/pjirc" code=IRCApplet.class archive="irc.jar,pixx.jar" width=640 height=400> 
<param codebase="'
$boardurl'/pjirc" name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">';

if  (
$userchatguest == ('1') AND $context['user']['is_guest'])
echo
'
<param name="nick" value="'
$userchatguestname '_'$userchatsuffix '">
<param name="alternatenick" value="'
$userchatguestalternate '">
<param name="fullname" value="'
$userchatguestfullname '">';
else

echo
'
<param name="nick" value="'
$userchatname '_'$userchatsuffix '">
<param name="alternatenick" value="'
$userchatalternate '">
<param name="fullname" value="'
$userchatfullname '">';

//Connect To IRC Server
echo '<param name="host" value="'$userchatserver '">';


//Auto Identify Admin
if  ($userchatident == ('1') AND $context['user']['id'] == ($userchatidentid))

echo 

        <param name="command1" value="/msg nickserv identify '
$userchatidentpw '">
        <param name="command2" value="/join #'
$userchatchannel '"> ';
else

//Not an Admin Eh ?
echo'
         <param name="command1" value="/join #'
$userchatchannel '"> ';


//Define as GUI

echo'
<param name="gui" value="pixx">

<param name="quitmessage" value="'
$userchatquitmsg '">

<param name="asl" value="true">

<param name="useinfo" value="true">

<param name="style:bitmapsmileys" value="true">

<param name="style:smiley1" value=":) img/sourire.gif">

<param name="style:smiley2" value=":-) img/sourire.gif">

<param name="style:smiley3" value=":-D img/content.gif">

<param name="style:smiley4" value=":d img/content.gif">

<param name="style:smiley5" value=":-O img/OH-2.gif">

<param name="style:smiley6" value=":o img/OH-1.gif">

<param name="style:smiley7" value=":-P img/langue.gif">

<param name="style:smiley8" value=":p img/langue.gif">

<param name="style:smiley9" value=";-) img/clin-oeuil.gif">

<param name="style:smiley10" value=";) img/clin-oeuil.gif">

<param name="style:smiley11" value=":-( img/triste.gif">

<param name="style:smiley12" value=":( img/triste.gif">

<param name="style:smiley13" value=":-| img/OH-3.gif">

<param name="style:smiley14" value=":| img/OH-3.gif">

<param name="style:smiley16" value=":$ img/rouge.gif">

<param name="style:smiley17" value=":-$ img/rouge.gif">

<param name="style:smiley18" value="(H) img/cool.gif">

<param name="style:smiley19" value="(h) img/cool.gif">

<param name="style:smiley20" value=":-@ img/enerve1.gif">

<param name="style:smiley21" value=":@ img/enerve2.gif">

<param name="style:smiley22" value=":-S img/roll-eyes.gif">

<param name="style:smiley23" value=":s img/roll-eyes.gif">

<param name="style:backgroundimage" value="false">

<param name="style:sourcefontrule1" value="all all Serif 12">

<param name="style:floatingasl" value="true">

<param name="pixx:timestamp" value="true">

<param name="pixx:highlight" value="true">

<param name="pixx:highlightnick" value="true">

<param name="pixx:nickfield" value="true">

<param name="pixx:styleselector" value="true">

<param name="pixx:setfontonstyle" value="true">
</applet>

</center>

<br></br>

'
;

}

?>


Thanks, in advance, for any help.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 01, 2007, 08:10:43 PM
you shouldnt need a password, at least i havent found the need for it.  I have fixed the code up so you dont have the alternate nick name set to the same as ur display nick.  But then again i do run my own server and can change things as a i wish. 

I dont knwo if this awnswered anything or i'm just rambeling but i have come to know how to work this chat.template.php quite well if you have any other questions
Title: Re: Complete PJIRC Integration
Post by: TrueSatan on March 01, 2007, 10:06:14 PM
 I host with Dreamhost and after all my attempts to get your mod to work I've come to the conclusion that it is something on their hosting that won't let it connect...blocked I suspect.

It's a shame as I liked your product and would have wished to use it.

Thanks for your advice and for your work in producing the mod...sadly I seem to be unable to make use of them.
Title: Re: Complete PJIRC Integration
Post by: lbuisson on March 02, 2007, 06:04:19 AM
What is the rule to install pjirc? because on my 1.1.2 smf it don't want to run.

I don't use default theme but personnalized.

Thanks in advance
Title: Re: Complete PJIRC Integration
Post by: 3guk on March 04, 2007, 12:49:24 PM
Quote from: TrueSatan on March 01, 2007, 06:09:02 AM
I've got it installed on 1.1.2 with no real problems...I had to do a manual install simply because other mods had already altered the files concerned not because of a problem in the package...other users who report installation problems have almost certainly had the files this package alters already altered by other packages.

I set up everything on the IRC server via a standalone IRC client but am struggling to make the chat.template.php edits needed to get it to work...I'm an experienced computer user (if you'd call 30 years of fiddling about with them experienced) and not bad at working on code but this is the first time I've used IRC...it just never appealed to me. Any help would be appreciated.

I left asterisked out my password. The script says adminIDnumber...I entered my user name so I'm wondering if that is right...my IRC username is different from my forum username...is this a problem?

<?php

function template_main()
{
global 
$context$scripturl$boardurl ;

//Define All The Variables

//Text To Display If No Guests Allowed Is On
$guesttext '<a href="'$boardurl '/index.php?action=register ">Register Today</a></br> Chat is not enabled for guests.';

//Would you like to allow or disallow guests ?

// 1 = On Guests Please 
// 0 = No Guests
$userchatguest "1";

// If We Are Allowing Guests What Do We Call Them ? ???= Random String Of 3 Numbers
$userchatguestname "Cafe42_Guest???";

//If That Name Is Already Taken We Need To Give Them A New Name
$userchatguestalternate "Cafe42_Guest????";

//Guest Full Name
$userchatguestfullname "Cafe42 Site Guest";

// Suffix To Append To The End Of Each Name To Prevent Duplicates
$userchatsuffix "Cafe42";

//Alternate Name If Username Is In Use ??? = Random String Of 3 Numbers
$userchatalternate "Cafe42???";

//Users Full Name To Display
$userchatfullname "Cafe42 User";

//Irc Server To Connect To
$userchatserver "irc.serenity-irc.net";

//Irc Channel To Connect To
$userchatchannel "Cafe42";

// Auto Ident One User , Usually Admin
// 1 = On Ident Admin
// 0 = Off Dont Ident Admin
$userchatident "1";

//User Id To Auto Ident On
$userchatidentid "TrueSatan";

//If Auto Admin Ident Is On Then This Is The Pass To Ident With
$userchatidentpw "******";

//Quit Message For Users Leaving Chat
$userchatquitmsg "Obviously Cafe42 chat isnt exciting enough :-P";


//Scripty Stuff Below Here, You Shouldnt Need To Change
$userchatname $context['user']['name'];

//Make sure the names are IRCable

$userchatname str_replace(" ","_",$context['user']['name']);
$userchatname str_replace(".","_",$userchatname);
$initialchar substr($userchatname,0,1);
if ( (
$initialchar >= "0")  &&  ($initialchar <= "9") ) {
   
$userchatname "_" $userchatname ;
   }

echo
' <br></br> ';

if  (
$userchatguest == ('0') AND $context['user']['is_guest'])
echo
'<div align="center">'$guesttext .'</div>';

else

echo 
'
<center> 
<applet codebase="'
$boardurl'/pjirc" code=IRCApplet.class archive="irc.jar,pixx.jar" width=640 height=400> 
<param codebase="'
$boardurl'/pjirc" name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">';

if  (
$userchatguest == ('1') AND $context['user']['is_guest'])
echo
'
<param name="nick" value="'
$userchatguestname '_'$userchatsuffix '">
<param name="alternatenick" value="'
$userchatguestalternate '">
<param name="fullname" value="'
$userchatguestfullname '">';
else

echo
'
<param name="nick" value="'
$userchatname '_'$userchatsuffix '">
<param name="alternatenick" value="'
$userchatalternate '">
<param name="fullname" value="'
$userchatfullname '">';

//Connect To IRC Server
echo '<param name="host" value="'$userchatserver '">';


//Auto Identify Admin
if  ($userchatident == ('1') AND $context['user']['id'] == ($userchatidentid))

echo 

        <param name="command1" value="/msg nickserv identify '
$userchatidentpw '">
        <param name="command2" value="/join #'
$userchatchannel '"> ';
else

//Not an Admin Eh ?
echo'
         <param name="command1" value="/join #'
$userchatchannel '"> ';


//Define as GUI

echo'
<param name="gui" value="pixx">

<param name="quitmessage" value="'
$userchatquitmsg '">

<param name="asl" value="true">

<param name="useinfo" value="true">

<param name="style:bitmapsmileys" value="true">

<param name="style:smiley1" value=":) img/sourire.gif">

<param name="style:smiley2" value=":-) img/sourire.gif">

<param name="style:smiley3" value=":-D img/content.gif">

<param name="style:smiley4" value=":d img/content.gif">

<param name="style:smiley5" value=":-O img/OH-2.gif">

<param name="style:smiley6" value=":o img/OH-1.gif">

<param name="style:smiley7" value=":-P img/langue.gif">

<param name="style:smiley8" value=":p img/langue.gif">

<param name="style:smiley9" value=";-) img/clin-oeuil.gif">

<param name="style:smiley10" value=";) img/clin-oeuil.gif">

<param name="style:smiley11" value=":-( img/triste.gif">

<param name="style:smiley12" value=":( img/triste.gif">

<param name="style:smiley13" value=":-| img/OH-3.gif">

<param name="style:smiley14" value=":| img/OH-3.gif">

<param name="style:smiley16" value=":$ img/rouge.gif">

<param name="style:smiley17" value=":-$ img/rouge.gif">

<param name="style:smiley18" value="(H) img/cool.gif">

<param name="style:smiley19" value="(h) img/cool.gif">

<param name="style:smiley20" value=":-@ img/enerve1.gif">

<param name="style:smiley21" value=":@ img/enerve2.gif">

<param name="style:smiley22" value=":-S img/roll-eyes.gif">

<param name="style:smiley23" value=":s img/roll-eyes.gif">

<param name="style:backgroundimage" value="false">

<param name="style:sourcefontrule1" value="all all Serif 12">

<param name="style:floatingasl" value="true">

<param name="pixx:timestamp" value="true">

<param name="pixx:highlight" value="true">

<param name="pixx:highlightnick" value="true">

<param name="pixx:nickfield" value="true">

<param name="pixx:styleselector" value="true">

<param name="pixx:setfontonstyle" value="true">
</applet>

</center>

<br></br>

'
;

}

?>


Thanks, in advance, for any help.

You need to type in your admin ID number and not the username. It should work perfectly then !!  
Title: Re: Complete PJIRC Integration
Post by: TrueSatan on March 04, 2007, 02:27:42 PM
 Thanks for your help...I'll give it another try.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 05, 2007, 04:16:38 PM
Quote from: lbuisson on March 02, 2007, 06:04:19 AM
What is the rule to install pjirc? because on my 1.1.2 smf it don't want to run.

I don't use default theme but personnalized.

Thanks in advance
oky doky here go:

just before the login and logout button

if you are not sure where to add this search for the line "// If the user is a guest, show [login] button."  and paste the followin before that line

// The [3guk] Button
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=chat">Chat</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


the find a line like this "array('gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))"
and edit it "array('chat','gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))"

make sure you put in that 'chat' and add the neccessary puctuation.


This is all from firestarter i just changed the code to work with 1.1.2 :)

I might have misunderstood your question if so post back here
Title: Re: Complete PJIRC Integration
Post by: neskiairti on March 10, 2007, 09:04:13 AM
this mod really doesnt offer the things i need.. i would be better off running it outside the forum i think.. untill it has been updated with a control panel and all that.. as well as the ability to choose and configure EVERY option pjirc has, through 3guk's code.. instead of needing to hack everything in..
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 10, 2007, 12:16:39 PM
its all about personnal preference i guess
Title: Re: Complete PJIRC Integration
Post by: AllMassive on March 16, 2007, 08:45:18 AM
This Plugin is nice and simple.
Good Work !
Title: Re: Complete PJIRC Integration
Post by: hugocz on March 18, 2007, 12:40:59 PM
Im geting the  Error in Package Installation too as other users

   Execute Modification     ./Themes/default/index.template.php     Test failed

Ah it is modified already i think, i use SMF 1.1.2 + TP 0.9.7.1

So how can i install it please ?
Title: Re: Complete PJIRC Integration
Post by: smartboyathome on March 18, 2007, 04:33:08 PM
I am getting that same error, only I use TP 0.9.8.3.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 18, 2007, 07:37:24 PM
read my msg up top: http://www.simplemachines.org/community/index.php?topic=49444.msg992040#msg992040 it tells you where to do manuel installs thats all,  
Title: Re: Complete PJIRC Integration
Post by: hugocz on March 18, 2007, 08:11:11 PM
Quote from: robotman321 on March 18, 2007, 07:37:24 PM
read my msg up top: http://www.simplemachines.org/community/index.php?topic=49444.msg992040#msg992040 it tells you where to do manuel installs thats all, 

What do you mean? you just show how to add button? i don't need a button i mean how do you install the package manually if it says test failed on instllation
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 18, 2007, 08:50:44 PM
it will say test failed for index.template.php, still install but add this code in the section where you would find the profile that look like this.
// The [3guk] Button
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=chat">Chat</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


I'll post a better in-depth with the surrounding code on my forums. THis ^^^ is near the bottom it isnt too hard to miss.
Title: Re: Complete PJIRC Integration
Post by: hugocz on March 18, 2007, 11:00:21 PM
Ah i see, i just installed it even without warning and index.php?action=chat works, that's what i wanted, only the pjirc dir was empty i manually copy'd the files there, also still can't release it to public, don't know why but it says java applet failed in firefox, in ie it works ok.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 19, 2007, 03:47:37 PM
to release to public go to your default theme --> edit your Chat.template.php --> look for: //Would you like to allow or disallow guests ?

// 1 = On Guests Please
// 0 = No Guests
$userchatguest = "1";
Make sure it is set to "1" for guests :)

that should do it for ya.
Title: Re: Complete PJIRC Integration
Post by: hugocz on March 21, 2007, 03:00:39 PM
I got that as 1, i mean i can't enable the addon cause it works only in IE and not in firefox, and most peeps use firefox :O
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 21, 2007, 06:11:22 PM
oi hm..
Title: Re: Complete PJIRC Integration
Post by: carlatf on March 30, 2007, 08:48:12 PM
Hi,
I can't locate the admin section anywhere.
I just installed in 1.1.2 and I had to edit manually index.template.php.
The chat works but with the default values.
I can't find anywhere ""array('gallery','search', 'admin', 'calendar', 'profile" probably because I'm using a 1.1rc2 template :)

Best regards,
Carla
Title: Re: Complete PJIRC Integration
Post by: robotman321 on March 31, 2007, 12:37:54 PM
there is no admin section yet, that is part of his to-do list for now you have to go to the default theme ---> chat.template.php and edit it manually.  If you need any help editing that i can give you a few pointers
Title: Re: Complete PJIRC Integration
Post by: rwmisner on April 16, 2007, 04:34:24 PM
Hi i installed this mod manually to work with 1.1.2 can someone tell me in the chat.template.php file where i can take out the underscore after the users name when they join. ex when someone is in the channel the name shows "nick_".
Title: Re: Complete PJIRC Integration
Post by: robotman321 on April 17, 2007, 07:53:28 PM
i believe it is here: i changed mine so i dont know exactly where it is that it goes to.


<param name="nick" value="'. $userchatname . '">


i dont know for sure but look for a ". _ . " sequence and that will give you your answer
Title: Re: Complete PJIRC Integration
Post by: sox on April 19, 2007, 04:58:10 AM
Quote from: rwmisner on April 16, 2007, 04:34:24 PM
Hi i installed this mod manually to work with 1.1.2 can someone tell me in the chat.template.php file where i can take out the underscore after the users name when they join. ex when someone is in the channel the name shows "nick_".

To complete robotman321 answer, here is the code you have to change :

line 83 and line 89

<param name="nick" value="'. $userchatname . '_'. $userchatsuffix . '">


into

<param name="nick" value="'. $userchatname . '">
Title: Re: Complete PJIRC Integration
Post by: triplem on April 19, 2007, 08:51:44 AM
hi there,

i wanna say i installed this mod in my forum and all are working great, im looking forward to the upgrade version with the admin control, its a bit hard to change the settings in the chat template.

also will users be registered in the chat irc server? when they are logged in at the forum and then selecting the chat button or will they be known as guest?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on April 19, 2007, 03:45:43 PM
no when they are logged in it will "trip" the Username $context and will use that person's username as the login/screen name. :)

to test it out my forums and the mod are at: http://forums.discosbazaar.com if you want to take a gander
Title: Re: Complete PJIRC Integration
Post by: TruthElixirX on April 30, 2007, 11:29:20 PM
Whenever I try to connect I get this:

Unable to connect : java.security.AccessControlException : access denied (java.net.SocketPermission irc.esper.net resolve)

Not sure what this means or what to do.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on May 01, 2007, 03:50:59 PM
that is somthing that has to do with your computer it has nothing to do with the pjirc. it means it cannot find your server
Title: Re: Complete PJIRC Integration
Post by: TruthElixirX on May 01, 2007, 03:58:23 PM
Quote from: robotman321 on May 01, 2007, 03:50:59 PM
that is somthing that has to do with your computer it has nothing to do with the pjirc. it means it cannot find your server

My PC, or the server the site is hosted on?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on May 01, 2007, 11:19:15 PM
the server of the irc that you are trying to locate is unable to get the ip.  the "irc.esper.net" isnt allowing you to connect to it, what i suggest is finding the ip of the server through which the re-direct occours.  Find the ip of that server and use it in its place, it should work then.
Title: Re: Complete PJIRC Integration
Post by: Lady_Of_Chaos on May 11, 2007, 10:09:04 PM
sorry for this , but I just installed on a 1.1.2 forum , install went fine , chat works , I edited the chat.template.php , placed the server i wished to connect to and the room , reuploaded the edited file , but it still goesto serenity something or other . Am I allowed to connect to different server (godzilla.cyanide-x.net) is the one i wish to connect to .
Title: Re: Complete PJIRC Integration
Post by: aglioeolio on May 12, 2007, 08:36:51 AM
Joinning 2 or More channels at startup

I Use this Mod and is really awesome, thanks for sharing it...


If someone is interested, I read some pages in PJIRC Help files Here (http://www.pjirc.com/help.php?p=0&faq_id=13) and found a way to get starting in more than 1 channel...

In your_forum_folder\Themes\default\Chat.template.php about line 107:

//Not an Admin Eh ?
echo'
         <param name="command1" value="/join #'. $userchatchannel . '">';


Replace these lines with:

//Not an Admin Eh ?
// Start of Modified version with extra channels
echo'
         <param name="command1" value="/join #'. $userchatchannel . '">
         <param name="command2" value="/join #mychannel2">
         <param name="command3" value="/join #mychannel3">   ';

// End of modified version


mychannel2, mychannel3, etc are the names of your custom channels





Hope it helps someone ;D

Title: Re: Complete PJIRC Integration
Post by: robotman321 on May 12, 2007, 12:45:02 PM
yeah thats what i did on mine lol, chaos you should be able to change the chat.template.php just fine:
//Irc Server To Connect To
$userchatserver = "208.98.33.134";

thats my server but all it does is goes in the "" and you should be fine.

post if you have a problem or attacha copy of your chat.template.
Title: Re: Complete PJIRC Integration
Post by: Lady_Of_Chaos on May 12, 2007, 03:37:57 PM
I did change it in chat.template.php , to this :

//Irc Server To Connect To
$userchatserver = "godzilla.cyanide-x.net";

//Irc Channel To Connect To
$userchatchannel = "#dominion";


But it still goes to serenity
Title: Re: Complete PJIRC Integration
Post by: Lady_Of_Chaos on May 12, 2007, 03:45:57 PM
k , nm , there is 2 chat templates , sry i edited the one in the main folder not in themes , its working now . all i have to do is read again and find how to add it to different skin
Title: Re: Complete PJIRC Integration
Post by: Lady_Of_Chaos on May 13, 2007, 01:11:10 AM
Quote from: d3v on January 01, 2006, 09:28:40 PM
QuoteHow can I edit the chat.template.php so that it doesn't put a suffix at the end of each username? If I remove the $userchatsuffix = "mysite"; line completely, I still end up with an underscore _ after each nickname. Is there a way around this?

Quote from: 3guk on December 28, 2005, 04:09:24 PM
Replace line 83 with
<param name="nick" value="'. $userchatguestname . '">

That didn't do the trick..is there anything else?


K i tried that as well and it isnt working, this is annoying , I have tried all the code i know for such (i admit it isnt much) , anyone know how to get it to use JUST the forum name ?


*~* nm I got it , thx to some friends , you have to edit 2 lines of code , not just one :

Code:

change line 83 to -
<param name="nick" value="'. $userchatguestname . '">

change line 89 to -
<param name="nick" value="'. $userchatname . '">
Title: Re: Complete PJIRC Integration
Post by: robotman321 on May 13, 2007, 10:50:11 AM
yeah thats another thing i changed, good to know you got it working.
Title: Re: Complete PJIRC Integration
Post by: macuser9214 on June 04, 2007, 02:37:34 PM
I get Unable to load the 'main' template., when using a custom theme.....

index.template.php file is as follows:

Quote<?php
// Version: 1.1; index

/*   This template is, perhaps, the most important template in the theme. It
   contains the main template layer that displays the header and footer of
   the forum, namely with main_above and main_below. It also contains the
   menu sub template, which appropriately displays the menu; the init sub
   template, which is there to set the theme up; (init can be missing.) and
   the linktree sub template, which sorts out the link tree.

   The init sub template should load any data and set any hardcoded options.

   The main_above sub template is what is shown above the main content, and
   should contain anything that should be shown up there.

   The main_below sub template, conversely, is shown after the main content.
   It should probably contain the copyright statement and some other things.

   The linktree sub template should display the link tree, using the data
   in the $context['linktree'] variable.

   The menu sub template should display all the relevant buttons the user
   wants and or needs.

   For more information on the templating system, please see the site at:
   http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
   global $context, $settings, $options, $txt;

   /* Use images from default theme when using templates from the default theme?
      if this is 'always', images from the default theme will be used.
      if this is 'defaults', images from the default theme will only be used with default templates.
      if this is 'never' or isn't set at all, images from the default theme will not be used. */
   $settings['use_default_images'] = 'never';

   /* What document type definition is being used? (for font size and other issues.)
      'xhtml' for an XHTML 1.0 document type definition.
      'html' for an HTML 4.01 document type definition. */
   $settings['doctype'] = 'xhtml';

   /* The version this template/theme is for.
      This should probably be the version of SMF it was created for. */
   $settings['theme_version'] = '1.1';

   /* Set a setting that tells the theme that it can render the tabs. */
   $settings['use_tabs'] = true;

   /* Use plain buttons - as oppossed to text buttons? */
   $settings['use_buttons'] = true;

   /* Show sticky and lock status seperate from topic icons? Leave true, icons don't exist for false.*/
   $settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   // Show right to left and the character set for ease of translating.
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
   <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";
   // ]]></script>
   <title>', $context['page_title'], '</title>';

   // The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
   echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';

   /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   if ($context['browser']['needs_size_fix'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

   // Show all the relative links, such as help, search, contents, and the like.
   echo '
   <link rel="help" href="', $scripturl, '?action=help" target="_blank" />
   <link rel="search" href="' . $scripturl . '?action=search" />
   <link rel="contents" href="', $scripturl, '" />';

   // If RSS feeds are enabled, advertise the presence of one.
   if (!empty($modSettings['xmlnews_enable']))
      echo '
   <link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';

   // If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

   // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';

   // We'll have to use the cookie to remember the header...
   if ($context['user']['is_guest'])
      $options['collapse_header'] = !empty($_COOKIE['upshrink']);

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'], '

   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

      function shrinkHeader(mode)
      {';

   // Guests don't have theme options!!
   if ($context['user']['is_guest'])
      echo '
         document.cookie = "upshrink=" + (mode ? 1 : 0);';
   else
      echo '
         smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

   echo '
         document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

         document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
         document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

         current_header = mode;
      }
   // ]]></script>';

   // the routine for the info center upshrink
   echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';

         function shrinkHeaderIC(mode)
         {';

   if ($context['user']['is_guest'])
      echo '
            document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
   else
      echo '
            smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

   echo '
            document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

            document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

            current_header_ic = mode;
         }
      // ]]></script>';
      
      //This is for the pop menus
   echo '
      <script type="text/javascript">

/***********************************************
* Drop Down/ Overlapping Content- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0)
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}

</script>';

   echo '
</head>
<body>';
   //Change width to 100% if you want it fluid.
   echo '
   <div align="center">
   <table id="widthControl" border="0" cellpadding="0" cellspacing="0">
      <tr>
         <td width="28" height="28"><img src="', $settings['images_url'], '/bc_topLeft.gif" width="28" height="28" alt="" /></td>
         <td width="100%" height="28" background="', $settings['images_url'], '/bc_topBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="1" height="28" alt="" /></td>
         <td width="29" height="28"><img src="', $settings['images_url'], '/bc_topRight.gif" width="29" height="28" alt="" /></td>
      </tr>
      <tr>
         <td width="28" background="', $settings['images_url'], '/bc_leftBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="28" height="1" alt="" /></td>
         <td width="100%" valign="top" style="background-color:#F6F6F6;">
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
      <td width="100%" height="67" align="left" valign="top" style="padding:0;">
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
               <td align="left" valign="top" height="67" width="527"><img src="', $settings['images_url'], '/logo.jpg" width="500" height="70" alt="vB Green" title="vB Green" /></td>    
                        </tr>
         </table>            </td>   <td align="right" valign="top"<a href="http://macuser9214.com/smf/index.php?action=chat"><font color="red" face="arial" size="6">***NEW*** CHAT</font></a></td>
      </tr>
      
      <tr>
      <td colspan="2" width="100%" align="left" valign="top" style="padding:0;">';

   echo '
   <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';


   // display user name
   echo '
      <table width="100%" cellspacing="1" cellpadding="5" class="bordercolor" border="0" >
         <tr>';
         
   echo '
                     <td class="windowbg2" width="100%" valign="middle" align="left">
                     ', theme_linktree3(), '
                     </td>';

   echo '
                     <td width="250" valign="top" class="windowbg"><span class="middletext" style="display:block;width:250px;">';
                     
   if($context['user']['is_logged'])
   {
      echo '
            <strong>Welcome, ', $context['user']['name'] , '.</strong><br />';
   }
            
   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
   {
      echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
               <a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.<br />';
   }
            
   // Now, onto our second set of info, are they logged in again?
   if ($context['user']['is_logged'])
   {
      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
                        <b>', $txt[616], '</b><br />';

      // Are there any members waiting for approval?
      if (!empty($context['unapproved_members']))
         echo '
                        ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

      // Show the total time logged in?
      if (!empty($context['user']['total_time_logged_in']))
      {
         echo '
                        ', $txt['totalTimeLogged1'], '<br />';

         // If days is just zero, don't bother to show it.
         if ($context['user']['total_time_logged_in']['days'] > 0)
            echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

         // Same with hours - only show it if it's above zero.
         if ($context['user']['total_time_logged_in']['hours'] > 0)
            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

         // But, let's always show minutes - Time wasted here: 0 minutes ;).
         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
      }
   }
      // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   else
   {
      echo '
                         <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form name="loginform" id="loginform" action="http://macuser9214.com/blog/wp-login1.php" method="post">

<br /><label>Username: <input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label>

<label>Password:  <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label>

<label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label>

<input type="submit" name="submit" id="login" value="Login &raquo;" tabindex="4" />

</form>';
   }

   echo '
               </span>
            </td>
         </tr>
      </table>';

   echo '
      <table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
         <tr>';


   echo '
            <td width="90%" class="column-title">
               ', template_menu(), '
            </td>';

   echo '
         </tr>
      </table>
   </div>';


   // The main content should go here.
   echo '
   <div id="bodyarea">';
   
   // If you want to put some ads or something on your pages, add them in this.
   echo '
   <div id="blank-box"></div>';
}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
   </div>';

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '

   <div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
         }
      // ]]></script>
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
         <tr>
            <td width="28%" valign="middle" align="left">
Theme by <a href="http://www.soulgamerz.net/" target="_blank" style="font-size:12px;">SoulGamerz</a>
            </td>
            <td valign="middle" align="center" style="white-space: nowrap;" class="copyright-links">
               ', theme_copyright(), '
            </td>
            <td width="28%" valign="middle" align="right" class="copyright-links">
               <a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a>&nbsp;|&nbsp;<a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a>&nbsp;|&nbsp;<a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>&nbsp;|&nbsp;<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" style="font-size:10px;">CSS</a>
            </td>
         </tr>
      </table>';

      // Show the load time?
   if ($context['show_load_time'])
      echo '
      <span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

   // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
   if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
   {
      // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
      echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';

      // Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
      if ($context['browser']['is_safari'])
         echo '
         window.addEventListener("load", smf_codeFix, false);

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if ((codeFix.className == "code" || codeFix.className == "post" || codeFix.className == "signature") && codeFix.offsetHeight < 20)
                  codeFix.style.height = (codeFix.offsetHeight + 20) + "px";
            }
         }';
      elseif ($context['browser']['is_firefox'])
         echo '
         window.addEventListener("load", smf_codeFix, false);
         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if (codeFix.className == "code" && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0))
                  codeFix.style.overflow = "scroll";
            }
         }';
      else
         echo '
         var window_oldOnload = window.onload;
         window.onload = smf_codeFix;

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = codeFix.length - 1; i > 0; i--)
            {
               if (codeFix.currentStyle.overflow == "auto" && (codeFix.currentStyle.height == "" || codeFix.currentStyle.height == "auto") && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0) && (codeFix.offsetHeight != 0 || codeFix.className == "code"))
                  codeFix.style.height = (codeFix.offsetHeight + 36) + "px";
            }

            if (window_oldOnload)
            {
               window_oldOnload();
               window_oldOnload = null;
            }
         }';

      echo '
      // ]]></script>';
   }

   echo '
   </div></td></tr></table>
   </td>
   <td width="29" background="', $settings['images_url'], '/bc_rightBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="29" height="1" alt="" /></td>
   </tr>
   <tr>
      <td width="28" height="29"><img src="', $settings['images_url'], '/bc_bottomLeft.gif" width="28" height="29" alt="" /></td>
      <td width="100%" height="29" background="', $settings['images_url'], '/bc_bottomBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="1" height="29" alt="" /></td>
      <td width="29" height="29"><img src="', $settings['images_url'], '/bc_bottomRight.gif" width="29" height="29" alt="" /></td>
   </tr>
   </table>';

   // The following will be used to let the user know that some AJAX process is running
   echo '
   <div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</div>
</body></html>';
}

// If the user is logged in, display stuff like their  new messages, etc...
function theme_newestlink()
{
   global $context, $settings, $options, $scripturl, $txt;
   
   if ($context['user']['is_logged'])
   {
      echo '
                        <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a>&nbsp;|&nbsp;<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>';

   }
   // Otherwise they're a guest - send them a lovely greating...
   else
      echo $txt['welcome_guest'];
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
   global $context, $settings, $options;

   echo '<div class="nav-tree" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;text-align:center;">';

   // Each tree item has a URL and name. Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      // Show something before the link?
      if (isset($tree['extra_before']))
         echo $tree['extra_before'];

      // Show the link, including a URL if it should have one.
      echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav-tree">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

      // Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];

      // Don't show a separator for the last one.
      if ($link_num != count($context['linktree']) - 1)
         echo '&nbsp;&raquo;&nbsp;';
   }

   echo '</div>';
}

//Show a linktree (this one is a vB look alike, vB clone is below).
function theme_linktree2()
{
   global $context, $settings, $options;

   // Folder style or inline?  Inline has a smaller font.
   echo '<span class="nav-tree" style="font-size: smaller;">';

   // Each tree item has a URL and name.  Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      // Show pretty folder
      if ($link_num == 0)
      {
         echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
      }
      else if ($link_num == 1)
      {
         echo '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" /><img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
      }
      else
      {
         echo '&raquo; ';
      }

      // Show the link, including a URL if it should have one.
      echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav-tree">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

      if ($link_num == 0)
      {
         echo '<br />';
      }
   }

   echo '</span>';
}

// Show a linktree (vB Clone).  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree3()
{
        global $context, $settings, $options;

        // Folder style or inline?  Inline has a smaller font.
        echo '<span class="nav-tree">';
      
      echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp;';

        // Each tree item has a URL and name.  Some may have extra_before and extra_after.
        foreach ($context['linktree'] as $link_num => $tree)
        {
                // Show something before the link?
                if (isset($tree['extra_before']))
                        echo $tree['extra_before'];

                if (($link_num == count($context['linktree']) - 1) && count($context['linktree'])>1)
                        echo '<br />
                  <img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" /><img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp;';

                // Show the link, including a URL if it should have one.
                echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav-tree">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

                // Show something after the link...?
                if (isset($tree['extra_after']))
                        echo $tree['extra_after'];

                // Don't show a separator for the last one.
                if ($link_num < count($context['linktree']) - 2)
                        echo '&nbsp;&raquo;&nbsp;';

        }

        echo '</span>';
}

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

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
   echo '
         <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>';

   // Show the [home] button.
   echo '
         <td class="mainNav"><a href="', $scripturl, '">' , $txt[103] , '</a></td>';

   // Show the [help] button.
   echo '
         <td class="mainNav"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></td>';



   // How about the [search] button?
   if ($context['allow_search'])
      echo '
            <td class="mainNav"><a href="', $scripturl, '?action=search" onClick="return overlay(this, \'subcontent\',\'bottom\')">' , $txt[182] , '<img src="', $settings['images_url'], '/search_down.gif" width="11" height="7" /></a>
            <!--Do not remove outer most DIV tag with id="subcontent"-->
<DIV id="subcontent" style="position:absolute; border: 2px solid #3d3d3d; background-color: #F6F6F6; width: 210px; padding: 2px; display:none">
   <table width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr>
         <td class="catbg" height="20" align="left" valign="middle" style="color:#F6F6F6;">Quick Search</td>
      </tr>
      <tr>
         <td height="26" align="left" valign="middle" class="windowbg">
               <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                  <input type="text" name="search" value="" style="width: 150px;" />&nbsp;
                  <input type="submit" name="submit" value="Go" />
                  <input type="hidden" name="advanced" value="0" />';

   // Search within current topic?
   if (!empty($context['current_topic']))
      echo '
                  <input type="hidden" name="topic" value="', $context['current_topic'], '" />';

      // If we're on a certain board, limit it to this board ;).
   elseif (!empty($context['current_board']))
      echo '
                  <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

   echo '
               </form></td>
      </tr>
      <tr>
         <td height="20" align="center" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=search;advanced">Advanced Search</a></td>
      </tr>
   </table>
<div align="right" style="font-size:10px;"><a style="color:#000000;" href="#" onClick="overlayclose(\'subcontent\'); return false">[Close]</a></div>

</DIV>
            </td>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
            <td class="mainNav"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></td>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
            <td class="mainNav"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></td>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
            <td class="mainNav"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></td>';


   // If the user is a guest, also show [register] button.
   if ($context['user']['is_guest'])
      echo '
            <td class="mainNav"><a href="http://macuser9214.com/blog/wp-login.php?action=register">' , $txt[97] , '</a></td>';


   // Otherwise, they might want to [logout]...
   if ($context['user']['is_logged'])
      echo '
            <td class="mainNav"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></td>';
            
   // How about the [quick links] button?
   if ($context['user']['is_logged'])
      echo '
            <td class="mainNav"><a href="', $scripturl, '#quicklinks" onClick="return overlay(this, \'quicklinks\',\'bottomright\')">Quick Links<img src="', $settings['images_url'], '/search_down.gif" width="11" height="7" /></a>
            <!--Do not remove outer most DIV tag with id="quicklinks"-->
<DIV id="quicklinks" style="position:absolute; border: 2px solid #3d3d3d; background-color: white; width: 150px; padding: 2px; display:none">
   <table width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr>
         <td class="catbg" height="20" align="left" valign="middle" style="color:#F6F6F6;">Quick Links</td>
      </tr>
      <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=unread">New Posts</a></td>
      </tr>
      <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=unreadreplies">New Replies</a></td>
      </tr>
      <tr>
         <td class="catbg" height="20" align="left" valign="middle" style="color:#F6F6F6;">User Settings</td>
      </tr>
      <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=profile">My Profile</a></td>
      </tr>
      <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=profile;u=', $context['user']['id'], ';sa=account">Account Settings</a></td>
      </tr>
      <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=profile;u=', $context['user']['id'], ';sa=forumProfile">Edit Profile</a></td>
      </tr>
            <tr>
         <td class="catbg" height="20" align="left" valign="middle" style="color:#F6F6F6;">Miscellaneous</td>
      </tr>
            <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=stats">Forum Stats</a></td>
      </tr>
            <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=pm">Private Messages</a></td>
      </tr>
            <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="', $scripturl, '?action=who">Whos Online</a></td>
      </tr>
            <tr>
         <td height="20" align="left" valign="middle" class="windowbg"><a class="subNav-link" href="http://www.imageshack.us">Image Hosting</a></td>
      </tr>
   </table>
<div align="right" class="windowbg" style="font-size:10px;"><a style="color:#000000;" href="#" onClick="overlayclose(\'quicklinks\'); return false">[Close]</a></div>

</DIV>
            </td>';

   // The end of tab section.
   echo '
         </tr>
      </table>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
   global $settings, $buttons, $context, $txt, $scripturl;

   // Create the buttons...
   foreach ($button_strip as $key => $value)
   {
      if (isset($value['test']) && empty($context[$value['test']]))
      {
         unset($button_strip[$key]);
         continue;
      }
      elseif (!isset($buttons[$key]) || $force_reset)
         $buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

      $button_strip[$key] = $buttons[$key];
   }

   if (empty($button_strip))
      return '<td>&nbsp;</td>';

   echo '
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
      <td height="40" valign="middle" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;&nbsp; ', $button_strip) , '</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>

Any help?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on June 04, 2007, 11:24:51 PM
may i ask what theme this is for so i can download and test my ideas through the main theme.
Title: Re: Complete PJIRC Integration
Post by: Jalkson on June 25, 2007, 01:06:33 AM
How do I manually uninstall this mod? 

I'm using SMF 1.1.2, and I haven't been able to get anything to work.

Basically, since I installed this package, I can't download/install any other mods, because I get the following.


An Error Has Occured!

You cannot download or install new packages because the Packages directory or one of the files in it are not writable!


I was going to upgrade to 1.1.3, but I have no idea what I'm supposed to do to fix this.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on June 25, 2007, 01:45:55 AM
goto your package manager ---> then to the options tab ---> then on the bottom there should be the following:
Quote
Cleanup Permissions
This interface allows you to reset the permissions for files throughout your installation, so as to increase security or solve any permission problems you may encounter while installing packages.
Change all file permissions throughout the forum such that:

Only the standard files are writable.
All files are writable.
The minimum files are writable.
click the "all files writable" and then click change file permissions

that should work, then let me know if that worked.
Title: Re: Complete PJIRC Integration
Post by: Jalkson on June 25, 2007, 02:01:26 AM
When I click the "change file permissions" button, it changes it back to "Only the standard files are writable".

I would love to have this mod working, as long as I can still download/install/uninstall others. :o

When I had the mod installed, I put the button on my theme, and it would do nothing when I clicked it.  I'm sure I was just missing something, or forgot to do something.  For the life of me I couldn't figure out what though.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on June 25, 2007, 02:46:47 PM
ok the change back is a SMF glitch that goes back but still makes all the files 777 's you should be able to unistall the mod now.
Title: Re: Complete PJIRC Integration
Post by: Jalkson on June 25, 2007, 07:51:56 PM
It changes it back, and I still receive the same error as before.  I've tried it a few times, and have come up with the same results.


Edit:  Nevermind, I got it working now.  Thanks for your help.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on June 26, 2007, 03:08:58 AM
no problem enjoy the mod :P
Title: Re: Complete PJIRC Integration
Post by: Cairna on July 04, 2007, 07:28:57 PM
Hey- I tried this, but my problem is that I cannot find


Find:


</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';



Add after:


// The [3guk] Button
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=chat">Chat</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';             





Find:


if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];




Replace with:


if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'chat')))
$current_action = $context['current_action'];



After a bit of fiddling... I got in working, but in a.. decidedly uncomfortable place. Any solution?

Top left of my forum. ( fewleftstanding.org/forum
Title: Re: Complete PJIRC Integration
Post by: robotman321 on July 05, 2007, 12:59:45 PM
um, yeah thats the wrong spot lol, um send me the details on your theme with the index.template.php attached and i will edit and comment it to you.
Title: Re: Complete PJIRC Integration
Post by: Cairna on July 05, 2007, 01:53:36 PM
Here:

Problem is, I have this problem for every mod I'm trying to install...

Gallery,
SMF Shop,
pie chart,
SMF Blog
Title: Re: Complete PJIRC Integration
Post by: robotman321 on July 06, 2007, 05:13:21 PM
here it is, give me the code for the others that dont work and i'll add them in, the ones that go on the index.template.php i mean
Title: Re: Complete PJIRC Integration
Post by: Cairna on July 07, 2007, 12:22:12 AM
Hm, still not quite in the right place. Pity I'm not more savvy with this stuff. Take a look ( http://www.fewleftstanding.org )

But if ya still feel like helpin' out :)

Gallery:

Find:

$current_action = 'admin';
if (in_array($context['current_action'], array(



Add after:

'gallery',




Find:

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




Add after:


// the [SMF Gallery] button
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu']  , '</a>
</td>' , $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';



Title: Re: Complete PJIRC Integration
Post by: robotman321 on July 07, 2007, 02:44:04 AM
aye ca rumba lol um lemme see it looks like it needs an image instead of words, i'll jimmy one of ur images so that it will work, i'll attach everything in the next post :P
Title: Re: Complete PJIRC Integration
Post by: robotman321 on July 07, 2007, 03:11:38 AM
apologies for double post heres the files with the images attached :P make sure to put them in the right folder xD

if you need anymore help just ask away :P
Title: Re: Complete PJIRC Integration
Post by: Cairna on July 07, 2007, 11:29:23 AM
Ah-just to make sure, they go into the Themes--->Images folder?

Check it out now- we're gettin' closer :)

( I say we're so it feels like a team effort )
Title: Re: Complete PJIRC Integration
Post by: robotman321 on July 07, 2007, 12:23:43 PM
ok use the images i made and put them into this folder:
/forum/Themes/cerberus11final/images/english/
the images will then appear :)
Title: Re: Complete PJIRC Integration
Post by: Cairna on July 07, 2007, 12:36:25 PM
Alright, I uploaded them to that directory, however the chat image is just a bit to the right of the Chat link, and the Gallery image doesn't show up strangely enough
Title: Re: Complete PJIRC Integration
Post by: robotman321 on July 07, 2007, 05:09:40 PM
ok the image says its been placed in the /forums/ foulder you may want to place it in there if it keeps that up otherwise idk why it does that
Title: Re: Complete PJIRC Integration
Post by: Touti on August 06, 2007, 12:45:45 PM
Maybe someone can help me here.  I think I did everything right but it doesn't work, I just get a blank windows.  Note that I haven't changed anything in chat.template.php yet, is that why it doesn't work, do I need to configure a server and a room ?


Nevermind, it seems to be a firewall issue.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on August 06, 2007, 08:59:49 PM
good to know was about to say somthing but hey, nvm
Title: Re: Complete PJIRC Integration
Post by: JhonV on October 15, 2007, 01:21:45 PM
I hope to works in smf 1.1.4 . any sugestion ?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on October 16, 2007, 01:06:47 AM
can't say i do.  My company bought ipb boards, i have strayed away from smf, sorry to all the liked this mod, i loved it.
Title: Re: Complete PJIRC Integration
Post by: dxyy on January 10, 2008, 08:58:38 AM
Does anyone know how to change the description of my chat.

For example if you look at the picture below, you can see that some of the channels have descriptions such as: "Welcome! Come on in....."

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdaxueyingyu.com%2Fsitewidepics%2Fchat-descriptions.jpg&hash=355172dcde03f835c01e1fe21fc08b74f652a218)

I'd also like to have a short description for my channel, but I have no idea how to achieve this and any guidance would be greatly appreciated.

Thank you. :)

EDIT: Here's a direct link to the picture as it's not so clear here after being resized: http://daxueyingyu.com/sitewidepics/chat-descriptions.jpg
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 10, 2008, 03:03:38 PM
thats something you do in irc server, that has nothing to do with the actual mod,

if you don't have a topic you: /cs topic #<chan> <topic>

if you do then its when you registered the channel, you were supposed to put a description when you register the channel
Title: Re: Complete PJIRC Integration
Post by: dxyy on January 11, 2008, 01:13:19 PM
Thanks for the last answer.

I think I just have one other inquiry.

I'd like to ad some text at the top of the page (well below the menu that contains "home" "search" "chat" etc) but I don't know how to do this.

I tried fiddling around with the chat.template file, but I can't seem to get the text to appear in the right place.

Some help with this would also be appreciated. Oh and sorry if this has already been asked and answered before, but I read through the entire thread previously and I don't remember reading anything about this. ;)
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 11, 2008, 02:38:54 PM
you will have to go search the smf coding boards for that, as it doesn't apply to this mod.
Title: Re: Complete PJIRC Integration
Post by: thetitan on January 11, 2008, 04:07:11 PM
Quote from: vanstygma on October 15, 2007, 01:21:45 PM
I hope to works in smf 1.1.4 . any sugestion ?

It works fine with 1.1.4
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 11, 2008, 04:38:42 PM
amazing this thing hasn't been updated since he made it and it works xD
Title: Re: Complete PJIRC Integration
Post by: Emperium on January 12, 2008, 11:56:15 PM
Well, I have a question about the auto identify feature, it doesn't seem to be working. I have a registered nick on Rizon however it does not auto identify me when I use this pjirc mod.

I have it set up like this:
// Auto Ident One User , Usually Admin
// 1 = On Ident Admin
// 0 = Off Dont Ident Admin
$userchatident = "1";

//User Id To Auto Ident On
$userchatidentid = "Emperium";

//If Auto Admin Ident Is On Then This Is The Pass To Ident With
$userchatidentpw = "password";


"Emperium" is the nick registered in Rizon as well as my admin user name of my forum and password is obviously a placeholder for my real pass which when on mIRC I use as the password when I Identify using "/msg NickServ IDENTIFY password". So how come I am not being automatically identified?

When I get logged on and in my channel I am using the correct user name, but it asks me to Identify since it's registered, I can do it manually and I get op in my channel. So the only issue I'm having is just trying to get it to auto identify.
Title: Re: Complete PJIRC Integration
Post by: Emperium on January 13, 2008, 12:24:17 PM
Bump, please help me, question is in the above post.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 13, 2008, 07:55:21 PM
thats for the default server that comes with the package.  its a feature for that specific server that is not available on any other server that i am aware of.  I think i have enough time to re design it so that it will work so that the ns identify can work, i'll see.
Title: Re: Complete PJIRC Integration
Post by: Emperium on January 13, 2008, 08:01:28 PM
Oh, if you can do so, it will be SO GREATLY APPRECIATED =D! I'll definitely keep myself glued to updates on this thread.
Title: Re: Complete PJIRC Integration
Post by: thetitan on January 14, 2008, 12:45:34 PM
I changed the guest chat deny message so it is more user friendly

Original code:
$guesttext = '<a href="'. $boardurl . '/index.php?action=register ">Register Today</a></br> Chat is not enabled for guests.';

I fixed the brake line and added a login link:
$guesttext = '<a href="'. $boardurl . '/index.php?action=register">Register Today</a> or <a href="'. $boardurl . '/index.php?action=login">Login Now</a><br /><strong>Chat is not enabled for guests.</strong>';
Title: Re: Complete PJIRC Integration
Post by: thetitan on January 14, 2008, 01:04:19 PM
I was also having a lot of problems with the ident server. So it happens that the irc server or the pjirc java applet very much dislike the _suffix.

so I removed it from the user pram string:
<param name="nick" value="'. $userchatname . '_'. $userchatsuffix . '">
<param name="nick" value="'. $userchatname . '">
and I was able to connect to the server and the channel fine.

I still wanted to identify users from the website when they are connected through pjirc, so I added the following line before the echo' <br></br> ';
$userchatname = $userchatsuffix . "_" . $userchatname;

echo' <br></br> ';


Because there is an issue with having a suffix, the suffix is now a prefix. That works fine. Users are able to connect with a prefix. The only thing thats left do change is, if having a variable, called suffix, as prefix bothers you, then replace suffix with prefix anywhere in code. That can be accomplished with any text editor that can perform "fine and replace".
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 14, 2008, 02:08:42 PM
i just took the suffix out completely, as most servers have the option so that if the domain is in use you will know.  That and suffix/prefix look bad, imo
Title: Re: Complete PJIRC Integration
Post by: thetitan on January 14, 2008, 02:54:43 PM
I was thinking about doing that as well. But from administrative side I would like to know how much use the website chat feature gets.
Title: Re: Complete PJIRC Integration
Post by: Emperium on January 14, 2008, 06:05:14 PM
Ya, members that connect to pjirc via the forums don't get any "_" prefix of suffix. I simply removed it all over the place and it works. The only issue which I still have and hopefully robotman321 can figure out and make is something to enable the NickServ auto identify for Rizon (or other ns use servers) server, for admins of course.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 14, 2008, 11:53:58 PM
now i am trying to do a query from the members db but everytime i try to put the code in, it creates some sort of error in the java window.. theres something else to this, maybe i'm going to have to edit the actual java files so that it will slip past, i dont know but its annoying me to no end..
Title: Re: Complete PJIRC Integration
Post by: SgtMic on January 15, 2008, 01:57:28 AM
I've read through all 10 pages and haven't seen or understand a solution to my problem.
My problem: connecting to IRC with a suffix/ tags.

All the members of my forums who are a part of the Squad wear [USMC] tags in their display names. For example mine is SgtMic [USMC]. Using that I cannot connect to IRC, I get a bad username error. If I remove the tag, I can connect just fine.

Attached is my chat.template.

Can you let me know what else I need or can do to make this work with tags?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 15, 2008, 05:05:55 AM
well i dont even need to download to tell you that you cannot have spaces in a username for an irc server.  you either need a _ or just plain bunched together
Title: Re: Complete PJIRC Integration
Post by: SgtMic on January 15, 2008, 11:19:43 AM
Changed my name to SgtMic_[USMC] and still won't work.

[08:16] Connecting...
[08:16] Logging in...
[08:16] -- *** Looking up your hostname
[08:16] -- *** Checking Ident
[08:16] -- *** Found your hostname
[08:17] -- *** No ident response
[08:17] Error : Closing Link: SgtMic_[USMC] by Burstfire.UK.EU.GameSurge.net (USER: Bad username)
[08:17] Disconnected from irc.Gamesurge.net
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 15, 2008, 05:04:49 PM
um then thats the server that you are using, each server is different.
Title: Re: Complete PJIRC Integration
Post by: SgtMic on January 15, 2008, 05:12:43 PM
Quote from: robotman321 on January 15, 2008, 05:04:49 PM
um then thats the server that you are using, each server is different.

Correct. Gamesurge does not allow tags. Is there any way in chat.template to remove the tags without having to change all of our display names?
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 16, 2008, 06:08:11 PM
i have looked over your chat template and it appears u already took them out :o

oh oh, their display names are already tagged?
Title: Re: Complete PJIRC Integration
Post by: SgtMic on January 17, 2008, 01:33:52 AM
Correct. All of us who belong to the squad have the tags in our display names. We have it set up that way because we are also the ones who develop the ACE Mod for OFP and ArmA. So we have an extensive about of members from those 2 communities.
Title: Re: Complete PJIRC Integration
Post by: robotman321 on January 17, 2008, 08:40:11 AM
then i think its the underscore that tells the server its a suffix =/
Title: Re: Complete PJIRC Integration
Post by: SgtMic on January 17, 2008, 11:00:58 AM
No under score. Just a space. :)
Title: Re: Complete PJIRC Integration
Post by: Emperium on January 18, 2008, 10:39:20 PM
Anything new with the Rizon server admin auto identify?
Title: Re: Complete PJIRC Integration
Post by: SgtMic on February 04, 2008, 08:02:00 PM
Hello? :)
Title: Re: Complete PJIRC Integration
Post by: l.uca on March 01, 2008, 11:26:02 AM
hallo to all I just installed the mod but when go to it, doesn't open why, please help me, i have smf 1.1.4 thanks.
Title: Re: Complete PJIRC Integration
Post by: Islander_IBG on April 04, 2008, 01:46:10 AM
hi guys

Execute Modification     ./Themes/default/index.template.php     Test failed

please help me ?

im using 1.1.4

Installed mods are :

od Name     Version     
1.    Invite    1.14    
2.    Welcome Topic Mod    1.1    
3.    Users Online Today Mod    1.4.0    
4.    Top 10 Posters Today And This Week Stats    1.1    
5.    PM On Registration    1.0.2    
6.    Popup PM Message - Uses The Same Window    1.3    
7.    Karma Description Mod    2.3    
8.    Karma Applaud Only    1.0.1    
9.    Edit_Display_Name_Permission    1.0    
10.    Board Viewers Mod    1.2    
11.    Admin Lock Thread    1.2    
12.    Top Karma On Stats    1.0    

Title: Re: Complete PJIRC Integration
Post by: SgtMic on April 06, 2008, 10:55:17 PM
Islander_IBG, you will just have to manually install the code into that file.
Title: Re: Complete PJIRC Integration
Post by: ApplianceJunk on April 11, 2008, 09:50:59 AM
Awesome mod!

Can I set it up so only special membergroups can use the chat?

thanks
Title: Re: Complete PJIRC Integration
Post by: DdMC.Hunter on April 12, 2008, 04:51:29 AM
Hi, I have a problem with the Button.
I placed him after the home button but he is right out of my menue.
I used a custom theme not the default.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg363.imageshack.us%2Fimg363%2F5204%2Fircbuttonsu7.jpg&hash=cbf50952f4fe6e6185fecf70e30f3c9a1bc0b79b) (http://imageshack.us)

PLZ send me the complete correct Code back that my Chat button is on the right place on the menue.

THX

here is my index.template.php

<?php
// Version: 1.1; index

/*   This template is, perhaps, the most important template in the theme. It
   contains the main template layer that displays the header and footer of
   the forum, namely with main_above and main_below. It also contains the
   menu sub template, which appropriately displays the menu; the init sub
   template, which is there to set the theme up; (init can be missing.) and
   the linktree sub template, which sorts out the link tree.

   The init sub template should load any data and set any hardcoded options.

   The main_above sub template is what is shown above the main content, and
   should contain anything that should be shown up there.

   The main_below sub template, conversely, is shown after the main content.
   It should probably contain the copyright statement and some other things.

   The linktree sub template should display the link tree, using the data
   in the $context['linktree'] variable.

   The menu sub template should display all the relevant buttons the user
   wants and or needs.

   For more information on the templating system, please see the site at:
   http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
   global $context, $settings, $options, $txt;

   /* Use images from default theme when using templates from the default theme?
      if this is 'always', images from the default theme will be used.
      if this is 'defaults', images from the default theme will only be used with default templates.
      if this is 'never' or isn't set at all, images from the default theme will not be used. */
   $settings['use_default_images'] = 'never';

   /* What document type definition is being used? (for font size and other issues.)
      'xhtml' for an XHTML 1.0 document type definition.
      'html' for an HTML 4.01 document type definition. */
   $settings['doctype'] = 'xhtml';

   /* The version this template/theme is for.
      This should probably be the version of SMF it was created for. */
   $settings['theme_version'] = '1.1';

   /* Set a setting that tells the theme that it can render the tabs. */
   $settings['use_tabs'] = true;

   /* Use plain buttons - as oppossed to text buttons? */
   $settings['use_buttons'] = true;

   /* Show sticky and lock status seperate from topic icons? */
   $settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   // Show right to left and the character set for ease of translating.
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
   <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";
   // ]]></script>
   <title>', $context['page_title'], '</title>';

   // The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
   echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';


   /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   if ($context['browser']['needs_size_fix'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

   // Show all the relative links, such as help, search, contents, and the like.
   echo '
   <link rel="help" href="', $scripturl, '?action=help" target="_blank" />
   <link rel="search" href="' . $scripturl . '?action=search" />
   <link rel="contents" href="', $scripturl, '" />';

   // If RSS feeds are enabled, advertise the presence of one.
   if (!empty($modSettings['xmlnews_enable']))
      echo '
   <link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';

   // If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

   // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';

   // We'll have to use the cookie to remember the header...
   if ($context['user']['is_guest'])
      $options['collapse_header'] = !empty($_COOKIE['upshrink']);

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'], '

   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

      function shrinkHeader(mode)
      {';

   // Guests don't have theme options!!
   if ($context['user']['is_guest'])
      echo '
         document.cookie = "upshrink=" + (mode ? 1 : 0);';
   else
      echo '
         smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

   echo '
         document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

         document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
         document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

         current_header = mode;
      }
   // ]]></script>';

   // the routine for the info center upshrink
   echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';

         function shrinkHeaderIC(mode)
         {';

   if ($context['user']['is_guest'])
      echo '
            document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
   else
      echo '
            smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

   echo '
            document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

            document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

            current_header_ic = mode;
         }
      // ]]></script>
<script language="javascript" type="text/javascript" src="', $settings['images_url'], '/preloader.js"></script>
</head>
<body>';
// header goes below here
   echo '
<!-- Added Header -->
<a name="top"></a>
<div align="center">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="45" height="192"><img src="', $settings['images_url'], '/forum_body_01.jpg" width="45" height="192" alt="" /></td>
<td width="910" height="192" align="left" valign="top">
<table width="910" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="910" height="139" background="', $settings['images_url'], '/forum_body_02.jpg" align="center" valign="bottom">
<div class="title-text" style="padding:0 0 18px 0;">', $context['forum_name'], '</div>
</td>
</tr>
<tr>
<td width="910" height="18" align="left" valign="middle" background="', $settings['images_url'], '/forum_body_04.jpg">
'; template_menu();
echo '
</td>
</tr>
<tr>
<td width="910" height="35"><img src="', $settings['images_url'], '/forum_body_05.jpg" width="910" height="35" alt="0" /></td>
</tr>
</table>
</td>
<td width="45" height="192"><img src="', $settings['images_url'], '/forum_body_03.jpg" width="45" height="192" alt="" /></td>
</tr>
</table>
<!-- END header -->
<!-- BEGIN content sections -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" align="center" valign="top" class="content-bg">
<!-- End added header -->
<table width="860" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="860" align="left" valign="top">
   <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';


   // display user name
   echo '
      <table width="100%" cellpadding="0" cellspacing="0" border="0" >
         <tr>';

   if($context['user']['is_logged'])
      echo '
            <td class="titlebg2" height="32">
               <span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
            </td>';

   // display the time
   echo '
            <td class="titlebg2" height="32" align="right">
               <span class="smalltext">' , $context['current_time'], '</span>';

   // this is the upshrink button for the user info section
   echo '
               <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
            </td>
         </tr>
         <tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
            <td valign="top" colspan="2">
               <table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
                  <tr>';

   if (!empty($context['user']['avatar']))
      echo '
                     <td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';

   echo '
                     <td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';

   // If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
                        <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                        <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
   }
   
   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
   {
      echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
         <span class="smalltext"><a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.</span><br />';
   }
   
   // Otherwise they're a guest - send them a lovely greating...
   else
      echo $txt['welcome_guest'];

   // Now, onto our second set of info, are they logged in again?
   if ($context['user']['is_logged'])
   {
      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
                        <b>', $txt[616], '</b><br />';

      // Are there any members waiting for approval?
      if (!empty($context['unapproved_members']))
         echo '
                        ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

      // Show the total time logged in?
      if (!empty($context['user']['total_time_logged_in']))
      {
         echo '
                        ', $txt['totalTimeLogged1'];

         // If days is just zero, don't bother to show it.
         if ($context['user']['total_time_logged_in']['days'] > 0)
            echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

         // Same with hours - only show it if it's above zero.
         if ($context['user']['total_time_logged_in']['hours'] > 0)
            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

         // But, let's always show minutes - Time wasted here: 0 minutes ;).
         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
      }
      echo '            </span>';
   }
   // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   else
   {
      echo '            </span>
                        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

                        <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
                           <input type="text" name="user" class="input1" value="Username" onBlur="if(this.value==\'\') this.value=\'Username\';" onFocus="if(this.value==\'Username\') this.value=\'\';" /> <input type="password" name="passwrd" class="input1" value="password" onBlur="if(this.value==\'\') this.value=\'password\';" onFocus="if(this.value==\'password\') this.value=\'\';" />
                           <select name="cookielength" class="input1">
                              <option value="60">', $txt['smf53'], '</option>
                              <option value="1440">', $txt['smf47'], '</option>
                              <option value="10080">', $txt['smf48'], '</option>
                              <option value="43200">', $txt['smf49'], '</option>
                              <option value="-1" selected="selected">', $txt['smf50'], '</option>
                           </select>
                           <input class="button" type="submit" value="', $txt[34], '" /><br />
                           <span class="middletext">', $txt['smf52'], '</span>
                           <input type="hidden" name="hash_passwrd" value="" />
                        </form>';
   }

   echo '
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
      </table>';

   echo '
      <table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
         <tr>';

   // Show a random news item? (or you could pick one from news_lines...)
   if (!empty($settings['enable_news']))
      echo '
            <td width="90%" class="titlebg2">
               <span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
            </td>';
   echo '
            <td class="titlebg2" align="right" nowrap="nowrap" valign="top">
               <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                  <a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
                  <input class="input1" type="text" name="search" onBlur="if(this.value==\'\') this.value=\'Search...\';" onFocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." style="width: 190px;" />&nbsp;
                  <input class="button" type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
                  <input type="hidden" name="advanced" value="0" />';

   // Search within current topic?
   if (!empty($context['current_topic']))
      echo '
                  <input type="hidden" name="topic" value="', $context['current_topic'], '" />';

      // If we're on a certain board, limit it to this board ;).
   elseif (!empty($context['current_board']))
      echo '
                  <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

   echo '
               </form>
            </td>
         </tr>
      </table>
   </div>';




   // The main content should go here.
   echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
   </div>';

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '

   <div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
         }
      // ]]></script>
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
         <tr>
            <td width="28%" valign="middle" align="left">
               Theme by <a href="http://www.m3talc0re.com/" target="_blank" style="font-size:10px;">m3talc0re</a>.
            </td>
            <td valign="middle" align="center" style="white-space: nowrap;">
               ', theme_copyright(), '
            </td>
            <td width="28%" valign="middle" align="right">
               <a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a>&nbsp;|&nbsp;<a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a>&nbsp;|&nbsp;<a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>&nbsp;|&nbsp;<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" style="font-size:10px;">CSS</a>
            </td>
         </tr>
      </table>';

      // Show the load time?
   if ($context['show_load_time'])
      echo '
      <span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

   // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
   if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
   {
      // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
      echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';

      // Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
      if ($context['browser']['is_safari'])
         echo '
         window.addEventListener("load", smf_codeFix, false);

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if ((codeFix.className == "code" || codeFix.className == "post" || codeFix.className == "signature") && codeFix.offsetHeight < 20)
                  codeFix.style.height = (codeFix.offsetHeight + 20) + "px";
            }
         }';
      elseif ($context['browser']['is_firefox'])
         echo '
         window.addEventListener("load", smf_codeFix, false);
         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if (codeFix.className == "code" && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0))
                  codeFix.style.overflow = "scroll";
            }
         }';
      else
         echo '
         var window_oldOnload = window.onload;

         window.onload = smf_codeFix;

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = codeFix.length - 1; i > 0; i--)
            {
               if (codeFix.currentStyle.overflow == "auto" && (codeFix.currentStyle.height == "" || codeFix.currentStyle.height == "auto") && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0) && (codeFix.offsetHeight != 0 || codeFix.className == "code"))
                  codeFix.style.height = (codeFix.offsetHeight + 36) + "px";
            }

            if (window_oldOnload)
            {
               window_oldOnload();
               window_oldOnload = null;
            }
         }';

      echo '
      // ]]></script>';
   }

   echo '
   </div>
<!-- Added footer -->
</td>
</tr>
</table>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="855" height="25" align="left" valign="middle" id="copyright-text">
</td>
<td rowspan="2" width="45" height="50" align="right" valign="top">
<a href="#top"><img src="', $settings['images_url'], '/header_09.jpg" width="45" height="47" alt="Back To Top" title="Back To Top" /></a></td>
</tr>
<tr>
<td width="855" height="20" align="left" valign="middle" id="legal-text">
</td>
</tr>
</table>
<!-- END Legal -->
</td>
</tr>
</table>
<!-- END content sections -->
<!-- BEGIN footer -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="81" align="left" valign="top">
<img src="', $settings['images_url'], '/header_11.jpg" width="500" height="81" alt="" /></td>
<td width="500" height="81" align="left" valign="top">
<img src="', $settings['images_url'], '/header_12.jpg" width="500" height="81" alt="" /></td>
</tr>
</table>
<!-- END footer -->
   </div>';

   // The following will be used to let the user know that some AJAX process is running
   echo '
   <div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
}

// Footer goes above here
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
   global $context, $settings, $options;

   echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex; padding-left:8px; padding-right:8px;">';

   // Each tree item has a URL and name. Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      // Show something before the link?
      if (isset($tree['extra_before']))
         echo $tree['extra_before'];

      // Show the link, including a URL if it should have one.
      echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

      // Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];

      // Don't show a separator for the last one.
      if ($link_num != count($context['linktree']) - 1)
         echo '&nbsp;&raquo;&nbsp;';
   }

   echo '</div>';
}

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

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers', 'chat')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'chat')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
   echo '
         <ul class="main-navigation">';

   // Show the [home] button.
   echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-home"><a href="', $scripturl, '">' , $txt[103] , '</a></li>' , $current_action == 'home' ? '' : '';

// The [3guk] Button      
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '            <td class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">               <a href="', $scripturl, '?action=chat">Chat</a>            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

   // Show the [help] button.
   echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-help"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>' , $current_action == 'help' ? '' : '';

   // How about the [search] button?
   if ($context['allow_search'])
      echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-search"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>' , $current_action == 'search' ? '' : '';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-admin"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>' , $current_action == 'admin' ? '' : '';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-profile"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>' , $current_action == 'profile' ? '' : '';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-messages"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>' , $current_action == 'pm' ? '' : '';



   // The [calendar]!
   if ($context['allow_calendar'])
      echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-calendar"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>' , $current_action == 'calendar' ? '' : '';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-members"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>' , $current_action == 'mlist' ? '' : '';



   // If the user is a guest, show [login] button.
   if ($context['user']['is_guest'])
      echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-login"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>' , $current_action == 'login' ? '' : '';


   // If the user is a guest, also show [register] button.
   if ($context['user']['is_guest'])
      echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-register"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>' , $current_action == 'register' ? '' : '';


   // Otherwise, they might want to [logout]...
   if ($context['user']['is_logged'])
      echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '' : '' , '
            <li class="mainNav-logout"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>' , $current_action == 'logout' ? '' : '';


   // The end of tab section.
   echo '</ul>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
   global $settings, $buttons, $context, $txt, $scripturl;

   // Create the buttons...
   foreach ($button_strip as $key => $value)
   {
      if (isset($value['test']) && empty($context[$value['test']]))
      {
         unset($button_strip[$key]);
         continue;
      }
      elseif (!isset($buttons[$key]) || $force_reset)
         $buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

      $button_strip[$key] = $buttons[$key];
   }

   if (empty($button_strip))
      return '<td>&nbsp;</td>';

   echo '
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>
Title: Re: Complete PJIRC Integration
Post by: njdevils28 on April 22, 2008, 02:14:09 PM
Quote from: Islander_IBG on April 04, 2008, 01:46:10 AM
hi guys

Execute Modification     ./Themes/default/index.template.php     Test failed

please help me ?

im using 1.1.4

Installed mods are :

od Name     Version     
1.    Invite    1.14    
2.    Welcome Topic Mod    1.1    
3.    Users Online Today Mod    1.4.0    
4.    Top 10 Posters Today And This Week Stats    1.1    
5.    PM On Registration    1.0.2    
6.    Popup PM Message - Uses The Same Window    1.3    
7.    Karma Description Mod    2.3    
8.    Karma Applaud Only    1.0.1    
9.    Edit_Display_Name_Permission    1.0    
10.    Board Viewers Mod    1.2    
11.    Admin Lock Thread    1.2    
12.    Top Karma On Stats    1.0    


I have the same problem.
What does it mean and how do I manualy insert the code?

Thanks,

-Ron
Title: Re: Complete PJIRC Integration
Post by: njdevils28 on April 22, 2008, 02:15:16 PM
Quote from: SgtMic on April 06, 2008, 10:55:17 PM
Islander_IBG, you will just have to manually install the code into that file.
How does one do that?
Title: Re: Complete PJIRC Integration
Post by: Nick.123 on June 02, 2008, 06:42:23 PM
Does this mod work on 1.1.5
Title: Re: Complete PJIRC Integration
Post by: Upalnite on October 01, 2008, 09:59:13 AM
Respect to the mod, lovin it. got it workin on 1.1.6. 1 question tho please, how can i get this to open chat in anew window, and also how can i remove the forum header and footer just leaving the chat room on its own?
Title: Re: Complete PJIRC Integration
Post by: dkinser on October 13, 2008, 03:23:45 PM
do you know if it is possible to restrict the rooms that a user can go into when using this mod?  In other words, we don't want someone coming onto our site as guest (which we need to be able to use the chat) and then go to any room they wish.   We'd like to restrict them to just a few rooms.

Or do you know if a room ban can be added to restrict them from going to other rooms?
Title: Re: Complete PJIRC Integration
Post by: hellboy78 on November 09, 2008, 10:05:59 AM
Hi

I'm trying to install this chat into my SMF


I use 1.1.4. version
blacktothefuture theme
plus ad managment 2.3

any help for correct istallation of this MOD?
Title: Re: Complete PJIRC Integration
Post by: hellboy78 on November 21, 2008, 07:03:57 AM
someone have idea how to use this MOD with "parachat" ???
Title: Re: Complete PJIRC Integration
Post by: lazor on December 07, 2008, 02:34:31 PM
How can I install this on 1.1.7?
Title: Re: Complete PJIRC Integration
Post by: dkinser on February 04, 2009, 11:49:53 AM
Hi, running Dark Dirge theme and can't get the button to cooperate.   The default code shoved all the buttons to the right, then I added replaced with this line.

       // The [3guk] Button
            echo'
                                   <a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a></li>';


Got a button, but would love for it to show the same as the other buttons.

The button above it's code is:

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '
               <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';

Any help on making this Chat button look the same as the rest would be appreciated.


I've attached the index template if that helps.
Title: Re: Complete PJIRC Integration
Post by: 3guk on March 20, 2009, 03:24:05 PM
Just for those interested, I am now taking up this project again, I had to disappear from the forums for a few months because I had other pressing matters to attend to, the majority of these are now cleaned up and I am looking to update this mod to be fully compatible with all of the latest versions.

I'm hoping to start work on the new version tomorrow, which should bring a host of compatibility updates along with a few new features.
Title: Re: Complete PJIRC Integration
Post by: SgtMic on March 20, 2009, 04:17:02 PM
Nice. Look forward to the updates.
Title: Re: Complete PJIRC Integration
Post by: ChackanPT on March 31, 2009, 01:42:32 PM
Hey, I just installed this mod. One question, how do I access it?

Edit: Just noticed it added a Chat button in my default theme! Sorry lol

Is there anyway to change the default Server to which the mod logs into?
Title: Re: Complete PJIRC Integration
Post by: 3guk on April 03, 2009, 05:36:06 PM
Hey Guys,

Just to let you know this works perfectly on 1.1.8 as of today, just installed it on my test server with a view to working on it over the next few days.

You want to edit Chat.Template.php in the /Themes/Default folder, all the variables are in this file, you should be able to set the server that it connects to and the room that it uses.
Title: Re: Complete PJIRC Integration
Post by: 4b11l on April 04, 2009, 03:24:28 AM
Any comment on how much resource/memory this mod uses on the server.
Title: Re: Complete PJIRC Integration
Post by: ChackanPT on April 04, 2009, 02:19:35 PM
Okay thank you very much!

One last thing, the IRC button is not centered with the rest of the buttons in the theme Mesh, any clue why?

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi169.photobucket.com%2Falbums%2Fu222%2FChackankun%2FSemttulo-21.jpg&hash=482325a0ea8248a61ebcebc22ac14c4adb0131c7)

Here is the code:

Quote// The [IRC] Button
            echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
            <a href="', $scripturl, '?action=chat">IRC</a>
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';             

As you can see i didn't change the code in any way, except the name Chat to IRC.
Title: Re: Complete PJIRC Integration
Post by: 3guk on April 04, 2009, 02:26:26 PM
Try this:

// Show the [IRC] button.
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td nowrap="nowrap" valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back2' , '">
<a href="', $scripturl, '?action=chat">IRC</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
Title: Re: Complete PJIRC Integration
Post by: ChackanPT on April 04, 2009, 02:28:39 PM
<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, whichlogin is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;

// the user values
if(!$context['user']['is_guest'] && isset($_POST['options']['mywidth']))
{
include_once($GLOBALS['sourcedir'] . '/Profile.php');
makeThemeChanges($context['user']['id'], $settings['theme_id']);
$options['mywidth'] = $_POST['options']['mywidth'];
}
elseif ($context['user']['is_guest'])
{
if (isset($_POST['options']['mywidth']))
{
$_SESSION['mywidth'] = $_POST['options']['mywidth'];
$options['mywidth'] = $_SESSION['mywidth'];
}
elseif (isset($_SESSION['mywidth']))
$options['mycolor'] = $_SESSION['mycolor'];
}
// end


}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// any admin settings for width?
if(!empty($settings['disallow_width'])){
$show_widths=false;
if(!empty($settings['site_width']))
$options['mywidth']=$settings['site_width'];
else
$options['mywidth']='90%';
}
else{
$show_widths=true;
}

$context['show_widths']=$show_widths;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// the width
 if($context['user']['is_logged']){
echo '<style type="text/css"><!--
#maintable{
width: ' 
, !empty($options['mywidth']) ? $options['mywidth'] : '80%' ';
min-width: 750px;
}
 --></style>'
;
}
else{
if(isset($_COOKIE['mywidth']))
$gwidth=$_COOKIE['mywidth'];
else
$gwidth='80%';

echo '<style type="text/css"><!--
#maintable{
width: ' 
$gwidth ';
min-width: 750px;
}
 --></style>'
;
}

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
  <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
 var current_leftbar = '
, empty($options['collapse_leftbar']) ? 'false' 'true'';

 function shrinkHeaderLeftbar(mode)
 {'
;

  // Guests don't have theme options!!
  if ($context['user']['is_guest'])
 echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
  else
 echo '
smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "'
$context['session_id'], '");';
  echo '
document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

current_leftbar = mode;
 }
 // ]]></script>
 <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
 var current_rightbar = '
, empty($options['collapse_rightbar']) ? 'false' 'true'';

 function shrinkHeaderRightbar(mode)
 {'
;

  // Guests don't have theme options!!
  if ($context['user']['is_guest'])
 echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
  else
 echo '
smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "'
$context['session_id'], '");';

  echo '
document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

current_rightbar = mode;
 }
  // ]]></script>

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("topsection").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>'
;

echo 
'
<div id="maintable">'
;

if(!empty(
$settings['mytopbox']))
echo '<div style="background: #414141;">',$settings['mytopbox'],'</div>';
// TinyPortal
  if($context['TPortal']['showtop']==1)
  {
// TinyPortal end

echo '
<div id="topsection" '
, !empty($options['collapse_header']) ? 'style="display: none;"' '' ,'>
<div id="topleft">'
;

echo 
'
</div>
<div>'
;


echo 
'</span>
</div>
</div>'
;
}

echo '<div id="mainmenu">' template_menu() , '</div>';
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" id="bodyarea"><tr>'
;

// TinyPortal integrated bars
 if($context['TPortal']['leftbar'])
 {
  echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: 10px 10px 10px 0;" valign="top">
 <div id="leftbarHeader"'
, empty($options['collapse_leftbar']) ? '' ' style="display: none;"'' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">
<div style="background: url('
.$settings['images_url'].'/box_midtop.jpg) repeat-x;">
<div style="background: url('
.$settings['images_url'].'/box_lefttop.jpg) no-repeat;">
<div style="padding: 20px; background: url('
.$settings['images_url'].'/box_righttop.jpg) top right no-repeat;">
 '
;
  TPortal_sidebar('left');
  echo '</div></div></div></div></td>';

 }

  echo '<td width="100%" align="left" valign="top" style="padding-top: 10px; padding-bottom: 10px;">';
  if($context['TPortal']['centerbar'])
echo '<div>' TPortal_sidebar('center') , '</div>';


theme_linktree2();
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '</td>';

// TinyPortal integrated bars
 if($context['TPortal']['rightbar']){
  echo '<td style="padding: 10px 0px 10px 10px" valign="top" align="right">
 <div id="rightbarHeader"'
, empty($options['collapse_rightbar']) ? '' ' style="display: none;"'' style="width: ' ,$context['TPortal']['rightbar_width'], 'px; text-align: left; padding-top: 5px;">
<div style="background: url('
.$settings['images_url'].'/box_midtop.jpg) repeat-x;">
<div style="background: url('
.$settings['images_url'].'/box_lefttop.jpg) no-repeat;">
<div style="padding: 20px; background: url('
.$settings['images_url'].'/box_righttop.jpg) top right no-repeat;">
 '
;
  TPortal_rightbar();
  echo '</div></div></div></div></td>';
 }

  echo '</tr></table>';

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
 ' 
theme_copyright(),'<br /><span class="smalltext"><strong>Mesh</strong> | 'tportal_version() , '
<a href="http://validator.w3.org/check/referer" target="_blank">XHTML</a> |
<html>Banner made by Diana Soares</html> |  
<A HREF="http://dev.voixbox.com/">Poll created by VoixBox</A> |
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank">CSS</a></span>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />
<small>'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</small>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
</div>
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree2()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; padding: 20px 0 20px 0;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'];

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' > ';
}

echo '</div>';
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
}

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

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';

if (isset($_GET['dl']))
$current_action 'dlmanager';

if (isset($_GET['board']) || isset($_GET['topic']))
$current_action 'forum';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

echo 
'<div style="float: right;">';

if(
$context['show_widths'] && $context['user']['is_logged'])
echo '
<form action="'
$scripturl,  !empty($_SERVER['QUERY_STRING']) ? '?'.$_SERVER['QUERY_STRING'] : '' ,'" style="margin: 0;padding: 0; text-align: right;" method="post">
<input style="vertical-align: top; background: #6B6B6B; padding: 0; margin: 0;  border: 0; cursor: pointer; cursor: hand;" type="submit" value="800PX" name="options[mywidth]" />|
<input style="vertical-align: top; background: #6B6B6B; padding: 0; margin: 0; border: 0; cursor: pointer; cursor: hand; " type="submit" value="95%" name="options[mywidth]" />|
<input style="vertical-align: top; background: #6B6B6B; padding: 0; margin: 0;  border: 0; cursor: pointer; cursor: hand; " type="submit" value="80%" name="options[mywidth]" />
</form>'
;
echo 
'
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'collapse.gif' 'expand.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a></div>';
// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td nowrap="nowrap" class="maintab_' 
$first '"> </td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back2' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '"> </td>' '';


if(
$settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first"> </td>' '' '
<td valign="top" class="maintab_' 
$current_action=='forum' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=forum">'.$txt['tp-forum'].'</a>
</td>' 
$current_action=='forum' '<td class="maintab_active_last"> </td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '"> </td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '"> </td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '"> </td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '"> </td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '"> </td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '"> </td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '"> </td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '"> </td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '"> </td>' '';

// the [chat] button
   
$path str_replace("index.php""chat/index.php"$scripturl);
   if (
$context['user']['is_logged'])
   echo 
$context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
      <td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'chat' 'active_back' 'back2' '">
         <a href="'
$path'" target="_blank">'$txt['chat'], '</a></td>';

// The [IRC] Button
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'chat' 'active_back' 'back' '">
<a href="'
$scripturl'?action=chat">IRC</a>
</td>' 
$current_action == 'chat' '<td class="maintab_active_' $last '">&nbsp;</td>' '';              

// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '"> </td>' '' '
<td nowrap="nowrap" valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back2' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '"> </td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '"> </td>
'
;
// TinyPortal
 if($context['TPortal']['leftbar'])
 echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="'$settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
if($context['TPortal']['rightbar'])
 echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="'$settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
// TinyPortal end
echo '
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td> </td>';

echo '
<td class="maintab_back smalltext">'
implode('</td><td class="maintab_back smalltext">'$button_strip) , '</td>';
}

?>


I had the same problem with the AJAX Chat module, the Chat button appeared the same way. Someone helped me but dunno what the change was :|
Title: Re: Complete PJIRC Integration
Post by: 3guk on April 04, 2009, 02:31:03 PM
Just edited my post above, try using that instead.
Title: Re: Complete PJIRC Integration
Post by: ChackanPT on April 04, 2009, 02:34:53 PM
Yep, it worked perfectly! Thanks :D

Maybe this mod will help people get back in irc heh
Title: Re: Complete PJIRC Integration
Post by: societyofrobots on May 09, 2009, 06:19:57 PM
Do you have some pics of your chat mod that you can put up? I mean, its good to see it in action before I go through the trouble of installing and all.
Title: Re: Complete PJIRC Integration
Post by: societyofrobots on May 09, 2009, 07:09:05 PM
It refuses to install, even manually. Also, the uninstall doesn't do much. It left 95% of the files still there . . .
Title: Re: Complete PJIRC Integration
Post by: annikk.exe on May 24, 2009, 11:39:36 AM
Hello,

Is there a simple way to embed the chatbox as an object in the Template_Above section?  Above the link tree but below the search box/Home/Profile/Logout buttons.

Running v1.1.9.

Thanks :>
Title: Re: Complete PJIRC Integration
Post by: IvoLeite on May 26, 2009, 02:51:32 PM
Hi there.

I've tried to install this (great) mod but seems to be an error with my index.template.php
I've also tried to manually install but I can't fix the possible error.

Can someone tell me what's wrong in my file?
Thank you.
Title: Re: Complete PJIRC Integration
Post by: teh_Krall on May 30, 2009, 05:06:11 PM
Anyone know if it's possible to embed this into a simpleportal block?
Title: Re: Complete PJIRC Integration
Post by: Dario on June 01, 2009, 07:19:39 AM
Is there a guide somewhere that says how to set this up, and get a button for it in your theme? (1.1.x)

Btw, any ETA on when the Control Panel interface will be released? I'm not a coder, so I greatly look forward to (and neeed) that... :)
Title: Re: Complete PJIRC Integration
Post by: Casa Grande on June 01, 2009, 12:36:08 PM
It seems the mod is working fine, however I keep getting a JAVA message that says there's an error in the app's digital signature
Title: Re: Complete PJIRC Integration
Post by: teh_Krall on June 02, 2009, 12:48:44 AM
Quote from: Dario on June 01, 2009, 07:19:39 AM
Is there a guide somewhere that says how to set this up, and get a button for it in your theme? (1.1.x)

Btw, any ETA on when the Control Panel interface will be released? I'm not a coder, so I greatly look forward to (and neeed) that... :)

Here's a guide to edit in a chat button: http://docs.simplemachines.org/index.php?topic=564 (http://docs.simplemachines.org/index.php?topic=564)

I installed it on 1.1.8 with package manager and it works great.
Title: Re: Complete PJIRC Integration
Post by: Chit-Chat ChatterBox Boss on June 12, 2009, 02:37:19 AM
Anyway we can get this to work for 2.0 rc1-1 ? only thing that fails is index.template.php
Title: Re: Complete PJIRC Integration
Post by: tbk22 on June 20, 2009, 09:33:29 AM
a few screens of this mod working would be great
Title: Re: Complete PJIRC Integration
Post by: Dario on June 20, 2009, 08:56:23 PM
Quote from: teh_Krall on June 02, 2009, 12:48:44 AM
Here's a guide to edit in a chat button: http://docs.simplemachines.org/index.php?topic=564 (http://docs.simplemachines.org/index.php?topic=564)

I installed it on 1.1.8 with package manager and it works great.
Thanks. The problem is that the guide doesn't show how to get it working on a custom theme. (or at least when I open my theme's index.template.php, it doesn't contain any of the lines that the guide says to search for) After install, the Chat button appears just fine in the default theme... just not any others. :)
Title: Re: Complete PJIRC Integration
Post by: uncajesse on June 25, 2009, 02:30:47 PM
Here's a modification I did on it.  Mainly to update PJIRC to current version, and to make it install on v1.1.9 and probably with almost no chance that the installation won't work right.  I also fixed the menu text even past what was posted above, which wasn't using the correct CSS.

[edit]
oops, forgot to change one thing in the chat template from my test version. it's modified now.
(the alternate logged-in name had "???" instead of "_" at the end)
[/edit]
Title: Re: Complete PJIRC Integration
Post by: SilvioTO on August 21, 2009, 05:44:14 AM
How to open the chat in a new window instead inside a forum page?
Thanks a lot.

Silvio.
Title: Re: Complete PJIRC Integration
Post by: uncajesse on August 21, 2009, 06:15:29 AM
Quote from: SilvioTO on August 21, 2009, 05:44:14 AM
How to open the chat in a new window instead inside a forum page?
Thanks a lot.

Silvio.

in the A tag... for instance if you have:
<A HREF="some_url">text</A>
you would change it to:
<A HREF="some_url" TARGET="_blank">text</A>
Title: Re: Complete PJIRC Integration
Post by: SilvioTO on August 21, 2009, 06:31:45 AM
I tryed this:
// the [IRC Chat] button
echo'   
<td valign="top" class="maintab_back"> <a href="', $scripturl, '?action=chat" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a> </td>', $context['menu_separator'];


that work, but the new page is always in a forum page. I would have only applet in a new popup window. Here's a way? Thanks.
Title: Re: Complete PJIRC Integration
Post by: » мιsтєя мιsғιт « on September 05, 2009, 05:39:25 PM
Good work, 3guk. Just got it installed (with a few manual edits) on my 1.1.10 installation and it's working like a charm.

Here are some screens for people who are in doubt.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi31.tinypic.com%2F33k540p.jpg&hash=b6968e4481aea6425f9adf3863b7d9e0eae8ac52)
Title: Re: Complete PJIRC Integration
Post by: GenghisChris on September 30, 2009, 04:52:47 PM
how'd you get it working with 1.1.10? I just get directed to a blank forum page xD
Title: Re: Complete PJIRC Integration
Post by: ellion on October 09, 2009, 02:05:41 AM
hi,


i got this mod installed ok on 1.1.10

problem is;

when i open the chat client, i get message:

connecting...
logging in...
disconnected from irc.serenity-irc.net...

messages is repeating.

what do i need to do to connect.

thanks
Title: Re: Complete PJIRC Integration
Post by: ellion on October 16, 2009, 03:21:04 AM
bump
Title: Re: Complete PJIRC Integration
Post by: Ave Marie on December 30, 2009, 05:46:20 PM
I am having trouble getting the chat link to show up on a custom theme (CS Classic which is based on the default theme). I have tried to follow the tutorial for installing a custom button, but it did not work - I'm pretty sure because of the custom theme. Can anyone help me out?
Title: Re: Complete PJIRC Integration
Post by: psynx on January 24, 2010, 03:16:55 PM
Quote from: teh_Krall on May 30, 2009, 05:06:11 PM
Anyone know if it's possible to embed this into a simpleportal block?

yah, that would be nice if it is possible. i want this in my simple portal block
Title: Re: Complete PJIRC Integration
Post by: psynx on February 01, 2010, 07:58:41 AM
hello,

im having problem connecting to a server.

i change the server from the chat.template.php to zagreb.hr.eu.undernet.org

and when i go to the chat page of my forum, it won't connect.

it says 'bad username'
Title: Re: Complete PJIRC Integration
Post by: steve51184 on February 09, 2010, 09:16:04 PM
any chance of this for 2.0 rc2?
Title: Re: Complete PJIRC Integration
Post by: Mantere on February 15, 2010, 05:39:04 PM
Just installed this to SMF 1.1.11 with custom theme and no clitches what so ever. Works just as it should. Very nice mod.
Title: Re: Complete PJIRC Integration
Post by: bigbearomaha on April 16, 2010, 10:54:38 PM
Fatal error: Cannot redeclare getshoutboxcontent() (previously declared in ...Sources/Load.php:2208) in .../Sources/Load.php on line 2286

I installed your mod via the smf pkg tools and this is what I get when trying to access my forum now.

I'm not impressed at all.

can you hopefully help me to correct this or remove it?

This is installed to SMF 1.1.11

Big Bear
Title: Re: Complete PJIRC Integration
Post by: Dennissmith on May 29, 2010, 07:43:11 PM
pjirc doesnt work on smf2.0 rc3 i tried 10 times still no works is only for rc2 not rc3 so whoever made this mod need to fix it :D thankyou
Title: Re: Complete PJIRC Integration
Post by: spikespiegel on October 19, 2011, 02:18:09 AM
I cant install it because of index.template.php file.
I'm using smf 2.0.1 default theme.


The troublesome parts:

QuoteFInd
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

add after
// The [3guk] Button
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=chat">Chat</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';             








find
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];



Replace
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'chat')))
$current_action = $context['current_action'];




Tried to find those "find" parts in the script, but couldnt see anything.
Title: Re: Complete PJIRC Integration
Post by: Arantor on January 28, 2014, 01:00:24 PM
Moved to the Chat/Shoutboxes category.
Title: Re: Complete PJIRC Integration
Post by: Kleineganz on August 26, 2014, 08:21:41 PM
I just attempted to install this. I made the necessary modifications to chat.template.php and then installed it via the package manager. I get the following error during the attempt to install:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fcontent.screencast.com%2Fusers%2FKleineGames%2Ffolders%2FJing%2Fmedia%2F76577a9b-4412-49a6-9fad-92134b0a4988%2F2014-08-26_1813.png&hash=57935b87ff58326fa07e91cad0426ad77083c837)

I've tried uninstalling and reinstalling, and I've just tried ignoring the error but when I do, I end up not seeing a chat button anywhere.

I'm using the Wrap theme (although the error shows it failing on every theme in my library).

My site is childfreeladies.com
Title: Re: Complete PJIRC Integration
Post by: Ninja ZX-10RR on August 26, 2014, 09:06:48 PM
Quote from: Kleineganz on August 26, 2014, 08:21:41 PM
I just attempted to install this. I made the necessary modifications to chat.template.php and then installed it via the package manager. I get the following error during the attempt to install:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fcontent.screencast.com%2Fusers%2FKleineGames%2Ffolders%2FJing%2Fmedia%2F76577a9b-4412-49a6-9fad-92134b0a4988%2F2014-08-26_1813.png&hash=57935b87ff58326fa07e91cad0426ad77083c837)

I've tried uninstalling and reinstalling, and I've just tried ignoring the error but when I do, I end up not seeing a chat button anywhere.

I'm using the Wrap theme (although the error shows it failing on every theme in my library).

My site is childfreeladies.com
Welcome to SMF! :)
From what I can see the mod is compatible with 1.1.x versions, not 2.0.x so it will not work. Period. Please check the compatible versions before trying to install something as you could break things! Hint: usually modifications that are compatible with at least an SMF version above 2.0 will work with 2.0.8, usually. Be sure to backup anyway before installing stuff ;)
Also please update to SMF 2.0.8 --> http://custom.simplemachines.org/upgrades/ (do the from 2.0.6 to 2.0.7 package and then the 2.0.7 to 2.0.8 one ;) )
Title: Re: Complete PJIRC Integration
Post by: Kleineganz on August 26, 2014, 09:56:41 PM
Quote from: ♦ Ninja ZX-10RR ♦ on August 26, 2014, 09:06:48 PM
Welcome to SMF! :)
From what I can see the mod is compatible with 1.1.x versions, not 2.0.x so it will not work. Period. Please check the compatible versions before trying to install something as you could break things! Hint: usually modifications that are compatible with at least an SMF version above 2.0 will work with 2.0.8, usually. Be sure to backup anyway before installing stuff ;)
Also please update to SMF 2.0.8 --> http://custom.simplemachines.org/upgrades/ (do the from 2.0.6 to 2.0.7 package and then the 2.0.7 to 2.0.8 one ;) )
Ok thanks, will do. That is somewhat disappointing then. This might not be the right place to ask this, but is there a way to add pages to my forum, where I could potentially embed a chat script into?  On my WordPress sites I just simply embed an iFrame that allows users to connect through a webchat to IRC. If there's a mod for that, what would I be looking for exactly?
Title: Re: Complete PJIRC Integration
Post by: Ninja ZX-10RR on August 26, 2014, 10:10:33 PM
Yup it's off topic but I'll reply anyway... Chat and shoutboxes are here --> http://custom.simplemachines.org/mods/index.php?action=search;type=24 be sure once again to backup and install something compatible with at least a version older than 2.0 ;) there are descriptions in each one of those so you surely know better than me what you are looking for :)
Title: Re: Complete PJIRC Integration
Post by: Kleineganz on August 26, 2014, 10:37:58 PM
Quote from: ♦ Ninja ZX-10RR ♦ on August 26, 2014, 10:10:33 PM
Yup it's off topic but I'll reply anyway... Chat and shoutboxes are here --> http://custom.simplemachines.org/mods/index.php?action=search;type=24 be sure once again to backup and install something compatible with at least a version older than 2.0 ;) there are descriptions in each one of those so you surely know better than me what you are looking for :)
What would be the right forum for me to ask this in? I'm not looking for a shoutbox or chatbox. I want something that will allow me to create a new page/tab on the forum where I can embed a webchat iframe.

I want to use IRC chat, and none of the current IRC chat mods are compatible with 2.0.
Title: Re: Complete PJIRC Integration
Post by: Ninja ZX-10RR on August 27, 2014, 12:02:11 AM
Quote from: Kleineganz on August 26, 2014, 10:37:58 PM
Quote from: ♦ Ninja ZX-10RR ♦ on August 26, 2014, 10:10:33 PM
Yup it's off topic but I'll reply anyway... Chat and shoutboxes are here --> http://custom.simplemachines.org/mods/index.php?action=search;type=24 be sure once again to backup and install something compatible with at least a version older than 2.0 ;) there are descriptions in each one of those so you surely know better than me what you are looking for :)
What would be the right forum for me to ask this in? I'm not looking for a shoutbox or chatbox. I want something that will allow me to create a new page/tab on the forum where I can embed a webchat iframe.

I want to use IRC chat, and none of the current IRC chat mods are compatible with 2.0.
This one should work actually... --> http://custom.simplemachines.org/mods/index.php?mod=1256 give it a try? It gives me only one error to me (probably because I have 90+ other mods installed :P )
Otherwise... It could be support 2.0.x (http://www.simplemachines.org/community/index.php?board=147.0) or mod request if that doesn't work (http://www.simplemachines.org/community/index.php?board=79.0) :)