Advertisement:

Author Topic: AjaxChat Integration (latest version 3.2.1)  (Read 2176787 times)

Offline MarineSniper

  • Semi-Newbie
  • *
  • Posts: 43
Re: AjaxChat Integration
« Reply #360 on: February 09, 2009, 04:06:44 PM »
I am needing some serious help. I have installed smf and without any problems and i have my site up and running smoothly. But i have tried and tried to install this mod and cannot. I have uploaded the mod to the packages folder and in my admin panel when i go to the packages it will not upload it tells me one of the files in the folder is not writeable well i checked it and everything is good and then when it try to install it again i get fatal errors. I am so stupid about coding i have looked all through this thread and cannot figure it. i have even tried to install other mods and the same problem i just want a chat on my forum. Anyone have any ideas that will help me out.

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: AjaxChat Integration
« Reply #361 on: February 09, 2009, 04:24:58 PM »
I am needing some serious help. I have installed smf and without any problems and i have my site up and running smoothly. But i have tried and tried to install this mod and cannot. I have uploaded the mod to the packages folder and in my admin panel when i go to the packages it will not upload it tells me one of the files in the folder is not writeable well i checked it and everything is good and then when it try to install it again i get fatal errors. I am so stupid about coding i have looked all through this thread and cannot figure it. i have even tried to install other mods and the same problem i just want a chat on my forum. Anyone have any ideas that will help me out.
do you have chown all files to the correct user? For example apache?

Offline MarineSniper

  • Semi-Newbie
  • *
  • Posts: 43
Re: AjaxChat Integration
« Reply #362 on: February 09, 2009, 06:58:21 PM »
Yes i have chmod all the files in the packages folder even the package folder itself. Still nothing.

Now here is the step that i am using i have uploaded the file to the server via ftp client, and chmod the files and double checked it placed the mod in the packages folder.

and then in my admin window i get my ftp server information enter it and hit the button...

then i get this big window on my admin control panel that says this..

shoutBox v1.2.1
By Hack's Park

--------------------------------------------------------------------------------

Link to Mod | Comment On This Mod

--------------------------------------------------------------------------------
Introduction

Note (makito): For the past days I'd been receiving some reports about the smilies's more link being bugged. I didn't test it actually, but now is completely fixed. I'm sorry for that.

Bassed on PHP, Javascript (Ajax/xml) and XHTML, this is an SMF modification that allows you to have a shoutBox or message board, like a chat, that was designed in order to make minimal modifications to the SMF original script.

Features

ShoutBox

users can use command /url
users can use command /me
admins and moderators can use /clear to clear list of shouts
font face selection
background, border and text color selection
font styles like "bold, italic, underline"

Moderation Panel

edit messages that contain commands as /url or /me
edit and delete messages
delete all messages with one click
add and remove ban status for users

Administration Panel

edit border, background and text color of the input message
modify time of reload of the list of shouts
choose if the usernames will be printed as links
change div's class style that contains usernames and messages
add or remove font faces
edit time format and text time color
add or remove sections, where the shoutBox is displayed "?action="
modify size and number of messages to display values
add or remove group permissions for the shoutBox

Installation

Simply install the package to add this modification on the Default theme.

This mod will work for SMF "1.1.0" to "1.1.9".

Manual Edit

A Manual edit will be required for non-default themes to add the modification. Here you have a manual.

Look for the instructions in our page: www.hackspark.com

Languages

You can find other languages in our page, other languages are welcome and will be published in the thread.

Support

Please use the modification thread for support of this modification.
You can look for support also in our page, there you will find more scripts, and new versions if apply.

Credits

Developed by
Marco Florian Gonzales [makito]

Install pack
English language
Thanks Juan Carlos Sierra [JCS]

Thanks
OtaKumi - AniDreamZ anime y manga de fans para fans
Mundo SonyEricson todo para tu celular

Changelog

Previus versions
shoutBox v1.2
shoutBox v1.1
shoutBox v1.0.1
shoutBox v1.0
shoutBox v1.0 RC 1
shoutBox Beta

