Advertisement:

Author Topic: Default Avatar?  (Read 82449 times)

Offline Bitwiz44

  • Jr. Member
  • **
  • Posts: 123
  • Gender: Male
Default Avatar?
« on: November 07, 2004, 08:54:47 AM »
When someone does not have or use an Avatar, I would like it to default a  Gif I made. Where do I change the code? 2. Does it follow with different theme's, or do I need to make a change in each theme? (RC1)
Thanks.

Offline A.M.A

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,133
  • Gender: Male
  • ..
Re: Default Avatar?
« Reply #1 on: November 07, 2004, 11:04:12 AM »
in index.template.php look for:
Code: [Select]
if (!empty($context['user']['avatar']))
echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
add after
Code: [Select]
else
echo '<td valign="middle"><img src="', $settings['images_url'], '/noava.gif" alt="" /></td>';

in Display.template.php look for:
Code: [Select]
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';
add after
Code: [Select]
else
echo '           <div style="overflow: auto; width: 100%;"><img src="', $settings['images_url'], '/noava.gif" alt="" /></div><br />';
assuming that the (noava.gif) is in your ( Themes\x\images ) folder.

you have to do the same for each theme.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: Default Avatar?
« Reply #2 on: November 07, 2004, 11:33:02 AM »
Hey nice one! Thanks. Worked easy and it makes it look good.
Dev Consultant
Former SMF Doc Coordinator

Offline Bitwiz44

  • Jr. Member
  • **
  • Posts: 123
  • Gender: Male
Re: Default Avatar?
« Reply #3 on: November 07, 2004, 11:50:08 AM »
Thank you AMA. I will try this.

Offline Lum-chan

  • Semi-Newbie
  • *
  • Posts: 88
  • Gender: Male
  • Lum-chan is cute!
    • The World of Urusei Yatsura's Lum
Re: Default Avatar?
« Reply #4 on: November 26, 2004, 10:29:42 AM »
[edit]Didn't upload the images (stupid me)[/edit]

Works great with RC2 and smfCurve!

Nice one A.M.A.
« Last Edit: November 26, 2004, 10:46:00 AM by Lum-chan »
Lum-chan


Offline Alexandre P.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,044
  • Gender: Male
    • LivreSansPage
Re: Default Avatar?
« Reply #5 on: November 26, 2004, 07:48:25 PM »
I just modified a little bit A.M.A.'s code to add a default avatar for guests :)  Don't know if it could had be done in an easier/mor efficace way, but it works :P

In index.template.php look for:
Code: [Select]
if (!empty($context['user']['avatar']))
echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
add after
Code: [Select]
elseif ($context['user']['is_guest'] && file_exists($settings['images_url'], '/usernoavatar.png'))
                echo '<td valign="middle"><img src="', $settings['images_url'], '/userisguest.png" alt="" /></td>';
        elseif (file_exists($settings['images_url'], '/usernoavatar.png'))
                echo '<td valign="middle"><img src="', $settings['images_url'], '/usernoavatar.png" alt="" /></td>';

In Display.template.php look for:
Code: [Select]
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';
add after
Code: [Select]
                        else
                                 echo '           <div style="overflow: auto; width: 100%;"><img src="', $settings['images_url'], '/usernoavatar.png" alt="" /></div><br />';
look for
Code: [Select]
// Otherwise, show the guest's email.
else
                        echo '
<br />
<br />
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';
replace by
Code: [Select]
// Otherwise, show the guest's default avatar and email.
else
                        echo '           <div style="overflow: auto; width: 100%;"><img src="', $settings['images_url'], '/userisguest.png" alt="" /></div>';
                        echo '
<br />
<br />
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';

Assuming that the avatar images are in your Themes\x\images folder, usernoavatar.png is default's avatar for users and userisguest.png is default's avatar for guests.

You have to do the same for each theme.
Aucun support par M.P., courriel ou messagerie instantanée / No support by P.M., email or I.M.

Offline Midgard

  • Jr. Member
  • **
  • Posts: 271
  • Gender: Male
Re: Default Avatar?
« Reply #6 on: December 21, 2004, 09:39:30 AM »
Thank you Alex

Offline Ped

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
    • Playing with PSP