and... what's new?

smilies's more link problem is fixed
some corrections were made in the source code, nothing important

(cc) Hack's Park | Complete details | License


Install Actions
Installations actions for "HacksPark shoutBox":
Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Sources/Subs.php Test successful
3. Execute Modification ./Themes/default/index.template.php Test successful
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Extract File ./Sources/HP_shoutBox.php 
6. Extract File ./Sources/HP_shoutBox_Manage.php 
7. Extract File ./Sources/HP_shoutBox_Subs.php 
8. Extract File ./Themes/default/HP_colorPicker.js 
9. Extract File ./Themes/default/HP_shoutBox.js 
10. Extract File ./Themes/default/HP_shoutBox_Mod.js 
11. Extract File ./Themes/default/HP_shoutBox.template.php 
12. Extract File ./Themes/default/HP_shoutBox_Manage.template.php 
13. Extract File ./Themes/default/images/del.gif 
14. Extract File ./Themes/default/images/edit.gif 
15. Extract File ./Themes/default/images/loading.gif 
16. Extract File ./Themes/default/images/bbc/bgcolor.gif 
17. Extract File ./Themes/default/images/bbc/caretos.gif 
18. Extract File ./Themes/default/images/bbc/clean.gif 
19. Extract File ./Themes/default/images/bbc/fontcolor.gif 
20. Extract File ./Themes/default/images/bbc/nocolor.gif 
21. Extract File ./Themes/default/languages/HP_shoutBox.english.php 
22. Extract File ./Themes/default/languages/HP_shoutBox_Manage.english.php 
23. Execute Code HP_shoutBox_Install.php
 

and when i hit install i get this..

Fatal error: require() [function.require]: Failed opening required '/home/a2646840/public_html/forum/Packages/temp/HP_shoutBox_Install.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a2646840/public_html/forum/Sources/Packages.php on line 556


what does this mean.

Offline syntaxera

  • Semi-Newbie
  • *
  • Posts: 21
Re: AjaxChat Integration
« Reply #363 on: February 09, 2009, 07:24:56 PM »
I am having trouble getting this mod to work...

I have installed the chat and it is working perfect  www.DeadTix.info/chat [nofollow]


But when I put the MOD in I get this error:

Quote
Fatal error: Call to undefined function getChatOnlineUserIDs() in /home/content/s/y/n/syntaxera/html/DeadTix/Sources/BoardIndex.php on line 347


Why is there no "FIND"  then "PASTE" code for custom templates?
I am assuming that it is adding code to the source folder and NOT the themes folder,
But WHAT CODE DO I ADD TO THE CUSTOM THEME to get this to work?

I feel like I am very close to getting this to work...  but am just missing the right code to put into  index.template ?   

PLEASE HELP ME!!! ahhhhhhh

My Email:  NycArt@gmail.com

Offline raven85

  • Semi-Newbie
  • *
  • Posts: 56
Re: AjaxChat Integration
« Reply #364 on: February 09, 2009, 07:34:59 PM »
Yeah me too man.

Offline syntaxera

  • Semi-Newbie
  • *
  • Posts: 21
Re: AjaxChat Integration
« Reply #365 on: February 09, 2009, 07:41:47 PM »
I can't wait to add this mod to my sites...

Please help us out!!!!!!!!!!!!

Offline raven85

  • Semi-Newbie
  • *
  • Posts: 56
Re: AjaxChat Integration
« Reply #366 on: February 09, 2009, 07:45:33 PM »
I can't wait to add this mod to my sites...

Please help us out!!!!!!!!!!!!

Yeah me too... I really need this mod very badly.

Offline syntaxera

  • Semi-Newbie
  • *
  • Posts: 21
Re: AjaxChat Integration
« Reply #367 on: February 09, 2009, 08:43:59 PM »
Help us Hunter... help help us Hunter.... 
Help us Hunter... help help us Hunter.... 


Offline syntaxera

  • Semi-Newbie
  • *
  • Posts: 21
Re: AjaxChat Integration
« Reply #368 on: February 09, 2009, 09:13:21 PM »
60 Phish Fans await this MOD  :)

www.PhishTix.info [nofollow]

Offline Blinker

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
Re: AjaxChat Integration
« Reply #369 on: February 09, 2009, 09:21:35 PM »
@MarineSniper - that's a different mod. You're using the Hack's Park shoutbox. This thread (and mod) are for AJAXChat.

Offline MarineSniper

  • Semi-Newbie
  • *
  • Posts: 43
Re: AjaxChat Integration
« Reply #370 on: February 10, 2009, 04:56:51 AM »
YEah i understand that now. but i am having the issue with that mod too. Hell i am having issues with every mod i cannot install nothing

Offline Kyrislian

  • Semi-Newbie
  • *
  • Posts: 23
Re: AjaxChat Integration
« Reply #371 on: February 10, 2009, 08:58:05 AM »
I've got a few questions about the AjaxChat, and I'd LOVE it if someone could help me?

I want to add a certain number of channels, all titled. But how do I go about doing this? And how can I change "Ajax Chat" into a title of my own?

Offline .HuNTeR.

  • Jr. Member
  • **
  • Posts: 207
  • Gender: Male
Re: AjaxChat Integration
« Reply #372 on: February 10, 2009, 09:00:53 AM »
@syntaxera,raven85
I tried to make a manual on installing this mod on other themes but it's impossible.
if you have a little php skills you can do it your self with reading the mod codes.
but now the only thing I can say is attach your boardinde.tempalte.php and index.template.php file here and let me or any other users help you do the edits

@MarineSniper
if you can't install any modes start a topic here

Offline .HuNTeR.

  • Jr. Member
  • **
  • Posts: 207
  • Gender: Male
Re: AjaxChat Integration
« Reply #373 on: February 10, 2009, 09:12:45 AM »
@Kyrislian
this feature doesn't available now
but after next version I will check this
because this is a popular feature ;)
@ZuX
you should edit your boardinde.tempalte.php and index.template.php located in themes/yourtheme/
you attached wrong file

Offline munty

  • Semi-Newbie
  • *
  • Posts: 19
Re: AjaxChat Integration
« Reply #374 on: February 10, 2009, 10:01:36 AM »
i would like to be able to restrict what channels are there, ideally i only want the "public" channel and then the private one.

I dont want to have my forums listed as channels, tried to look at the code on the chat itself, and it appears you "cant" change if you are integrating

is this correct?

hope not!


keep up the good work  :D

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #375 on: February 10, 2009, 10:51:14 AM »
i would like to be able to restrict what channels are there, ideally i only want the "public" channel and then the private one.

I dont want to have my forums listed as channels, tried to look at the code on the chat itself, and it appears you "cant" change if you are integrating

is this correct?

hope not!


keep up the good work  :D

you will find the settings here /public_html/chat/lib/config.php and find

Code: [Select]
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = null;


In addition If you want to have a private channel you can create a board visible to Admin, moderator (or whoever) ONLY. You would then replace that code with something like this. Of course you would change your board number array(33,) and you could add channels by seperating with a comma.

Code: [Select]
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = array(33,);

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #376 on: February 10, 2009, 11:08:21 AM »
I've got a few questions about the AjaxChat, and I'd LOVE it if someone could help me?

I want to add a certain number of channels, all titled. But how do I go about doing this? And how can I change "Ajax Chat" into a title of my own?

This should do the trick for your Custom Channels Custom Chat Channels

"how can I change "Ajax Chat" into a title of my own?"

Found @ https://sourceforge.net

Go to chat/lib/template/ & edit the files "loggedin" & "loggedout" as follows:
Find this code:
 
Code: [Select]
<title>[LANG]title[/LANG]</title>  
Replace it with: 
Code: [Select]
<title>The title of your chat here</title>  
Then find: 
Code: [Select]
<h1>[LANG]title[/LANG]</h1>  
Replace with: 
Code: [Select]
<h1>The header of your chat here</h1>
 
If you want to place an image instead of either the title or the header, place an HTML image link between the <h1> tags. Exemple:
 