Re: Default Avatar?
« Reply #7 on: July 05, 2005, 07:35:19 PM »
Ok, I am stumped!  :(

Where is Display.template.php  ??? I dont see it in my theme folders :-[

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: Default Avatar?
« Reply #8 on: July 05, 2005, 07:41:56 PM »
Ok, I am stumped!  :(

Where is Display.template.php  ??? I dont see it in my theme folders :-[

Themes/[theme name]/Display.template.php.

-Dan The Man

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: Default Avatar?
« Reply #9 on: July 05, 2005, 07:55:33 PM »
Ok, I am stumped!  :(

Where is Display.template.php  ??? I dont see it in my theme folders :-[
Check your default theme folder. A lot of themes probably don't have their own Display.template.php file, so it calls for the default one.
Dev Consultant
Former SMF Doc Coordinator

Offline Ped

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
    • Playing with PSP
Re: Default Avatar?
« Reply #10 on: July 05, 2005, 09:21:06 PM »
Thanks Dan & Bugeyes for speedy replies,  :D

Got it now & is working rather well (PHP Thicko here), the elusive file was lurking in the Default theme  ;D  is handy info to know for future.

Ped
Slainte

So many files & no brain to catalogue them

Offline ArkServer

  • SMF Hero
  • ******
  • Posts: 1,831
  • My posts are my own
    • BlushyFace | A spoopy and creppy site
Re: Default Avatar?
« Reply #11 on: August 01, 2005, 03:34:39 PM »
does this work for remotely hosted pictures like *.gif / *.jpg ?

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: Default Avatar?
« Reply #12 on: August 01, 2005, 03:39:28 PM »
does this work for remotely hosted pictures like *.gif / *.jpg ?

Yes.

I'm moving this topic to Tips & Tricks.

-Dan The Man

Offline Joey

  • Semi-Newbie
  • *
  • Posts: 15
  • Gender: Male
    • New Life Games
Re: Default Avatar?
« Reply #13 on: September 28, 2005, 05:25:07 PM »
conflicting mods????

hello all I have SMF 1.0.5 and loonblue theme going and it works very nicely.

I added the Defalt Avatar code in the the site for  index.template.php and Display.template.php and got this error message..



Warning: Wrong parameter count for file_exists() in /home/blablabla/blablabla/Sources/Load.php(1045) : eval()'d code on line 157

Warning: Wrong parameter count for file_exists() in /home/blablabla/blablabla/Sources/Load.php(1045) : eval()'d code on line 159

 Wrong parameter count for file_exists()




????????   I went back to the old index.template.php but left the Display.template.php in and reload the page and it works just fine without the index.template.php part of the code put in...

Quote
elseif ($context['user']['is_guest'] && file_exists($settings['images_url'], '/usernoavatar.png'))
                echo '<td valign="middle"><img src="', $settings['images_url'], '/userisguest.png" alt="" /></td>';
        elseif (file_exists($settings['images_url'], '/usernoavatar.png'))
                echo '<td valign="middle"><img src="', $settings['images_url'], '/usernoavatar.png" alt="" /></td>';

my question is just what does this part of the code do and why is it giveing me this error message?
is the way loonblue theme  works messing it up?  conflicting mods?   this is the code after I edited it for  index.template.php

Quote
if (!empty($context['user']['avatar']))
      echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
elseif ($context['user']['is_guest'] && file_exists($settings['images_url'], '/usernoavatar.gif'))
                echo '<td valign="middle"><img src="', $settings['images_url'], '/userisguest.gif" alt="" /></td>';
        elseif (file_exists($settings['images_url'], '/usernoavatar.gif'))
                echo '<td valign="middle"><img src="', $settings['images_url'], '/usernoavatar.gif" alt="" /></td>';

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

   // If the user is logged in, display stuff like their name, new messages, etc.

Thanks for any help im lost on this one...
Joey
All to often the "hard to find" or "most expensive" component will
sacrifice itself in an attempt to save the two cent "fuse"
http://newlifegames.com [nofollow]

Offline Joey

  • Semi-Newbie
  • *
  • Posts: 15
  • Gender: Male
    • New Life Games
Re: Default Avatar?
« Reply #14 on: September 29, 2005, 01:06:54 PM »
Can any one help??
All to often the "hard to find" or "most expensive" component will
sacrifice itself in an attempt to save the two cent "fuse"
http://newlifegames.com [nofollow]

Offline vaga

  • Semi-Newbie
  • *
  • Posts: 17
Re: Default Avatar?
« Reply #15 on: November 02, 2005, 06:29:19 PM »
i don't found code like that in my index.template.php (in my themes/mytheme/)

is this in there ? /themes/default/Index.template.php
or themes/mytheme/Index.template.php ??

i'm using 1.1rc1 smf..

and i found something like tahat in my display.template.php...

Code: [Select]
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']))
echo '
', $message['member']['avatar']['image'], '<br />';

just only one i have...not like similar codes from upstair..

i guess, i'll can't do that properly... :(

Offline Adraeus

  • Newbie
  • *
  • Posts: 2
Re: Default Avatar?
« Reply #16 on: November 24, 2005, 12:09:03 AM »
Why is this not a mod?

Offline Jelte

  • Semi-Newbie
  • *
  • Posts: 17
Re: Default Avatar?
« Reply #17 on: March 24, 2006, 02:07:37 PM »
Why is this not a mod?

Is there a mod available now?

Offline TGB

  • Jr. Member
  • **
  • Posts: 103
    • DC-Haven
Re: Default Avatar?
« Reply #18 on: June 25, 2006, 08:21:19 PM »
in index.template.php look for:
Code: [Select]
if (!empty($context['user']['avatar']))
echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
add after
Code: [Select]
else
echo '<td valign="middle"><img src="', $settings['images_url'], '/noava.gif" alt="" /></td>';

in Display.template.php look for:
Code: [Select]
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';
add after
Code: [Select]
else
echo '           <div style="overflow: auto; width: 100%;"><img src="', $settings['images_url'], '/noava.gif" alt="" /></div><br />';
assuming that the (noava.gif) is in your ( Themes\x\images ) folder.

you have to do the same for each theme.

I do not seem to have that code in my files

index.template.php:
Code: [Select]
<?php
// Version: 1.1 RC2; 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[&#39;linktree&#39;] 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 &#39;always&#39;, images from the default theme will be used.
if this is &#39;defaults&#39;, images from the default theme will only be used with default templates.
if this is &#39;never&#39; or isn&#39;t set at all, images from the default theme will not be used. */
$settings[&#39;use_default_images&#39;] = &#39;never&#39;;

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

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

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

// Show right to left and the character set for ease of translating.
echo &#39;<!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"&#39;, $context[&#39;right_to_left&#39;] ? &#39; dir="rtl"&#39; : &#39;&#39;, &#39;><head>
<meta http-equiv="Content-Type" content="text/html; charset=&#39;, $context[&#39;character_set&#39;], &#39;" />
<meta name="description" content="&#39;, $context[&#39;page_title&#39;], &#39;" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="&#39;, $settings[&#39;default_theme_url&#39;], &#39;/script.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "&#39;, $settings[&#39;theme_url&#39;], &#39;";
var smf_images_url = "&#39;, $settings[&#39;images_url&#39;], &#39;";
var smf_scripturl = "&#39;, $scripturl, &#39;";
var smf_session_id = "&#39;, $context[&#39;session_id&#39;], &#39;";
// ]]></script>
<title>&#39;, $context[&#39;page_title&#39;], &#39;</title>
<link rel="stylesheet" type="text/css" href="&#39;, $settings[&#39;theme_url&#39;], &#39;/style.css?rc1" />&#39;;

/* Internet Explorer 4/5 and Opera 6 just don&#39;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[&#39;browser&#39;][&#39;needs_size_fix&#39;])
echo &#39;
<link rel="stylesheet" type="text/css" href="&#39;, $settings[&#39;default_theme_url&#39;], &#39;/fonts-compat.css" />&#39;;

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

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

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

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

// Output any remaining HTML headers. (from mods, maybe?)
echo $context[&#39;html_headers&#39;], &#39;
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_sb = &#39;, empty($options[&#39;collapse_header_sb&#39;]) ? &#39;false&#39; : &#39;true&#39;, &#39;;

function shrinkHeaderSB(mode)
{&#39;;

if ($context[&#39;user&#39;][&#39;is_guest&#39;])
echo &#39;
document.cookie = "upshrinkSB=" + (mode ? 1 : 0);&#39;;
else
echo &#39;
smf_setThemeOption("collapse_header_sb", mode ? 1 : 0, null, "&#39;, $context[&#39;session_id&#39;], &#39;");&#39;;

echo &#39;
document.getElementById("upshrink_sb").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

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

current_header_sb = mode;
}
// ]]></script>
</head>
<body style="background-color: #f4f7fa;">&#39;;

// The logo, user information, news, and menu.
echo &#39;
<table cellspacing="0" cellpadding="0" border="0" align="center" width="990px" class="tborder">
   <tr style="background-color: #f3f4f5;">
<td valign="middle" align="left"><img src="&#39;, !empty($settings[&#39;header_logo_url&#39;]) ? $settings[&#39;header_logo_url&#39;] : $settings[&#39;images_url&#39;] . &#39;/logo.gif&#39;, &#39;" alt="" /></td>
<td valign="middle">&#39;;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context[&#39;user&#39;][&#39;is_logged&#39;])
{
echo &#39;
&#39;, $txt[&#39;hello_member&#39;], &#39; <b>&#39;, $context[&#39;user&#39;][&#39;name&#39;], &#39;</b>&#39;, $context[&#39;allow_pm&#39;] ? &#39;, &#39; . $txt[152] . &#39; <a href="&#39; . $scripturl . &#39;?action=pm">&#39; . $context[&#39;user&#39;][&#39;messages&#39;] . &#39; &#39; . ($context[&#39;user&#39;][&#39;messages&#39;] != 1 ? $txt[153] : $txt[471]) . &#39;</a>&#39; . $txt[&#39;newmessages4&#39;] . &#39; &#39; . $context[&#39;user&#39;][&#39;unread_messages&#39;] . &#39; &#39; . ($context[&#39;user&#39;][&#39;unread_messages&#39;] == 1 ? $txt[&#39;newmessages0&#39;] : $txt[&#39;newmessages1&#39;]) : &#39;&#39;, &#39;.&#39;;

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

// Is the forum in maintenance mode?
if ($context[&#39;in_maintenance&#39;] && $context[&#39;user&#39;][&#39;is_admin&#39;])
echo &#39;<br />
<b>&#39;, $txt[616], &#39;</b>&#39;;
}
// Otherwise they&#39;re a guest - so politely ask them to register or login.
else
echo &#39;
&#39;, $txt[&#39;welcome_guest&#39;];

echo &#39;
<br />&#39;, $context[&#39;current_time&#39;], &#39;
</td>
</tr>
<tr class="windowbg2">
<td colspan="2" valign="middle" align="center" class="tborder" style="border-width: 1px 0 0 0; font-size: smaller;">&#39;;

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

echo &#39;
</td>
</tr>&#39;;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings[&#39;enable_news&#39;]))
echo &#39;
<tr class="windowbg2">
<td colspan="2" height="24" class="tborder" style="border-width: 1px 0 0 0; padding-left: 1ex;">
<b>&#39;, $txt[102], &#39;:</b> &#39;, $context[&#39;random_news_line&#39;], &#39;
</td>
</tr>&#39;;

echo &#39;
</table>

<br />
<table cellspacing="0" cellpadding="10" border="0" align="center" width="990px" class="tborder">
<tr><td valign="top" style="background-color: #f3f4f5;">&#39;;
}

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

echo &#39;
</td></tr>
</table>&#39;;

// Show a vB style login for quick login?
if ($context[&#39;show_quick_login&#39;])
{
echo &#39;
<table cellspacing="0" cellpadding="0" border="0" align="center" width="990px">
<tr><td nowrap="nowrap" align="right">
<script language="JavaScript" type="text/javascript" src="&#39;, $settings[&#39;default_theme_url&#39;], &#39;/sha1.js"></script>

<form action="&#39;, $scripturl, &#39;?action=login2" method="post"&#39;, empty($context[&#39;disable_login_hashing&#39;]) ? &#39; onsubmit="hashLoginPassword(this);"&#39; : &#39;&#39;, &#39;><br />
<input type="text" name="user" size="7" />
<input type="password" name="passwrd" size="7" />
<select name="cookielength">
<option value="60">&#39;, $txt[&#39;smf53&#39;], &#39;</option>
<option value="1440">&#39;, $txt[&#39;smf47&#39;], &#39;</option>
<option value="10080">&#39;, $txt[&#39;smf48&#39;], &#39;</option>
<option value="302400">&#39;, $txt[&#39;smf49&#39;], &#39;</option>
<option value="-1" selected="selected">&#39;, $txt[&#39;smf50&#39;], &#39;</option>
</select>
<input type="submit" value="&#39;, $txt[34], &#39;" /><br />
&#39;, $txt[&#39;smf52&#39;], &#39;
<input type="hidden" name="hash_passwrd" value="" />
</form>
</td></tr>
</table>&#39;;
}

// Don&#39;t show a login box, just a break.
else
echo &#39;
<br />&#39;;

// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
echo &#39;
<br />

<table cellspacing="0" cellpadding="3" border="0" align="center" width="990px" class="tborder">
<tr style="background-color: #f3f4f5;">
<td width="28%" valign="middle" align="right">
<a href="http://www.mysql.com/" target="_blank"><img src="&#39;, $settings[&#39;images_url&#39;], &#39;/mysql.gif" alt="&#39;, $txt[&#39;powered_by_mysql&#39;], &#39;" width="88" height="31" border="0" /></a>
<a href="http://www.php.net/" target="_blank"><img src="&#39;, $settings[&#39;images_url&#39;], &#39;/php.gif" alt="&#39;, $txt[&#39;powered_by_php&#39;], &#39;" width="88" height="31" border="0" /></a>
</td>
<td width="44%" valign="middle" align="center">
&#39;, theme_copyright(), &#39;<br /><span style="font-size:11px;">SMF Theme &copy <a href="http://unstablefears.com" title="Download this theme and more!">Gaia</a></span>
</td>
<td width="28%" valign="middle" align="left">
<a href="http://validator.w3.org/check/referer" target="_blank"><img src="&#39;, $settings[&#39;images_url&#39;], &#39;/valid-xhtml10.gif" alt="&#39;, $txt[&#39;valid_xhtml&#39;], &#39;" width="88" height="31" border="0" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img src="&#39;, $settings[&#39;images_url&#39;], &#39;/valid-css.gif" alt="&#39;, $txt[&#39;valid_css&#39;], &#39;" width="88" height="31" border="0" /></a>
</td>
</tr>
</table>&#39;;

// Show the load time?
if ($context[&#39;show_load_time&#39;])
echo &#39;
<div align="center" class="smalltext">
&#39;, $txt[&#39;smf301&#39;], $context[&#39;load_time&#39;], $txt[&#39;smf302&#39;], $context[&#39;load_queries&#39;], $txt[&#39;smf302b&#39;], &#39;
</div>&#39;;

// And then we&#39;re done!
echo &#39;
</body>
</html>&#39;;
}

// 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 &#39;<span class="nav"&#39;, $settings[&#39;linktree_inline&#39;] ? &#39; style="font-size: smaller;"&#39; : &#39;&#39;, &#39;>&#39;;

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context[&#39;linktree&#39;] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings[&#39;linktree_inline&#39;])
{
if ($link_num > 0)
echo str_repeat(&#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/icons/linktree_main.gif" alt="| " border="0" />&#39;, $link_num - 1), &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/icons/linktree_side.gif" alt="|-" border="0" />&#39;;
echo &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/icons/folder_open.gif" alt="+" border="0" />&nbsp; &#39;;
}

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

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

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

// Don&#39;t show a separator for the last one.
if ($link_num != count($context[&#39;linktree&#39;]) - 1)
echo $settings[&#39;linktree_inline&#39;] ? &#39; &nbsp;|&nbsp; &#39; : &#39;<br />&#39;;
}

echo &#39;</span>&#39;;
}

// 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 &#39;
     
 <div class="normaltext">[ <a href="http://www.dreamcasthaven.com">Main</a> :: <a href="&#39;, $scripturl, &#39;">Home</a> :: <a href="http://www.BThaven.com">Torrents</a> :: <a href="&#39;, $scripturl, &#39;?action=help" target="_blank">Help</a> :: &#39;;
echo &#39;
<a href="&#39;, $scripturl, &#39;?action=arcade">Arcade</a>&#39;, $context[&#39;menu_separator&#39;];

// How about the [search] button?
if ($context[&#39;allow_search&#39;])
echo &#39;
:: <a href="&#39;, $scripturl, &#39;?action=search">Search</a> :: &#39;;

// Is the user allowed to administrate at all? ([admin])
if ($context[&#39;allow_admin&#39;])
echo &#39;
<a href="&#39;, $scripturl, &#39;?action=admin">Admin</a> :: &#39;;

// Edit Profile... [profile]
if ($context[&#39;allow_edit_profile&#39;])
echo &#39;
<a href="&#39;, $scripturl, &#39;?action=profile">Profile</a> :: &#39;;

echo &#39;<a href="../chatroom" target="_blank">Chat</a> :: &#39;, $context[&#39;menu_separator&#39;]; 
// The [calendar]!
if ($context[&#39;allow_calendar&#39;])
echo &#39;
<a href="&#39;, $scripturl, &#39;?action=calendar">Calendar</a> :: &#39;;

// If the user is a guest, show [login] and [register] buttons.
if ($context[&#39;user&#39;][&#39;is_guest&#39;])
{
echo &#39;
<a href="&#39;, $scripturl, &#39;?action=login">Login</a> :: <a href="&#39;, $scripturl, &#39;?action=register">Register</a> ]&#39;;
}
// Otherwise, they might want to [logout]...
else
echo &#39;
<a href="&#39;, $scripturl, &#39;?action=logout;sesc=&#39;, $context[&#39;session_id&#39;], &#39;">Logout</a> ]</div>&#39;;
}

?>




BoardIndex.template.php:
Code: [Select]
<?php

// Version: 1.1 RC2; 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 &#39;

<table width="100%" cellpadding="3" cellspacing="0">

<tr>

<td valign="bottom">&#39;, theme_linktree(), &#39;</td>

<td align="right">&#39;;

if (!$settings[&#39;show_sp1_info&#39;])

echo &#39;

&#39;, $txt[19], &#39;: &#39;, $context[&#39;common_stats&#39;][&#39;total_members&#39;], &#39; &nbsp;•&nbsp; &#39;, $txt[95], &#39;: &#39;, $context[&#39;common_stats&#39;][&#39;total_posts&#39;], &#39; &nbsp;•&nbsp; &#39;, $txt[64], &#39;: &#39;, $context[&#39;common_stats&#39;][&#39;total_topics&#39;], &#39;

&#39;, ($settings[&#39;show_latest_member&#39;] ? &#39;<br />&#39; . $txt[201] . &#39; <b>&#39; . $context[&#39;common_stats&#39;][&#39;latest_member&#39;][&#39;link&#39;] . &#39;</b>&#39; . $txt[581] : &#39;&#39;);

echo &#39;

</td>

</tr>

</
table>&#39;;



// Show the news fader?  (assuming there are things to show...)

if ($settings[&#39;show_newsfader&#39;] && !empty($context[&#39;fader_news_lines&#39;]))

{

echo &#39;

<div class="tborder" style="border-bottom: 0;">

<div class="titlebg" align="center" style="padding: 5px 5px 5px 5px;">&#39;, $txt[102], &#39;</div>

</div>

<
table border="0" width="100%" cellspacing="0" cellpadding="5" class="tborder" style="border-bottom: 0;">

<tr>

<td class="windowbg2" valign="middle" align="center" height="60">&#39;;



// Prepare all the javascript settings.

echo &#39;

<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>&#39;, $context[&#39;news_lines&#39;][0], &#39;</b></div>

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

// The fading delay (in ms.)

var smfFadeDelay = &#39;, empty($settings[&#39;newsfader_time&#39;]) ? 5000 : $settings[&#39;newsfader_time&#39;], &#39;;

// Fade from... what text color?  To which background color?

var smfFadeFrom = {"r"0"g"0"b"0}, smfFadeTo = {"r"248"g"248"b"248};

// Surround each item with... anything special?

var smfFadeBefore "<b>"smfFadeAfter "</b>";



if (typeof(document.getElementById(\&#39;smfFadeScroller\&#39;).currentStyle) != "undefined")

{

var foreColor document.getElementById(\&#39;smfFadeScroller\&#39;).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])};



var backEl document.getElementById(\&#39;smfFadeScroller\&#39;);

while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")

backEl backEl.parentNode;



var 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")

{

var foreColor document.defaultView.getComputedStyle(document.getElementById(\&#39;smfFadeScroller\&#39;), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);

smfFadeFrom = {"r"parseInt(foreColor[1]), "g"parseInt(foreColor[2]), "b"parseInt(foreColor[3])};



var backEl document.getElementById(\&#39;smfFadeScroller\&#39;);

while (document.defaultView.getComputedStyle(backElnull).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")

backEl backEl.parentNode;



var backColor document.defaultView.getComputedStyle(backElnull).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(

"&#39;, implode(&#39;",

"&#39;, $context[&#39;fader_news_lines&#39;]), &#39;"

);

// ]]></script>

<script language="JavaScript" type="text/javascript" src="&#39;, $settings[&#39;default_theme_url&#39;], &#39;/fader.js"></script>

</td>

</tr>

</table>&#39;;

}
// Show the "Board name      Topics  Posts    Last Post" header.

echo &#39;

<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">

<tr class="titlebg">

<td colspan="2">&#39;, $txt[20], &#39;</td>

<td width="6%" align="center">&#39;, $txt[330], &#39;</td>

<td width="6%" align="center">&#39;, $txt[21], &#39;</td>

<td width="22%" align="center">&#39;, $txt[22], &#39;</td>

</tr>&#39;;



/* 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 iamge),

and boards. (see below.) */

foreach ($context[&#39;categories&#39;] as $category)

{

// Show the category&#39;s name, and let them collapse it... if they feel like it.

echo &#39;

<tr>

<td colspan="5" class="catbg" height="18">&#39;;



// If this category even can collapse, show a link to collapse it.

if ($category[&#39;can_collapse&#39;])

echo &#39;

<a href="&#39;, $category[&#39;collapse_href&#39;], &#39;">&#39;, $category[&#39;collapse_image&#39;], &#39;</a>&#39;;



echo &#39;

&#39;, $category[&#39;link&#39;], &#39;

</td>

</tr>&#39;;



// Only if it&#39;s NOT collapsed..

if (!$category[&#39;is_collapsed&#39;])

{

/* Each board in each category&#39;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[&#39;boards&#39;] as $board)

{

echo &#39;

<tr>

<td class="windowbg" width="6%" align="center" valign="top"><img src="&#39;, $settings[&#39;images_url&#39;], $board[&#39;new&#39;] ? &#39;/on.gif" alt="&#39; . $txt[333] . &#39;" title="&#39; . $txt[333] : &#39;/off.gif" alt="&#39; . $txt[334] . &#39;" title="&#39; . $txt[334], &#39;" border="0" /></td>

<td class="windowbg2" align="left" width="60%">

<a name="b&#39;, $board[&#39;id&#39;], &#39;"></a>

<b>&#39;, $board[&#39;link&#39;], &#39;</b><br />

&#39;, $board[&#39;description&#39;];



// Show the "Moderators: ".  Each has name, href, link, and id. (but we&#39;re gonna use link_moderators.)

if (!empty($board[&#39;moderators&#39;]))

echo &#39;<i class="smalltext"><br />

&#39;, count($board[&#39;moderators&#39;]) == 1 ? $txt[298] : $txt[299], &#39;: &#39;, implode(&#39;, &#39;, $board[&#39;link_moderators&#39;]), &#39;</i>&#39;;



// Show the "Child Boards: ". (there&#39;s a link_children but we&#39;re going to bold the new ones...)

if (!empty($board[&#39;children&#39;]))

{

// Sort the links into an array with new boards bold so it can be imploded.

$children = array();

/* Each child in each board&#39;s children has:

id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */

foreach ($board[&#39;children&#39;] as $child)

$children[] = $child[&#39;new&#39;] ? &#39;<b>&#39; . $child[&#39;link&#39;] . &#39;</b>&#39; : $child[&#39;link&#39;];



echo &#39;

<i class="smalltext"><br />

&#39;, $txt[&#39;parent_boards&#39;], &#39;: &#39;, implode(&#39;, &#39;, $children), &#39;</i>&#39;;

}



echo &#39;

</td>

<td class="windowbg" valign="middle" align="center" width="6%">&#39;, $board[&#39;topics&#39;], &#39;</td>

<td class="windowbg" valign="middle" align="center" width="6%">&#39;, $board[&#39;posts&#39;], &#39;</td>&#39;;



/* The board&#39;s and children&#39;s &#39;last_post&#39;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.) */

echo &#39;

<td class="windowbg2" valign="middle" width="22%">

<span class="smalltext">

&#39;, $board[&#39;last_post&#39;][&#39;time&#39;], &#39;<br />

&#39;, $txt[&#39;smf88&#39;], &#39; &#39;, $board[&#39;last_post&#39;][&#39;link&#39;], &#39;<br />

&#39;, $txt[525], &#39; &#39;, $board[&#39;last_post&#39;][&#39;member&#39;][&#39;link&#39;], &#39;

</span>

</td>

</tr>&#39;;

}

}

}



// Show the "New Posts" and "No New Posts" legend.

if ($context[&#39;user&#39;][&#39;is_logged&#39;])

{

echo &#39;

<tr class="titlebg">

<td colspan="5" align="right" class="smalltext">&#39;;

// Show the mark all as read button?

if ($settings[&#39;show_mark_read&#39;])

echo &#39;

<a href="&#39;, $scripturl, &#39;?action=markasread;sa=all;sesc=&#39; . $context[&#39;session_id&#39;] . &#39;">&#39;, ($settings[&#39;use_image_buttons&#39;] ? &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/markread.gif" alt="&#39; . $txt[452] . &#39;" border="0" />&#39; : $txt[452]), &#39;</a>&#39;;

echo &#39;

</td>

</tr>&#39;;

}



echo &#39;

</table>&#39;;
echo &#39;
<br />&#39;;
  // display shoutbox
  if (function_exists(&#39;sbox&#39;)) sbox();
// Here&#39;s where the "Info Center" starts...
echo &#39;
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">

<tr class="titlebg">

<td align="center" colspan="2">&#39;, $txt[685], &#39;</td>

</tr>&#39;;



// This is the "Recent Posts" bar.

if (!empty($settings[&#39;number_recent_posts&#39;]))

{

echo &#39;

<tr>

<td class="catbg" colspan="2">&#39;, $txt[214], &#39;</td>

</tr>

<tr>

<td class="windowbg" width="20" valign="middle" align="center">

<a href="&#39;, $scripturl, &#39;?action=recent">

<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/post/xx.gif" alt="&#39;, $txt[214], &#39;" border="0" /></a>

</td>

<td class="windowbg2">&#39;;



// Only show one post.

if ($settings[&#39;number_recent_posts&#39;] == 1)

{

// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)

echo &#39;

<b><a href="&#39;, $scripturl, &#39;?action=recent">&#39;, $txt[214], &#39;</a></b><br />

<span class="smalltext">

&#39;, $txt[234], &#39; &quot;&#39;, $context[&#39;latest_post&#39;][&#39;link&#39;], &#39;&quot; &#39;, $txt[235], &#39; (&#39;, $context[&#39;latest_post&#39;][&#39;time&#39;], &#39;)<br />

</span>&#39;;

}

// Show lots of posts.

elseif (!empty($context[&#39;latest_posts&#39;]))

{

echo &#39;

<table width="100%" border="0">&#39;;

/* Each post in latest_posts has:

board (with an id, name, and link.), topic (the topic&#39;s id.), poster (with id, name, and link.),

subject, short_subject (shortened with...), time, link, and href. */

foreach ($context[&#39;latest_posts&#39;] as $post)

echo &#39;

<tr>

<td align="right" valign="top" nowrap="nowrap">[&#39;, $post[&#39;board&#39;][&#39;link&#39;], &#39;]</td>

<td valign="top">&#39;, $post[&#39;link&#39;], &#39; &#39;, $txt[525], &#39; &#39;, $post[&#39;poster&#39;][&#39;link&#39;], &#39;</td>

<td align="right" valign="top" nowrap="nowrap">&#39;, $post[&#39;time&#39;], &#39;</td>

</tr>&#39;;

echo &#39;

</table>&#39;;

}

echo &#39;

</td>

</tr>&#39;;

}



// Show information about events, birthdays, and holidays on the calendar.

if ($context[&#39;show_calendar&#39;])

{

echo &#39;

<tr>

<td class="catbg" colspan="2">&#39;, $context[&#39;calendar_only_today&#39;] ? $txt[&#39;calendar47b&#39;] : $txt[&#39;calendar47&#39;], &#39;</td>

</tr><tr>

<td class="windowbg" width="20" valign="middle" align="center">

<a href="&#39;, $scripturl, &#39;?action=calendar">

<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/calendar.gif" border="0" width="20" alt="&#39;, $txt[&#39;calendar24&#39;], &#39;" /></a>

</td>

<td class="windowbg2" width="100%">

<span class="smalltext">&#39;;



// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.

if (!empty($context[&#39;calendar_holidays&#39;]))

echo &#39;

<span style="color: #&#39;, $modSettings[&#39;cal_holidaycolor&#39;], &#39;;">&#39;, $txt[&#39;calendar5&#39;], &#39; &#39;, implode(&#39;, &#39;, $context[&#39;calendar_holidays&#39;]), &#39;</span><br />&#39;;



// People&#39;s birthdays.  Like mine.  And yours, I guess.  Kidding.

if (!empty($context[&#39;calendar_birthdays&#39;]))

{

echo &#39;

<span style="color: #&#39;, $modSettings[&#39;cal_bdaycolor&#39;], &#39;;">&#39;, $context[&#39;calendar_only_today&#39;] ? $txt[&#39;calendar3&#39;] : $txt[&#39;calendar3b&#39;], &#39;</span> &#39;;

/* 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[&#39;calendar_birthdays&#39;] as $member)

echo &#39;

<a href="&#39;, $scripturl, &#39;?action=profile;u=&#39;, $member[&#39;id&#39;], &#39;">&#39;, $member[&#39;is_today&#39;] ? &#39;<b>&#39; : &#39;&#39;, $member[&#39;name&#39;], $member[&#39;is_today&#39;] ? &#39;</b>&#39; : &#39;&#39;, isset($member[&#39;age&#39;]) ? &#39; (&#39; . $member[&#39;age&#39;] . &#39;)&#39; : &#39;&#39;, &#39;</a>&#39;, $member[&#39;is_last&#39;] ? &#39;<br />&#39; : &#39;, &#39;;

}

// Events like community get-togethers.

if (!empty($context[&#39;calendar_events&#39;]))

{

echo &#39;

<span style="color: #&#39;, $modSettings[&#39;cal_eventcolor&#39;], &#39;;">&#39;, $context[&#39;calendar_only_today&#39;] ? $txt[&#39;calendar4&#39;] : $txt[&#39;calendar4b&#39;], &#39;</span> &#39;;

/* Each event in calendar_events should have:

title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */

foreach ($context[&#39;calendar_events&#39;] as $event)

echo &#39;

&#39;, $event[&#39;can_edit&#39;] ? &#39;<a href="&#39; . $event[&#39;modify_href&#39;] . &#39;" style="color: #FF0000;">*</a> &#39; : &#39;&#39;, $event[&#39;href&#39;] == &#39;&#39; ? &#39;&#39; : &#39;<a href="&#39; . $event[&#39;href&#39;] . &#39;">&#39;, $event[&#39;is_today&#39;] ? &#39;<b>&#39; . $event[&#39;title&#39;] . &#39;</b>&#39; : $event[&#39;title&#39;], $event[&#39;href&#39;] == &#39;&#39; ? &#39;&#39; : &#39;</a>&#39;, $event[&#39;is_last&#39;] ? &#39;<br />&#39; : &#39;, &#39;;



// Show a little help text to help them along ;).

if ($context[&#39;calendar_can_edit&#39;])

echo &#39;

(<a href="&#39;, $scripturl, &#39;?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">&#39;, $txt[&#39;calendar_how_edit&#39;], &#39;</a>)&#39;;

}

echo &#39;

</span>

</td>

</tr>&#39;;

}



// Show a member bar.  Not heavily ornate, but functional at least.

if ($settings[&#39;show_member_bar&#39;])

{

echo &#39;

<tr>

<td class="catbg" colspan="2">&#39;, $txt[331], &#39;</td>

</tr>

<tr>

<td class="windowbg" width="20" valign="middle" align="center">

&#39;, $context[&#39;show_member_list&#39;] ? &#39;<a href="&#39; . $scripturl . &#39;?action=mlist">&#39; : &#39;&#39;, &#39;<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/members.gif" border="0" width="20" alt="&#39;, $txt[332], &#39;" />&#39;, $context[&#39;show_member_list&#39;] ? &#39;</a>&#39; : &#39;&#39;, &#39;

</td>

<td class="windowbg2" width="100%">

<b>&#39;, $context[&#39;show_member_list&#39;] ? &#39;<a href="&#39; . $scripturl . &#39;?action=mlist">&#39; . $txt[332] . &#39;</a>&#39; : $txt[332], &#39;</b><br />

<span class="smalltext">&#39;, $txt[200], &#39;</span>

</td>

</tr>&#39;;

}



// Show YaBB SP1 style information...

if ($settings[&#39;show_sp1_info&#39;])

{

echo &#39;

<tr>

<td class="catbg" colspan="2">&#39;, $txt[645], &#39;</td>

</tr>

<tr>

<td class="windowbg" width="20" valign="middle" align="center">

<a href="&#39;, $scripturl, &#39;?action=stats">

<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/info.gif" alt="&#39;, $txt[645], &#39;" border="0" /></a>

</td>

<td class="windowbg2" width="100%">

<table border="0" width="90%"><tr>

<td class="smalltext">

&#39;, $txt[490], &#39;: <b>&#39;, $context[&#39;common_stats&#39;][&#39;total_topics&#39;], &#39;</b> &nbsp;&nbsp;&nbsp;&nbsp; &#39;, $txt[489], &#39;: <b>&#39;, $context[&#39;common_stats&#39;][&#39;total_posts&#39;], &#39;</b><br />

&#39;, !empty($context[&#39;latest_post&#39;]) ? $txt[659] . &#39;:

&quot;&#39; . $context[&#39;latest_post&#39;][&#39;link&#39;] . &#39;&quot;  (&#39; . $context[&#39;latest_post&#39;][&#39;time&#39;] . &#39;)<br />&#39; : &#39;&#39;, &#39;

<a href="&#39;, $scripturl, &#39;?action=recent">&#39;, $txt[234], &#39;</a>&#39;, $context[&#39;show_stats&#39;] ? &#39;<br />

<a href="&#39; . $scripturl . &#39;?action=stats">&#39; . $txt[&#39;smf223&#39;] . &#39;</a>&#39; : &#39;&#39;, &#39;

</td>

<td class="smalltext">

&#39;, $txt[488], &#39;: <b>&#39;, $context[&#39;show_member_list&#39;] ? &#39;<a href="&#39; . $scripturl . &#39;?action=mlist">&#39; . $context[&#39;common_stats&#39;][&#39;total_members&#39;] . &#39;</a>&#39; : $context[&#39;common_stats&#39;][&#39;total_members&#39;], &#39;</b><br />

&#39;, $txt[656], &#39;: <b>&#39;, $context[&#39;common_stats&#39;][&#39;latest_member&#39;][&#39;link&#39;], &#39;</b><br />&#39;;

// If they are logged in, show their unread message count, etc..

if ($context[&#39;user&#39;][&#39;is_logged&#39;] && $context[&#39;allow_pm&#39;])

echo &#39;

&#39;, $txt[&#39;smf199&#39;], &#39;: <b><a href="&#39;, $scripturl, &#39;?action=pm">&#39;, $context[&#39;user&#39;][&#39;messages&#39;], &#39;</a></b> &#39;, $txt[&#39;newmessages3&#39;], &#39;: <b><a href="&#39;, $scripturl, &#39;?action=pm">&#39;, $context[&#39;user&#39;][&#39;unread_messages&#39;], &#39;</a></b>&#39;;

echo &#39;

</td>

</tr></table>

</td>

</tr>&#39;;

}



// "Users online" - in order of activity.

echo &#39;

<tr>

<td class="catbg" colspan="2">&#39;, $txt[158], &#39;</td>

</tr><tr>

<td class="windowbg" width="20" valign="middle" align="center">

&#39;, $context[&#39;show_who&#39;] ? &#39;<a href="&#39; . $scripturl . &#39;?action=who">&#39; : &#39;&#39;, &#39;<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/online.gif" alt="&#39;, $txt[158], &#39;" border="0" />&#39;, $context[&#39;show_who&#39;] ? &#39;</a>&#39; : &#39;&#39;, &#39;

</td>

<td class="windowbg2" width="100%">&#39;;



if ($context[&#39;show_who&#39;])

echo &#39;

<a href="&#39;, $scripturl, &#39;?action=who">&#39;;



echo $context[&#39;num_guests&#39;], &#39; &#39;, $context[&#39;num_guests&#39;] == 1 ? $txt[&#39;guest&#39;] : $txt[&#39;guests&#39;], &#39;, &#39; . $context[&#39;num_users_online&#39;], &#39; &#39;, $context[&#39;num_users_online&#39;] == 1 ? $txt[&#39;user&#39;] : $txt[&#39;users&#39;];



// Handle hidden users and buddies.

if (!empty($context[&#39;num_users_hidden&#39;]) || ($context[&#39;show_buddies&#39;] && !empty($context[&#39;show_buddies&#39;])))

{

echo &#39; (&#39;;



// Show the number of buddies online?

if ($context[&#39;show_buddies&#39;])

echo $context[&#39;num_buddies&#39;], &#39; &#39;, $context[&#39;num_buddies&#39;] == 1 ? $txt[&#39;buddy&#39;] : $txt[&#39;buddies&#39;];



// How about hidden users?

if (!empty($context[&#39;num_users_hidden&#39;]))

echo $context[&#39;show_buddies&#39;] ? &#39;, &#39; : &#39;&#39;, $context[&#39;num_users_hidden&#39;] . &#39; &#39; . $txt[&#39;hidden&#39;];



echo &#39;)&#39;;

}



if ($context[&#39;show_who&#39;])

echo &#39;</a>&#39;;



echo &#39;

<span class="smalltext">&#39;;



// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.

if (!empty($context[&#39;users_online&#39;]))

echo &#39;

&#39;, $txt[140], &#39;:<br />&#39;, implode(&#39;, &#39;, $context[&#39;list_users_online&#39;]);
// Users online today

echo &#39;
<tr>
<td class="catbg" colspan="2">&#39;, $txt[&#39;uot_users_online_today_title&#39;], &#39;</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/online.gif" alt="&#39;, $txt[158], &#39; &#39;, $txt[&#39;uot_users_online_today_title&#39;], &#39;" border="0" />
</td>
<td class="windowbg2" width="100%">&#39;;

echo &#39;
<div class="smalltext">&#39;;

  echo $txt[&#39;uot_total&#39;], &#39;: <b>&#39;, $context[&#39;num_users_online_today&#39;], &#39;</b>&#39;;
  if (!$context[&#39;user&#39;][&#39;is_guest&#39;])
   echo &#39; (&#39;, $txt[&#39;uot_visible&#39;], &#39;: &#39;, ($context[&#39;num_users_online_today&#39;] - $context[&#39;num_hidden_users_online_today&#39;]), &#39;, &#39;, $txt[&#39;uot_hidden&#39;], &#39;: &#39;, $context[&#39;num_hidden_users_online_today&#39;], &#39;)&#39;;

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context[&#39;users_online_today&#39;]) && !$context[&#39;user&#39;][&#39;is_guest&#39;])
echo &#39;<br />&#39;, implode(&#39;, &#39;, $context[&#39;list_users_online_today&#39;]);

echo &#39;
<br />&#39;, $context[&#39;show_stats&#39;] && !$settings[&#39;show_sp1_info&#39;] ? &#39;
<a href="&#39; . $scripturl . &#39;?action=stats">&#39; . $txt[&#39;smf223&#39;] . &#39;</a>&#39; : &#39;&#39;, &#39;
</div>
</td>
</tr>&#39;;
echo &#39;

<br />&#39;, $context[&#39;show_stats&#39;] && !$settings[&#39;show_sp1_info&#39;] ? &#39;

<a href="&#39; . $scripturl . &#39;?action=stats">&#39; . $txt[&#39;smf223&#39;] . &#39;</a>&#39; : &#39;&#39;, &#39;

</span>

</td>

</tr>&#39;;



// If they are logged in, but SP1 style information is off... show a personal message bar.

if ($context[&#39;user&#39;][&#39;is_logged&#39;] && !$settings[&#39;show_sp1_info&#39;])

{

echo &#39;

<tr>

<td class="catbg" colspan="2">&#39;, $txt[159], &#39;</td>

</tr><tr>

<td class="windowbg" width="20" valign="middle" align="center">

&#39;, $context[&#39;allow_pm&#39;] ? &#39;<a href="&#39; . $scripturl . &#39;?action=pm">&#39; : &#39;&#39;, &#39;<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/message_sm.gif" alt="&#39;, $txt[159], &#39;" border="0" />&#39;, $context[&#39;allow_pm&#39;] ? &#39;</a>&#39; : &#39;&#39;, &#39;

</td>

<td class="windowbg2" valign="top">

<b><a href="&#39;, $scripturl, &#39;?action=pm">&#39;, $txt[159], &#39;</a></b><br />

<span class="smalltext">

&#39;, $txt[660], &#39; &#39;, $context[&#39;user&#39;][&#39;messages&#39;], &#39; &#39;, $context[&#39;user&#39;][&#39;messages&#39;] == 1 ? $txt[471] : $txt[153], &#39;.... &#39;, $txt[661], $context[&#39;allow_pm&#39;] ? &#39; <a href="&#39; . $scripturl . &#39;?action=pm">&#39; . $txt[662] . &#39;</a>&#39; : &#39;&#39;, &#39; &#39;, $txt[663], &#39;

</span>

</td>

</tr>&#39;;

}



// Show the login bar. (it&#39;s only true if they are logged out anyway.)

if ($context[&#39;show_login_bar&#39;])

{

echo &#39;

<tr>

<td class="catbg" colspan="2">

&#39;, $txt[34], &#39; <a href="&#39;, $scripturl, &#39;?action=reminder" class="smalltext">(&#39; . $txt[315] . &#39;)</a>

</td>

</tr>

<tr>

<td class="windowbg" width="20" align="center">

<a href="&#39;, $scripturl, &#39;?action=login">

<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/login.gif" alt="&#39;, $txt[34], &#39;" border="0" /></a>

</td>

<td class="windowbg2" valign="middle">

<form action="&#39;, $scripturl, &#39;?action=login2" method="post" style="margin: 0;">

<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>

<td valign="middle" align="left">

<label for="user"><b>&#39;, $txt[35], &#39;:</b><br /><input type="text" name="user" id="user" size="15" /></label>

</td>

<td valign="middle" align="left">

<label for="passwrd"><b>&#39;, $txt[36], &#39;:</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>

</td>

<td valign="middle" align="left">

<label for="cookielength"><b>&#39;, $txt[497], &#39;:</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="&#39;, $modSettings[&#39;cookieTime&#39;], &#39;" /></label>

</td>

<td valign="middle" align="left">

<label for="cookieneverexp"><b>&#39;, $txt[508], &#39;:</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>

</td>

<td valign="middle" align="left">

<input type="submit" value="&#39;, $txt[34], &#39;" />

</td>

</tr></table>

</form>

</td>

</tr>&#39;;

}



echo &#39;

</table>&#39;;

}



?>




where should i add this code??
www.dreamcasthaven.com <----- Running SMF 1.1.16 & heavily modified
www.psxhaven.com <----- Running SMF 1.1.16 & heavily modified
www.romhaven.info <----- Running SMF 1.1.16 & heavily modified
www.bthaven.com <----- Running TT 2.06

Offline husmen73 (Gulhin)

  • SMF Hero
  • ******
  • Posts: 3,687
  • Gender: Male
  • Bana ulaşmak için lütfen e-posta gönderin.
    • Gülhin İnternet
Re: Default Avatar?
« Reply #19 on: June 27, 2006, 09:44:28 AM »
This is mod for all versions :)
Download New Link---> http://www.smfturk.net/forum/mods/otoavatar_v2_eng.zip  (27.12.2006)
Thanks Alexandre P. ;)
« Last Edit: December 26, 2006, 09:52:29 PM by husmen73 (Red and Nos Themes) »
-Kurumsal Kimlik Web Tasarım Hizmeti.
Gülhin Portal Sistemi hakkında yorumlarınızı bekliyorum.
SMF
Referanslar --> http://www.gulhin.com/referanslar-portfoy/
-Web Tasarımı ve Tema Tasarımı Sitesi www.gulhin.com
-TOPLU MAİL GÖNDERİMİ --> http://www.toplumailsms.com
E-Ticaret Sistemi yaptırmak mı istiyorsunuz?