<h1><img src="http://www.yourdomain.com/chat_header_icon.jpg"></h1>
 
& upload your chat_header_icon to your server of course.
« Last Edit: February 10, 2009, 11:29:48 AM by mrtrc266 »

Offline EJR

  • Semi-Newbie
  • *
  • Posts: 16
    • RescueTechs
Re: AjaxChat Integration
« Reply #377 on: February 10, 2009, 02:23:31 PM »
Having an issue intergrating chat into SMF.

I did a new install of SMF 1.1.8 today.  www.rescuetechs.com/community [nofollow] is the URL.  I placed the CHAT files within the install as directed. 

I then installed Ajax chat integration (tried with 2.2 and 2.3).  Now I can log into chat mand get it to work (I am the admin), but all of other members are told they do not have access?

Any thoughts?

Offline syntaxera

  • Semi-Newbie
  • *
  • Posts: 21
Re: AjaxChat Integration
« Reply #378 on: February 10, 2009, 07:25:32 PM »
Quote
@syntaxera,raven85
I tried to make a manual on installing this mod on other themes but it's impossible.
if you have a little php skills you can do it your self with reading the mod codes.
but now the only thing I can say is attach your boardinde.tempalte.php and index.template.php file here and let me or any other users help you do the edits



The theme is called:  MultiBlue

Here is the code for:  BoardIndex.template

Code: [Select]
<?php
// Version: 1.1; BoardIndex

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

// Show some statistics next to the link tree if SP1 info is off.
echo '
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom">'
theme_linktree(), '</td>
<td align="right">'
;
if (!$settings['show_sp1_info'])
echo '
'
$txt[19], ': '$context['common_stats']['total_members'], ' &nbsp;&#38;#8226;&nbsp; '$txt[95], ': '$context['common_stats']['total_posts'], ' &nbsp;&#38;#8226;&nbsp; '$txt[64], ': '$context['common_stats']['total_topics'], '
'
, ($settings['show_latest_member'] ? '<br />' $txt[201] . ' <b>' $context['common_stats']['latest_member']['link'] . '</b>' $txt[581] : '');
echo '
</td>
</tr>
</table>'
;

// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<table border="0" width="100%" class="tborder" cellspacing="' 
, ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' '0' '" cellpadding="4" style="margin-bottom: 2ex;">
<tr>
<td class="catbg"> &nbsp;'
$txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">'
;

// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>'
$context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = '
, empty($settings['newsfader_time']) ? 5000 $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

var foreColor, backEl, backColor;

if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;

backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;

backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}

// List all the lines of the news for display.
var smfFadeContent = new Array(
"'
implode('",
"'
$context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>'
;
}

/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
$first true;
foreach ($context['categories'] as $category)
{
echo '
<div style="margin-top: ' 
$first '0;' '1ex;' '' $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' '''">
<div class="catbgnew-l">
<div class="catbgnew-r">
<div class="catbgnew"  style="padding: 5px 0 0 10px;">'
;
$first false;

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="'
$category['collapse_href'], '">'$category['collapse_image'], '</a>';

echo '
'
$category['link'], '
</div></div></div>'
;

// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '

<table border="0" width="100%" cellspacing="0" cellpadding="5" class="bordercolor" style="margin-top: 0px;">'
;

/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr>
<td ' 
, !empty($board['children']) ? 'rowspan="2"' '' ' class="windowbg" width="6%" align="center" valign="top"><a href="'$scripturl'?action=unread;board='$board['id'], '.0">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="'$settings['images_url'], '/on.gif" alt="'$txt[333], '" title="'$txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="'$settings['images_url'], '/on2.gif" alt="'$txt[333], '" title="'$txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="'$settings['images_url'], '/off.gif" alt="'$txt[334], '" title="'$txt[334], '" />';

echo '</a>
</td>
<td class="windowbg2">
<b><a href="'
$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a></b><br />
'
$board['description'];

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>'
count($board['moderators']) == $txt[298] : $txt[299], ': 'implode(', '$board['link_moderators']), '</i></div>';

// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;">
<span class="largetext">'
$board['posts'], '</span><br /><span class="smalltext">'$txt[21], '</span>
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;">
<span class="largetext">'
$board['topics'],'</span><br /><span class="smalltext">'$txt[330], '</span>
</td>
<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">
'
;

    /* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<b>'
$txt[22], '</b>  '$txt[525], ' '$board['last_post']['member']['link'] , '<br />
'
$txt['smf88'], ' '$board['last_post']['link'], '<a href="'$board['last_post']['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="'$txt[111], '" title="'$txt[111], '" style="float: right;" /></a><br />
'
$txt[30], ' '$board['last_post']['time'];
echo '
</span>
</td>
</tr>'
;
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();

/* Each child in each board's children has:
             id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
 {
 
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' $txt[330] . ': ' $child['topics'] . ', ' $txt[21] . ': ' $child['posts'] . ')">' $child['name'] . '</a>';
 
$children[] = $child['new'] ? '<b>' $child['link'] . '</b>' $child['link'];
 }
               echo 
'
     <tr>
            <td colspan="5" class="windowbg'
, !empty($settings['seperate_sticky_lock']) ? '3' '''">
               <span class="smalltext"><b>'
$txt['parent_boards'], '</b>: 'implode(', '$children), '</span>
            </td>
         </tr>'
;
            }

         }

         echo 
'
      </table>
<table style=" width: 100%;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="altbgsol">&nbsp;</td><td class="altbgarka">&nbsp;</td><td class="altbgsag">&nbsp;</td>
</tr>
</table>'
;

      }
      echo 
'
   </div>'
;
   }
   if (
$context['user']['is_logged'])
   {   echo 
'
   <table border="0" width="100%" cellspacing="0" cellpadding="5">
      <tr>
 <td align="'
, !$context['right_to_left'] ? 'center' 'center''">';

      
// Mark read button.
  $mark_read_button = array('markread' => array('text' => 452'image' => 'markread.gif''lang' => true'url' => $scripturl '?action=markasread;sa=all;sesc=' $context['session_id']));

      
// Show the mark all as read button?
      
if ($settings['show_mark_read'] && !empty($context['categories']))
            echo 
'
            <table cellpadding="0" cellspacing="0" border="0" style="position: relative; top: -5px;">
               <tr>
                      '
template_button_strip($mark_read_button'top'), '
               </tr>
            </table>'
;
      echo 
'
         </td>
      </tr>
   </table>'
;

   } 

// Here's where the "Info Center" starts...
echo '<br />
<div class="catbgnew-l">
<div class="catbgnew-r">
<div class="catbgnew" style="padding-top: 5px; text-align: center; ">
<a href="#" onclick="shrinkHeaderIC(!current_header_ic); return false;"><img id="upshrink_ic" src="'
$settings['images_url'], '/', empty($options['collapse_header_ic']) ? 'collapse.gif' 'expand.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a>
'
$txt[685], '
</div>
</div>
</div>

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

<div id="upshrinkHeaderIC"'
, empty($options['collapse_header_ic']) ? '' ' style="display: none;"''>
<table border="0" width="100%" cellspacing="0" cellpadding="4" class="bordercolor">'
;

// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="'
$scripturl'?action=recent"><img src="'$settings['images_url'], '/post/xx.gif" alt="'$txt[214], '" /></a>
</td>
<td class="windowbg2">'
;

// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="'
$scripturl'?action=recent">'$txt[214], '</a></b>
<div class="smalltext">
'
$txt[234], ' &quot;'$context['latest_post']['link'], '&quot; '$txt[235], ' ('$context['latest_post']['time'], ')<br />
</div>'
;
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="100%" border="0">'
;

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" valign="top"><b>'
$post['link'], '</b> '$txt[525], ' '$post['poster']['link'], ' ('$post['board']['link'], ')</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">'
$post['time'], '</td>
</tr>'
;
echo '
</table>'
;
}
echo '
</td>
</tr>'
;
}

// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="'
$scripturl'?action=calendar"><img src="'$settings['images_url'], '/icons/calendar.gif" alt="'$txt['calendar24'], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="smalltext">'
;

// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span style="color: #'
$modSettings['cal_holidaycolor'], ';">'$txt['calendar5'], ' 'implode(', '$context['calendar_holidays']), '</span><br />';

// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span style="color: #'
$modSettings['cal_bdaycolor'], ';">'$context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="'
$scripturl'?action=profile;u='$member['id'], '">'$member['is_today'] ? '<b>' ''$member['name'], $member['is_today'] ? '</b>' '', isset($member['age']) ? ' (' $member['age'] . ')' '''</a>'$member['is_last'] ? '<br />' ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span style="color: #'
$modSettings['cal_eventcolor'], ';">'$context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
'
$event['can_edit'] ? '<a href="' $event['modify_href'] . '" style="color: #FF0000;">*</a> ' ''$event['href'] == '' '' '<a href="' $event['href'] . '">'$event['is_today'] ? '<b>' $event['title'] . '</b>' $event['title'], $event['href'] == '' '' '</a>'$event['is_last'] ? '<br />' ', ';

// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="'
$scripturl'?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">'$txt['calendar_how_edit'], '</a>)';
}
echo '
</span>
</td>
</tr>'
;
}


// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="'
$scripturl'?action=stats"><img src="'$settings['images_url'], '/icons/info.gif" alt="'$txt[645], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="middletext">
'
$context['common_stats']['total_posts'], ' '$txt[95], ' '$txt['smf88'], ' '$context['common_stats']['total_topics'], ' '$txt[64], ' '$txt[525], ' '$context['common_stats']['total_members'], ' '$txt[19], '. '$txt[656], ': <b> '$context['common_stats']['latest_member']['link'], '</b>
<br /> ' 
$txt[659] . ': <b>&quot;' $context['latest_post']['link'] . '&quot;</b>  ( ' $context['latest_post']['time'] . ' )<br />
<a href="'
$scripturl'?action=recent">'$txt[234], '</a>'$context['show_stats'] ? '<br />
<a href="' 
$scripturl '?action=stats">' $txt['smf223'] . '</a>' '''
</span>
</td>
</tr>'
;
}

// "Users online" - in order of activity.
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[158], '</td>
</tr><tr>
<td rowspan="2" class="windowbg" width="20" valign="middle" align="center">
'
$context['show_who'] ? '<a href="' $scripturl '?action=who">' '''<img src="'$settings['images_url'], '/icons/online.gif" alt="'$txt[158], '" />'$context['show_who'] ? '</a>' '''
</td>
<td class="windowbg2" width="100%">'
;

echo '
'
$context['show_who'] ? '<a href="' $scripturl '?action=who">' ''$context['num_guests'], ' '$context['num_guests'] == $txt['guest'] : $txt['guests'], ', ' $context['num_users_online'], ' '$context['num_users_online'] == $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';

// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' '$context['num_buddies'] == $txt['buddy'] : $txt['buddies'];

// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' ''$context['num_users_hidden'] . ' ' $txt['hidden'];

echo ')';
}

echo $context['show_who'] ? '</a>' '''
<div class="smalltext">'
;

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
'
$txt[140], ':<br />'implode(', '$context['list_users_online']);

echo '
<br />
'
$context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' $scripturl '?action=stats">' $txt['smf223'] . '</a>' '''
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
'
$txt['most_online_today'], ': <b>'$modSettings['mostOnlineToday'], '</b>.
'
$txt['most_online_ever'], ': '$modSettings['mostOnline'], ' (' timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>'
;

// If they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
 echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
'
$context['allow_pm'] ? '<a href="' $scripturl '?action=pm">' '''<img src="'$settings['images_url'], '/message_sm.gif" alt="'$txt[159], '" />'$context['allow_pm'] ? '</a>' '''
</td>
<td class="windowbg2" valign="top">
<b><a href="'
$scripturl'?action=pm">'$txt[159], '</a></b>
<div class="smalltext">
'
$txt[660], ' '$context['user']['messages'], ' '$context['user']['messages'] == $txt[471] : $txt[153], '.... '$txt[661], ' <a href="'$scripturl'?action=pm">'$txt[662], '</a> '$txt[663], '
</div>
</td>
</tr>'
;
}

// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[34], ' <a href="'$scripturl'?action=reminder" class="smalltext">(' $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="'
$scripturl'?action=login"><img src="'$settings['images_url'], '/icons/login.gif" alt="'$txt[34], '" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>'
$txt[35], ':</b><br />
<input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>'
$txt[36], ':</b><br />
<input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>'
$txt[497], ':</b><br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="'
$modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>'
$txt[508], ':</b><br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="'
$txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>'
;
}
  echo 
'
      </table>
<table style=" width: 100%;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="altbgsol">&nbsp;</td><td class="altbgarka">&nbsp;</td><td class="altbgsag">&nbsp;</td>
</tr>
</table>'
;
echo '

</div>
</div>'
;
}
 

?>





Offline syntaxera

  • Semi-Newbie
  • *
  • Posts: 21
Re: AjaxChat Integration
« Reply #379 on: February 10, 2009, 07:28:21 PM »
and here is the code for:  index.template


Code: [Select]
  <?php
// Version: 1.1.5; 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'], '" />
'
;
echo (!empty(
$modSettings['meta_description'])) ? ' <meta name="description" content="'$modSettings['meta_description'] .'" />' '<meta name="description" content="'$context['page_title'] .'" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'  
;
echo (!empty(
$modSettings['meta_keywords'])) ? '
<meta name="keywords" content="'
$modSettings['meta_keywords'] .'" />' '';
echo (!empty(
$modSettings['meta_copyright'])) ? '
<meta name="copyright" content="'
$modSettings['meta_copyright'] .'" />' '';
echo (!empty(
$modSettings['meta_author'])) ? '
<meta name="author" content="'
$modSettings['meta_author'] .'" />' '';
echo 
'
<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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

// 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>
</head>
<body>'
;

echo
'
<div id="container">
<div id="header">'
;
template_menu();

echo'
<h1>
 <span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span><br />';






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

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// 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
'<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'] == $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 ' ';
}


echo '

</h1>
   
  </div>'
;

echo'
<div id="content">'
;

// 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></div>'
;

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


<td valign="middle" align="center" style="white-space: nowrap;">
<p> '
theme_copyright(), ' <br /><a href="http://www.jamtix.info" style="font-size:10px;"><img src="'.$settings['images_url'].'/mysql.gif" alt=""/></a><a href="http://www.biscotix.info" style="font-size:10px;"><img src="'.$settings['images_url'].'/php.gif" alt=""/></a><a href="http://www.deadtix.info" style="font-size:10px;"><img src="'.$settings['images_url'].'/xhtml.gif" alt=""/></a><a href="http://www.phishtix.info/" style="font-size:10px;"><img src="'.$settings['images_url'].'/css.gif" alt=""/></a><br />
<font color="white"></font> <a href="http://www.smfgrup.com" target="_blank" title="smf, smfdestek, smf destek"></a><br />
</p>
<p class="credit"><a href="http://www.dead.net/" target="_blank"><img src="'
$settings['images_url'], '/fc.png" alt="Phish Official Winter and Summer Tour Dates at www.Phish.com" width="150" height="50" style="margin: 5px 16px;"  /></a></p>
</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>'
;

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

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3435913-28");
pageTracker._trackPageview();
</script>

</body></html>'
;
}

// 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;">';

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

// Show the start of the tab section.

echo '
           <ul id="mainmenu">'
;

// Show the [home] button.
echo '<li><a' $current_action=='home' ' class="active"' '' ' href="'$scripturl'"><span>' $txt[103] , '</span></a></li>';

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

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

// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' $current_action=='calendar' ' class="active"' '' ' href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>'

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

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

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' $current_action=='pm' ' class="active"' '' ' href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , '</span></a></li>';

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

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

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

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

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

?>
   




Hunter... thanks again for trying to help.  I am VERY EXCITED about this mod.