Link to the mod (https://custom.simplemachines.org/index.php?mod=1388)
(https://smftricks.com/logos/logo.png) (https://smftricks.com/)
(https://img.shields.io/badge/License-Apache%202.0-a05a3f?style=flat-square) (https://img.shields.io/badge/SMF-2.1-3f73a0?style=flat-square)
Custom GreetingDeveloped by Diego Andrés (https://smftricks.com/index.php?action=profile;u=1)
Original author: Marcus Forsberg (https://www.simplemachines.org/community/index.php?action=profile;u=143954)
IntroductionCustom Greeting mod allows you set a greeting message for the user depending on the time of the day.
Features- Set different greeting messages for differen times of the day
Languages(https://www.simplemachines.org/site_images/lang/english.gif)
Changelog (https://smftricks.com/index.php?topic=2207.0)GitHub (https://github.com/SMFTricks/Custom-Greeting)
Cool! :D
Thank's mate! :D
Well done on the new mod , lets see when we can make more changes to th welcome messages to personal messages to suite your forum needs
Glad you like it, chrisb.
Yes, a mod allowing you to choose the messages your self would be good.
Don't know if I'm skilled enough to do it though. :D
Thank you for the very cool mod......I love it!
I'm guessing the times are based off the servers time, because mine was saying good afternoon at 11:00am my time?
I'm using smf 1.1.6 and keep getting this error:
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Anyone else having this problem?
Quote from: Cobra97 on September 08, 2008, 02:01:52 PM
Thank you for the very cool mod......I love it!
I'm guessing the times are based off the servers time, because mine was saying good afternoon at 11:00am my time?
Yes, so they are. I'm working on this.
Quote from: tampaba1 on September 08, 2008, 02:20:12 PM
I'm using smf 1.1.6 and keep getting this error:
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Anyone else having this problem?
hmm.. I'll have a look at that.
tampaba1: I tried to install the package on a fresh installation of 1.1.6 and it worked fine.
Don't know why you have this problem.
Could you attach your index.template.php file (you find it in the folder themes/defualt/) so that I can install it manually for you?
Great mod. Pretty sure you are looking for other languages, so here's my contribution:
brazilian-utf8:
12:00am - 5:59am - "Boa madrugada"
6:00am - 6:59am - "Já tão cedo?"
7:00 - 11:59am will display "Bom dia"
12:00pm - 5:59pm will display "Boa tarde"
6:00pm - 9:59pm will display "Boa noite"
10:00pm - 11:59pm will display "Você não deveria ir dormir?"
brazilian:
12:00am - 5:59am - "Boa madrugada"
6:00am - 6:59am - "Já tão cedo?"
7:00 - 11:59am will display "Bom dia"
12:00pm - 5:59pm will display "Boa tarde"
6:00pm - 9:59pm will display "Boa noite"
10:00pm - 11:59pm will display "Você não deveria ir dormir?"
Glad you like my mod and thank's for the translation, softcore.
I'll add it to the package when I have a bit more time.
just added the mod and it closes browser when i try to log in is there anyway of removing it without loggin in
hmm... Closes browser?
What browser do you use?
Yes, you can remove it whitout logging in.
Log in to your filemanager and find Themes/Default/index.template.php
Backup file first.
Then find this:
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;">';
// Start CGDT Mod by Nascar
$date = date('H');
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
And replace whit:
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
browser used was internet explorer so i tried firefox and its doing the same thing i will try to remove it with your method now
still cant get logged in the logged in! the input box appears for an instant and disappears i have tried replacing my index.template.php for the index.template.php~ but still the same
just tried on an other laptop and i can log in fine yet the original laptop still wont let me log in and the browser just shuts in both ie and firefox
Quote from: Nascar on September 08, 2008, 02:48:06 PM
tampaba1: I tried to install the package on a fresh installation of 1.1.6 and it worked fine.
Don't know why you have this problem.
Could you attach your index.template.php file (you find it in the folder themes/defualt/) so that I can install it manually for you?
Here's my index.template.php file. Anything you can do will be appreciated. Thanks Nascar.
<?php
// Version: 1.1; index
/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.
The init sub template should load any data and set any hardcoded options.
The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.
The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.
The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.
The menu sub template should display all the relevant buttons the user
wants and or needs.
For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/
// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;
/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';
/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
/* Show sticky and lock status seperate from topic icons? Leave true, icons don't exist for false.*/
$settings['seperate_sticky_lock'] = true;
/* Load the custom language template for this theme. */
loadLanguage('ThemeStrings');
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
<script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/dropdown.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "', $context['character_set'], '";
// ]]></script>
<title>', $context['page_title'], '</title>';
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>';
// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
</head>
<body>
<a name="top"></a>';
//These wrap the entire forum, do not remove or change.
echo '
<div align="center">
<div class="widthControl">';
// This is the main header.
echo '
<div class="header">
<div class="tpl-topleft">
<div class="tpl-topright">
<div class="tpl-topcenter">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td width="148" height="60"><img src="', $settings['images_url'], '/blank.gif" width="148" height="60" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
</tr>
</table>
<div class="tpl-ventleft">
<div class="tpl-ventright" style="text-align:center;">';
if (empty($settings['header_logo_url']))
{
echo '
<img src="', $settings['images_url'], '/new_damage_logo.gif" alt="" />';
}
else
{
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'],'" />';
}
echo '
</div>
</div>
</div>
</div>
</div>
</div>';
// Lets start the menu.
echo '
<div class="menubg">
<div class="menubg-right" style="padding-left:20px;">';
// Show the menu here, according to the menu sub template.
template_menu();
echo '
</div>
</div>';
// End of the menu.
// Lets put that block under the menu now.
echo '
<div class="tpl-menubottombg">
<div class="tpl-menubottom">
<!-- /-->
</div>
</div>';
// The end of the main header!
// Lets wrap the rest so we can have a solid bg for the forum.
echo '
<div class="forumbody">';
echo '
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td align="left" valign="middle" class="largetext">
', $context['forum_name'], '
</td>';
// How about the search box?
if ($context['allow_search'])
{
echo '
<td align="right" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="right" valign="top" nowrap="nowrap">';
echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;vertical-align:middle;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle">
<input type="text" name="search" onblur="if(this.value==\'\') this.value=\'Search...\';" onfocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." class="search-input" /></td>
<td valign="middle" style="padding-left:5px;">
<input type="image" name="submit" src="', $settings['images_url'], '/search_button.gif" style="background-color: transparent;border:0px;" /></td>
</tr>
<tr>
<td colspan="2" height="20" align="center" valign="middle"><a class="smalltext" href="', $scripturl, '?action=search;advanced">', $txt['search_advanced'], '</a></td>
</tr>
</table>
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>
</td>';
}
echo '
</tr>
</table>
</td>
</tr>
</table>';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];
// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="100%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
</tr>
</table>
</div>';
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td colspan="3" class="smalltext" align="center"><a href="http://www.webtechnica.net/" target="_blank"><img src="http://www.webtechnica.net/images/themeby_white.gif" alt="', $txt['theme_by'], ' Webtechnica.net" title="', $txt['theme_by'], ' Webtechnica.net" /></a></td>
</tr>
<tr>
<td width="28%" valign="middle" class="smalltext" align="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com/" target="_blank">MySQL</a>
<a href="http://www.php.net/" target="_blank">PHP</a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<a href="http://validator.w3.org/check/referer" target="_blank">XHTML 1.0</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank">CSS</a>
</td>
</tr>
</table>';
// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';
// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';
// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}';
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}';
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}
if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}';
echo '
// ]]></script>';
}
// Ends the footer wrapper.
echo '
</div>';
// End the forumbody wrapper.
echo '
</div>';
// Lets make the template footer.
echo '
<div class="tpl-footer">
<div class="tpl-bottomleft">
<div class="tpl-bottomright" style="text-align:center;">
<img src="', $settings['images_url'], '/tpl_bottomcenter.jpg" alt="*" />
</div>
</div>
</div>';
// Lets end those two wrappers!
echo '
</div>
</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>';
//End the body.
echo '
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="tborder" style="margin:2ex 1px 2ex 1px;"><div class="nav-tree">';
// 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'] . '">' . $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 ' <span style="font-weight:bold;color:#ffffff;">»</span> ';
}
echo '</div></div>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}
// Start the main menu.
echo '
<ul class="mainnav">';
// Show the [home] button.
echo '
<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Show the [forum] button.
echo '
<li><a href="', $scripturl, '?action=forum">FORUM</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Show the [help] button.
echo '
<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '
<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '
<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '
<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '
<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '
<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '
<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '
<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// The end of the main menu.
echo '
</ul>';
}
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
if (empty($button_strip))
return '';
// 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'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';
$button_strip[$key] = $buttons[$key];
}
echo '
<td height="40" valign="middle" ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}
// Generate a strip of buttons.
function TEXTLINKS_template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return '<td> </td>';
echo '
<td class="maintab_back">', implode('', $button_strip) , '</td>';
}
?>
Very cool mod. It works just fine on default theme but i dont use it. I use a custom theme. However i tried to upload it to the SMF package parser but it comes back with errors. Therefore i cannot edit the custom theme.
Use the parser on the mod page [HERE] (http://custom.simplemachines.org/mods/index.php?mod=1388)
It is to the right where it says "Download this mod"
Use the drop down to select your version, then click submit.
With the site parser, you will have to copy it into your template, line by line.
It takes a little longer, but still effective.
Luckily it is only your index.template that needs modification lol unless your theme has its own language files.
You could also try copying the added code from your default index template ;)
Good luck :)
Very Nice and Simple Mod.
Thank's everyone for your comments.
If you want installation help for any coustom theme, just ask me.
motlow:
I just can't understand why this is happening to you.
tampaba1:
Try the index.tempalte.php below.
I haven't had tome to test it, so backup your original file first.
Also, I forgot asking you for your Modifications.LANGUAGE.php. ehehe.
I need it to install it for you ;)
<?php
// Version: 1.1; index
/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.
The init sub template should load any data and set any hardcoded options.
The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.
The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.
The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.
The menu sub template should display all the relevant buttons the user
wants and or needs.
For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/
// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;
/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';
/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
/* Show sticky and lock status seperate from topic icons? Leave true, icons don't exist for false.*/
$settings['seperate_sticky_lock'] = true;
/* Load the custom language template for this theme. */
loadLanguage('ThemeStrings');
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
<script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/dropdown.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "', $context['character_set'], '";
// ]]></script>
<title>', $context['page_title'], '</title>';
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>';
// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
</head>
<body>
<a name="top"></a>';
//These wrap the entire forum, do not remove or change.
echo '
<div align="center">
<div class="widthControl">';
// This is the main header.
echo '
<div class="header">
<div class="tpl-topleft">
<div class="tpl-topright">
<div class="tpl-topcenter">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="right" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td width="148" height="60"><img src="', $settings['images_url'], '/blank.gif" width="148" height="60" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
<td align="left" valign="bottom" height="60"><img src="', $settings['images_url'], '/tpl_toplight.jpg" alt="*" /></td>
</tr>
</table>
<div class="tpl-ventleft">
<div class="tpl-ventright" style="text-align:center;">';
if (empty($settings['header_logo_url']))
{
echo '
<img src="', $settings['images_url'], '/new_damage_logo.gif" alt="" />';
}
else
{
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'],'" />';
}
echo '
</div>
</div>
</div>
</div>
</div>
</div>';
// Lets start the menu.
echo '
<div class="menubg">
<div class="menubg-right" style="padding-left:20px;">';
// Show the menu here, according to the menu sub template.
template_menu();
echo '
</div>
</div>';
// End of the menu.
// Lets put that block under the menu now.
echo '
<div class="tpl-menubottombg">
<div class="tpl-menubottom">
<!-- /-->
</div>
</div>';
// The end of the main header!
// Lets wrap the rest so we can have a solid bg for the forum.
echo '
<div class="forumbody">';
echo '
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td align="left" valign="middle" class="largetext">
', $context['forum_name'], '
</td>';
// How about the search box?
if ($context['allow_search'])
{
echo '
<td align="right" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="right" valign="top" nowrap="nowrap">';
echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;vertical-align:middle;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle">
<input type="text" name="search" onblur="if(this.value==\'\') this.value=\'Search...\';" onfocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." class="search-input" /></td>
<td valign="middle" style="padding-left:5px;">
<input type="image" name="submit" src="', $settings['images_url'], '/search_button.gif" style="background-color: transparent;border:0px;" /></td>
</tr>
<tr>
<td colspan="2" height="20" align="center" valign="middle"><a class="smalltext" href="', $scripturl, '?action=search;advanced">', $txt['search_advanced'], '</a></td>
</tr>
</table>
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>
</td>';
}
echo '
</tr>
</table>
</td>
</tr>
</table>';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;">';
// Start CGDT Mod by Nascar
$date = date('H');
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];
// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="100%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
</tr>
</table>
</div>';
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td colspan="3" class="smalltext" align="center"><a href="http://www.webtechnica.net/" target="_blank"><img src="http://www.webtechnica.net/images/themeby_white.gif" alt="', $txt['theme_by'], ' Webtechnica.net" title="', $txt['theme_by'], ' Webtechnica.net" /></a></td>
</tr>
<tr>
<td width="28%" valign="middle" class="smalltext" align="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com/" target="_blank">MySQL</a>
<a href="http://www.php.net/" target="_blank">PHP</a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<a href="http://validator.w3.org/check/referer" target="_blank">XHTML 1.0</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank">CSS</a>
</td>
</tr>
</table>';
// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';
// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';
// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}';
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}';
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}
if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}';
echo '
// ]]></script>';
}
// Ends the footer wrapper.
echo '
</div>';
// End the forumbody wrapper.
echo '
</div>';
// Lets make the template footer.
echo '
<div class="tpl-footer">
<div class="tpl-bottomleft">
<div class="tpl-bottomright" style="text-align:center;">
<img src="', $settings['images_url'], '/tpl_bottomcenter.jpg" alt="*" />
</div>
</div>
</div>';
// Lets end those two wrappers!
echo '
</div>
</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>';
//End the body.
echo '
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="tborder" style="margin:2ex 1px 2ex 1px;"><div class="nav-tree">';
// 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'] . '">' . $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 ' <span style="font-weight:bold;color:#ffffff;">»</span> ';
}
echo '</div></div>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}
// Start the main menu.
echo '
<ul class="mainnav">';
// Show the [home] button.
echo '
<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Show the [forum] button.
echo '
<li><a href="', $scripturl, '?action=forum">FORUM</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Show the [help] button.
echo '
<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '
<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '
<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '
<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '
<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '
<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '
<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '
<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>
<li class="mainnavDivider"><!-- /--></li>';
// The end of the main menu.
echo '
</ul>';
}
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
if (empty($button_strip))
return '';
// 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'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';
$button_strip[$key] = $buttons[$key];
}
echo '
<td height="40" valign="middle" ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}
// Generate a strip of buttons.
function TEXTLINKS_template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return '<td> </td>';
echo '
<td class="maintab_back">', implode('', $button_strip) , '</td>';
}
?>
Here you go Nascar, I hope this is the right file. Thanks again.
<?php
// Version: 1.1; Modifications
//Begin the custom template text strings.
$txt['topic_tools'] = 'Topic Tools';
$txt['theme_by'] = 'Theme by';
$txt['poll_results'] = 'Poll Results';
$txt['poll_options'] = 'Poll Options';
$txt['post_read'] = 'Read';
$txt['post_new'] = 'New';
$txt['view'] = 'View';
$txt['public_profile'] = '&#039;s public profile.';
$txt['visit'] = 'Visit';
$txt['members_website'] = '&#039;s website.';
$txt['send'] = 'Send';
$txt['an_email'] = 'an email.';
$txt['private_message'] = 'a private message.';
$txt['show'] = 'Show';
$txt['last_post'] = '&#039;s last posts.';
$txt['show_genstats'] = 'Show general stats for';
$txt['warn_moderator'] = 'Warn Moderator about this post.';
$txt['board_forum'] = 'Forum';
$txt['board_lastpost'] = 'Last Post';
$txt['board_threads'] = 'Threads';
$txt['board_posts'] = 'Posts';
$txt['board_in'] = 'In';
$txt['board_by'] = 'By';
$txt['goto_lastpost'] = 'Go to last post.';
$txt['board_markread'] = 'Mark Boards Read';
$txt['board_nonewposts'] = 'No New Posts';
$txt['board_newposts'] = 'New Posts in Board';
$txt['board_newchild'] = 'New Posts in Child Board';
$txt['board_options'] = 'Options';
$txt['quick_search'] = 'Quick Search';
$txt['search_advanced'] = 'Advanced Search';
$txt['close'] = 'Close';
$txt['quick_links'] = 'Quick Links';
$txt['new_posts'] = 'New Posts';
$txt['new_replies'] = 'New Replies';
$txt['user_settings'] = 'User Settings';
$txt['view_profile'] = 'View Profile';
$txt['account_settings'] = 'Account Settings';
$txt['edit_profile'] = 'Edit Profile';
$txt['preferences'] = 'Preferences';
$txt['whos_online'] = 'Who\'s Online';
$txt['search_go'] = 'GO';
//Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff List';
$txt['smfstaff_local'] = 'Local Moderators';
$txt['permissionname_view_stafflist'] = 'View Staff List';
$txt['permissionhelp_view_stafflist'] = 'Staff List shows all members on your Staff. You can change which member groups are shown by going to Layout and Options and look for SMF Staff filter. This permission allows you to toggle who can view the staff list.';
$txt['cannot_view_stafflist'] = 'You can not view the staff list.';
$txt['smfstaff_lastlogin'] = 'Last Active:';
$txt['smfstaff_forums'] = 'Forums:';
$txt['smfstaff_dateregistered'] = 'Date Registered:';
$txt['smfstaff_contact'] = 'Contact Information:';
$txt['smfstaff_sendpm'] = 'Send PM';
$txt['staff_filter'] = 'SMF Staff - Filter groups on staff page. <br />(seperate each group name by a <b>comma</b>.)';
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
$txt['topics_started_by_this_user'] = 'topics started by this user';
$txt['started_by_this_u'] = 'Show the posts started by this member.';
$txt['showPostsini'] = 'Show Posts Started';
$txt['started_by_this_u'] = 'Show the posts started by this member.';
?>
Thank's, here it is!
Hope the mod works now, and feel free to come back if you have any further issues.
<?php
// Version: 1.1; Modifications
//Begin the custom template text strings.
$txt['topic_tools'] = 'Topic Tools';
$txt['theme_by'] = 'Theme by';
$txt['poll_results'] = 'Poll Results';
$txt['poll_options'] = 'Poll Options';
$txt['post_read'] = 'Read';
$txt['post_new'] = 'New';
$txt['view'] = 'View';
$txt['public_profile'] = '&#38;#039;s public profile.';
$txt['visit'] = 'Visit';
$txt['members_website'] = '&#38;#039;s website.';
$txt['send'] = 'Send';
$txt['an_email'] = 'an email.';
$txt['private_message'] = 'a private message.';
$txt['show'] = 'Show';
$txt['last_post'] = '&#38;#039;s last posts.';
$txt['show_genstats'] = 'Show general stats for';
$txt['warn_moderator'] = 'Warn Moderator about this post.';
$txt['board_forum'] = 'Forum';
$txt['board_lastpost'] = 'Last Post';
$txt['board_threads'] = 'Threads';
$txt['board_posts'] = 'Posts';
$txt['board_in'] = 'In';
$txt['board_by'] = 'By';
$txt['goto_lastpost'] = 'Go to last post.';
$txt['board_markread'] = 'Mark Boards Read';
$txt['board_nonewposts'] = 'No New Posts';
$txt['board_newposts'] = 'New Posts in Board';
$txt['board_newchild'] = 'New Posts in Child Board';
$txt['board_options'] = 'Options';
$txt['quick_search'] = 'Quick Search';
$txt['search_advanced'] = 'Advanced Search';
$txt['close'] = 'Close';
$txt['quick_links'] = 'Quick Links';
$txt['new_posts'] = 'New Posts';
$txt['new_replies'] = 'New Replies';
$txt['user_settings'] = 'User Settings';
$txt['view_profile'] = 'View Profile';
$txt['account_settings'] = 'Account Settings';
$txt['edit_profile'] = 'Edit Profile';
$txt['preferences'] = 'Preferences';
$txt['whos_online'] = 'Who\'s Online';
$txt['search_go'] = 'GO';
//Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff List';
$txt['smfstaff_local'] = 'Local Moderators';
$txt['permissionname_view_stafflist'] = 'View Staff List';
$txt['permissionhelp_view_stafflist'] = 'Staff List shows all members on your Staff. You can change which member groups are shown by going to Layout and Options and look for SMF Staff filter. This permission allows you to toggle who can view the staff list.';
$txt['cannot_view_stafflist'] = 'You can not view the staff list.';
$txt['smfstaff_lastlogin'] = 'Last Active:';
$txt['smfstaff_forums'] = 'Forums:';
$txt['smfstaff_dateregistered'] = 'Date Registered:';
$txt['smfstaff_contact'] = 'Contact Information:';
$txt['smfstaff_sendpm'] = 'Send PM';
$txt['staff_filter'] = 'SMF Staff - Filter groups on staff page. <br />(seperate each group name by a <b>comma</b>.)';
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
$txt['topics_started_by_this_user'] = 'topics started by this user';
$txt['started_by_this_u'] = 'Show the posts started by this member.';
$txt['showPostsini'] = 'Show Posts Started';
$txt['started_by_this_u'] = 'Show the posts started by this member.';
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'Up Late Aren\'t We';
$txt['are_you_the_early_bird'] = 'Are you the early bird';
$txt['good_morning'] = 'Good Morning';
$txt['good_afternoon'] = 'Good Afternoon';
$txt['good_evening'] = 'Good Evening';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Shouldn\'t You Be Going To Bed Soon';
// End CGDT Mod by Nascar
?>
Thanks Nascar, appreciate all your hard work.
No problem ;)
I like helping people, and I like coding. This is both of them in one :D
I applied both files and now where it used to say "Hello, Member" it says ", Member". The "Hello" part is gone.
What did I do wrong?
hmm.. Did you save the the Modifications.english.php on the right place?
I just replaced the one I posted with the one you updated so, I believe it's right.
EDIT: I got it now. I replaced the wrong language file. Duh,lol.
Thanks again for all your help.
All is fine but just the problem is that the time factor.
at noon 12.00 it gives messages of the night 12.00
say when the message should be "Good afternoon" it says "Up Late Aren't We"
How to edit that problem.
I am from India. and use 1.1.6 smf
I've noticed that, santanu.
I'm working on it.
I use dilbermc and the details you write for my index.template.php arent correct.
You say:
Find: [Select]
if($context['user']['is_logged']) echo ' <td class="titlebg2" height="32"> <span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span> </td>';
but there is no such code on my index.template.php.Only
if($context['user']['is_logged'])
echo '
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>';
File attached.
@blondeamon : try putting the code between the span only. I use blackted and had the same prob.
Open index.templete.php and search for
if($context['user']['is_logged'])
you will get around 4 results. check the best option and edit accordingly
For Dilber Mc
index.template.php
(Backup before editing)
Find:
<td class="memberbar">';
if($context['user']['is_logged'])
echo '
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>';
else
echo $txt['welcome_guest'];
echo '
</td>
And replace with:
<td class="memberbar">';
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>';
// End CGDT Mod by Nascar
if($context['user']['is_logged'])
echo '<br>';
else
echo $txt['w_guest'];
echo '
</td>
Modifications.LANGUAGE.php
Find:
?>
Add before:
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'Up Late Aren\'t We';
$txt['are_you_the_early_bird'] = 'Are you the early bird';
$txt['good_morning'] = 'Good Morning';
$txt['good_afternoon'] = 'Good Afternoon';
$txt['good_evening'] = 'Good Evening';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Shouldn\'t You Be Going To Bed Soon';
$txt['w_guest'] = 'Guest';
// End CGDT Mod by Nascar
Works like a charm thanks mate.
one problem that it is facing as I said is, forum is following 12hours (am/pm) clock format and your mod 24hours.
You have to modify the checking of am/pm
I know.I'm working on it ;)
Nice mod, here's another language, not sure how the German Umlaute kann be added to the code, I simply stuck them in where they are needed. ä could be replaced by ae and ü could be replaced by ue
<file name="$languagedir/Modifications.german.php">
<operation>
<search position="end" />
<add><![CDATA[
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'So spät noch auf';
$txt['are_you_the_early_bird'] = 'So früh schon auf';
$txt['good_morning'] = 'Guten Morgen';
$txt['good_afternoon'] = 'Guten Tag';
$txt['good_evening'] = 'Guten Abend';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Zeit zum ins Bett gehen';
// End CGDT Mod by Nascar
]]></add>
</operation>
</file>
Quote from: warhonowicz on September 09, 2008, 03:47:35 PM
Nice mod, here's another language, not sure how the German Umlaute kann be added to the code, I simply stuck them in where they are needed. ä could be replaced by ae and ü could be replaced by ue
<file name="$languagedir/Modifications.german.php">
<operation>
<search position="end" />
<add><![CDATA[
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'So spät noch auf';
$txt['are_you_the_early_bird'] = 'So früh schon auf';
$txt['good_morning'] = 'Guten Morgen';
$txt['good_afternoon'] = 'Guten Tag';
$txt['good_evening'] = 'Guten Abend';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Zeit zum ins Bett gehen';
// End CGDT Mod by Nascar
]]></add>
</operation>
</file>
This I would use for the Modification.German_utf8.php
Here for the Modification.German.php with the German Umlaute:
$txt['up_late_arent_we'] = 'So spät noch auf';
$txt['are_you_the_early_bird'] = 'So früh schon auf';
$txt['good_morning'] = 'Guten Morgen';
$txt['good_afternoon'] = 'Guten Tag';
$txt['good_evening'] = 'Guten Abend';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Zeit zum ins Bett gehen';
I'm using the Overview theme and could manage to add the code, everything works great!!
Thanks for the nice mod!!! (http://www.simplemachines.org/community/Themes/smsite/images/post/thumbup.gif)
Cool, workes fine.
I had to ad an extra if($context['user']['is_logged']) or else it looked all wrong for guests
Quote// Start CGDT Mod by Nascar
$date = date('H');
if($context['user']['is_logged'])
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ' <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
this mod works great on default but my custom themes are different then what im seeing here. i have 3 custom themes and dont see the same to make my edits.im trying on enterprise,helios_tp and tp mirage.any ideas on where i should edit?nobody on my site uses the default cool mod thou thx
Thanks ... nice modification :)
I do have "cosmetic" problem after modifying Dilber MC index.template.php . I am pretty sure this can be solved easily, but unfortunately I do not know how :( . I am not an expert in php ;)
EDIT: I am attaching my Dilber MC index.template.php
Any idea?
Gr, Mladen
install went well but nothing has changed on the greeting :D
using 1.1.6 and Gothic_Rose theme :o
Hi guys.
Most custom templates have the layout different to the default.
In most cases, it isnt difficult to to copy the code into your themes index.template.php, and find where you would like it to sit.
example;
(http://img258.imageshack.us/img258/3387/81109763mq2.png)
Since noone has all themes installed, and most themes are coded/structured different, the easiest way for someone to help you, is for you to attach your index.template.php to your post :)
Good luck :)
Quote from: Sabre™ on September 10, 2008, 01:47:26 AM
Since noone has all themes installed, and most themes are coded/structured different, the easiest way for someone to help you, is for you to attach your index.template.php to your post :)
Sabre, thanks for your advice. I have attachedmy index.template.php in my original posting as you suggested :-)
Gr, Mladen
mladen_dfso: I'll have a look at that in a moment.
Sabre™: Thank's for giving advice when I'm not online ;)
robbie93: Please attach your index.template.php
fals: I was just going to fix that :D
mickeyb107: Please attach the index.template.php for each of does themes.
Please rename them so that I know which file is for which theme.
Mladen:
Replce all the content in your index.template.php whit this.
It works great for me.
<?php
// Version: 1.1 RC3; 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 RC3';
/* 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;
// Color changer
if(!$context['user']['is_guest'] && isset($_POST['options']['theme_color']))
{
include_once($GLOBALS['sourcedir'] . '/Profile.php');
makeThemeChanges($context['user']['id'], $settings['theme_id']);
$options['theme_color'] = $_POST['options']['theme_color'];
}
elseif ($context['user']['is_guest'])
{
if (isset($_POST['options']['theme_color']))
{
$_SESSION['theme_color'] = $_POST['options']['theme_color'];
$options['theme_color'] = $_SESSION['theme_color'];
}
elseif (isset($_SESSION['theme_color']))
$options['theme_color'] = $_SESSION['theme_color'];
}
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title'], '" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc3"></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, '";
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sitepreview.js"></script>
<link rel="SHORTCUT ICON" HREF="http://www.fsgoggles.com/images/favicon.ico">
<title>', $context['page_title'], '</title>';
// Any color set by user?
if (isset($options['theme_color']))
$settings['theme_main_color'] = $options['theme_color'];
// If not set, or if not allowed to set
if(!isset($options['theme_color']) || (isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'no'))
{
// Defaults.
$options['theme_color'] = isset($settings['theme_main_color']) ? $settings['theme_main_color'] : 'lightblue';
$settings['theme_main_color'] = $options['theme_color'];
}
// The ?rc2 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?rc3" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style_' , $settings['theme_main_color'] , '.css?rc3" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc3" media="print" />';
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + ' . '"/'. $settings['theme_main_color'] . '" + (mode ? "/expand.gif" : "/collapse.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 + ' . '"/'. $settings['theme_main_color'] . '" + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
</head>
<body>';
echo '
<div class="maindiv" style="width: ' , (isset($settings['page_div_width']) && !empty($settings['page_div_width'])) ? $settings['page_div_width'] : '99%' , ';">
<div style="width: 100%;" class="topbar">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
<td style="padding:0;" width="1" height="120">';
if(!($settings['logo_not_show']))
{
if (empty($settings['header_logo_url']))
echo '
<a href="', $scripturl, '"><img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/logo.jpg" style="margin: 0px;" alt="', $context['forum_name'], '" title="', $context['forum_name'], '"/></a>';
else
echo '
<a href="http://www.fsgoggles.com"><img src="', $settings['header_logo_url'], '" style="margin: 0px;" alt="', $context['forum_name'], '" /></a>';
}
echo '
</td>';
if (!empty($settings['show_name_near_logo']))
echo '
<td>
<span style="font-family: \'Trebuchet MS\', Verdana, sans-serif; font-size: 150%; color: white; padding-top: 30px; padding-left: 30px; white-space: normal;">', $context['forum_name'], '</span>
</td>';
if (!empty($settings['top_right_html']))
echo '
<td valign="top" align="right">
<div style="color: white; padding-top: 10px; float:right;">', $settings['top_right_html'], '</div>
</td>';
echo '
</tr>
</table>
</div>
<div style="width: 100%; padding-top: 4px;" class="topbar2">
<table border="0" cellspacing="0" cellpadding="0" style="width: 100%;">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="9%" valign="middle" align="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.vatsim.net"><img src="http://www.fsgoggles.com/forum/Themes/dilbermc/images/vatsim.gif"</a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
<span class="middletext">'. $settings['custom_copyright'] . '</span>
</td>
<td width="7%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
<a href="http://www.ivao.aero"><img src="http://www.fsgoggles.com/forum/Themes/dilbermc/images/ivao.gif"</a>
</td>
</tr>
</table>';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>
</td>
</tr>
</table>
</div>
<div class="menubar">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>';
// Show the menu here, according to the menu sub template.
template_menu();
echo '
</tr>
</table>
</div>';
// Here we start the main page, after the menu bar.
// Unfortunately, IE 6 couldn't handle a div here with a CSS background property, no matter how much I tried. So we use a table for IE here. I love Firefox ^_^ visit getfirefox.com for more info.
// It is time for Microsoft to get rid of IE and make Firefox their primary browser :P
// Ok, Opera can also display the div properly. I love both FF & Opera :)
echo '
', $context['browser']['is_ie'] ? '<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td class="mainpage">' : '<div class="mainpage">', '
<a style="float:right;" href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', $settings['theme_main_color'], '/', empty($options['collapse_header']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
<div class="memberbardiv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="20">
</td>
<td class="memberbar">';
// Start CGDT Mod by Nascar
$date = date('H');
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>';
// End CGDT Mod by Nascar
if($context['user']['is_logged'])
echo '<br>';
else
echo $txt['w_guest'];
echo '
</td>
<td class="middletext" align="right" valign="top" style="padding-right:10px; padding-left:10px;">
' , $context['current_time'], '
<br/>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">', !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '', '</td>
<td class="memberbar">';
if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
, $context['allow_pm'] ? '<b>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</b>' : '<br/>', '.<br/><br/>
> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
> <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
</span>';
echo '
</td>
<td class="middletext" align="right" valign="top" style="padding-right:10px; padding-left:10px;">
<br/>';
// Are they logged in?
if ($context['user']['is_logged'])
{
// 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 />';
}
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>
<br/><br/>';
}
echo '
</td>
</tr>
<tr id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td colspan="3" class="memberbardivbottom">';
// color selection box
if(isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'box')
echo '
<div style="position: relative; bottom: 13px; right:15px; float:right; ">
<form action="', $scripturl, '" method="post" class="smalltext">
<select name="options[theme_color]">
<option value="lightblue" ' ,$settings['theme_main_color'] == 'lightblue' ? 'selected="selected"': '', '>Light Blue</option>
<option value="lightnavy" ' ,$settings['theme_main_color'] == 'lightnavy' ? 'selected="selected"': '', '>Light Navy</option>
<option value="lightsilver" ' ,$settings['theme_main_color'] == 'lightsilver' ? 'selected="selected"': '', '>Light Silver</option>
<option value="lightturquoise" ' ,$settings['theme_main_color'] == 'lightturquoise' ? 'selected="selected"': '', '>Light Turquoise</option>
<option value="lightgreen" ' ,$settings['theme_main_color'] == 'lightgreen' ? 'selected="selected"': '', '>Light Green</option>
<option value="lightolive" ' ,$settings['theme_main_color'] == 'lightolive' ? 'selected="selected"': '', '>Light Olive</option>
<option value="lightgolden" ' ,$settings['theme_main_color'] == 'lightgolden' ? 'selected="selected"': '', '>Light Golden</option>
<option value="lightbrown" ' ,$settings['theme_main_color'] == 'lightbrown' ? 'selected="selected"': '', '>Light Brown</option>
<option value="lightred" ' ,$settings['theme_main_color'] == 'lightred' ? 'selected="selected"': '', '>Light Red</option>
<option value="lightrose" ' ,$settings['theme_main_color'] == 'lightrose' ? 'selected="selected"': '', '>Light Rose</option>
<option value="lightlilac" ' ,$settings['theme_main_color'] == 'lightlilac' ? 'selected="selected"': '', '>Light Lilac</option>
<option value="lightviolet" ' ,$settings['theme_main_color'] == 'lightviolet' ? 'selected="selected"': '', '>Light Violet</option>
</select>
<input type="submit" name="submit" value="Change" style="width: 11ex;" />
</form>
</div>';
if(isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'bars')
echo '
<div style="position: relative; bottom: 15px; right:15px; float:right; ">
<form action="', $scripturl, '" method="post" class="smalltext">
<input style="border: solid 2px #6699CC; background-color: #6699CC; color: #6699CC; width: 20px; font-size: 1px;" type="submit" value="lightblue" name="options[theme_color]"/>
<input style="border: solid 2px #5371AD; background-color: #5371AD; color: #5371AD; width: 20px; font-size: 1px;" type="submit" value="lightnavy" name="options[theme_color]"/>
<input style="border: solid 2px #6C7F93; background-color: #6C7F93; color: #6C7F93; width: 20px; font-size: 1px;" type="submit" value="lightsilver" name="options[theme_color]"/>
<input style="border: solid 2px #53ADAD; background-color: #53ADAD; color: #53ADAD; width: 20px; font-size: 1px;" type="submit" value="lightturquoise" name="options[theme_color]"/>
<input style="border: solid 2px #4DB45D; background-color: #4DB45D; color: #4DB45D; width: 20px; font-size: 1px;" type="submit" value="lightgreen" name="options[theme_color]"/>
<input style="border: solid 2px #93A659; background-color: #93A659; color: #93A659; width: 20px; font-size: 1px;" type="submit" value="lightolive" name="options[theme_color]"/>
<input style="border: solid 2px #D8A259; background-color: #D8A259; color: #D8A259; width: 20px; font-size: 1px;" type="submit" value="lightgolden" name="options[theme_color]"/>
<input style="border: solid 2px #a67259; background-color: #a67259; color: #a67259; width: 20px; font-size: 1px;" type="submit" value="lightbrown" name="options[theme_color]"/>
<input style="border: solid 2px #E15050; background-color: #E15050; color: #E15050; width: 20px; font-size: 1px;" type="submit" value="lightred" name="options[theme_color]"/>
<input style="border: solid 2px #D47BC5; background-color: #D47BC5; color: #D47BC5; width: 20px; font-size: 1px;" type="submit" value="lightrose" name="options[theme_color]"/>
<input style="border: solid 2px #A185D6; background-color: #A185D6; color: #A185D6; width: 20px; font-size: 1px;" type="submit" value="lightlilac" name="options[theme_color]"/>
<input style="border: solid 2px #7F88B2; background-color: #7F88B2; color: #7F88B2; width: 20px; font-size: 1px;" type="submit" value="lightviolet" name="options[theme_color]"/>
</form>
</div>';
echo '
</td>
</tr>
</table>
</div>';
if(!empty($settings['custom_global_html']))
echo '
<div align="center" style="width: 90%; margin-left: auto; margin-right: auto; margin-top:10px; border: 0px solid;" class="middletext">
', $settings['custom_global_html'], '
</div>';
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 25px 2ex 25px;">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net" target="_blank"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
<br/><br/>
<span class="smalltext">'. $settings['custom_copyright'] . '</span>
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<span style="float:right; margin-right:10px; font-size:70%;"><b>Dilber MC</b> Theme by <b><a href="http://www.harzem.com/themes/themes.php?theme=dilbermc;color=', $settings['theme_main_color'], '" target="_blank">HarzeM</a></b></span>
</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'])
{
// 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";
}
}';
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>
',($context['browser']['is_ie']) ? '</td></tr></table>' : '</div>' , '
</div>';
// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" class="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: 85%; 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 ' > ';
}
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';
// Dummy place holder, to set the height
echo'
<td align="center" class="menubg" height="30" width="20">
</td>';
// Show the [home] button.
echo'
<td align="center" class="menubg' , $current_action == 'home' ? '2' : '' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>';
// Here we go some new button.
echo'
<td align="center" class="menubg' , $current_action == 'WEB' ? '2' : '' , '">
<a href="http://www.fsgoggles.com/index.php" target="_blank">' , 'WEB' , '</a>
</td>';
// Show the [help] button.
echo'
<td align="center" class="menubg' , $current_action == 'help' ? '2' : '' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>';
// How about the [search] button?
if ($context['allow_search'])
echo'
<td align="center" class="menubg' , $current_action == 'search' ? '2' : '' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo'
<td align="center" class="menubg' , $current_action == 'admin' ? '2' : '' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo'
<td align="center" class="menubg' , $current_action == 'profile' ? '2' : '' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo'
<td align="center" class="menubg' , $current_action == 'pm' ? '2' : '' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>';
// The [calendar]!
if ($context['allow_calendar'])
echo'
<td align="center" class="menubg' , $current_action == 'calendar' ? '2' : '' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>';
// the [member] list button
if ($context['allow_memberlist'])
echo'
<td align="center" class="menubg' , $current_action == 'mlist' ? '2' : '' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>';
// the [SMF Gallery] button
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td align="center" class="menubg' , $current_action == 'gallery' ? '2' : '' , '">
<a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu'] , '</a>
</td>' ;
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo'
<td align="center" class="menubg' , $current_action == 'login' ? '2' : '' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo'
<td align="center" class="menubg' , $current_action == 'register' ? '2' : '' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo'
<td align="center" class="menubg' , $current_action == 'logout' ? '2' : '' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>';
// Dummy place holder, to end things
echo'
<td align="center" class="menubg" width="20">
</td>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return '<td> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'main', 'strip_first', '"> </td>
<td class="', $direction == 'top' ? 'main' : 'main', 'strip">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'main', 'strip_last' , '"> </td>';
}
?>
Nescar, thanks for the excellent service. I works great. I owe you one :-*
Have a nice day, :)
Mladen
Glad to help, Mladen :)
Hi Nescar, :D
I have just noticed that there is a new version of this MOD (0.5). This morning I have installed 0.4 version. It is obvious that I have to make an update to the latest version (0.5).
Question: I assume my modified index.template.php of Dilber MC, which you've just modified, stays unchanged. Or do I have to ask you again to modify index.template.php?
I apologize for my ignorance ;-)
Gr, Mladen
Actually it's not very important to update to 0.5 as the only updates in that version is a german translation.
But if you want to upgrade any way, just uninstall 0.4, and delete the apckage from your site.
Then upload 0.5 to it and install.
Your Dilber MC theme will remain as it is - Modified.
Have a nice day
Nascar
great mod ¡¡¡
here´s the spanish lines:
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = '¿No puedes dormir eh?';
$txt['are_you_the_early_bird'] = 'Al que madruga dios lo ayuda.';
$txt['good_morning'] = 'Buenos Días.';
$txt['good_afternoon'] = 'Buenas Tardes.';
$txt['good_evening'] = 'Buenas Noches.';
$txt['shouldnt_you_be_going_to_bed_soon'] = '¿No deberías estar ya en la cama?';
// End CGDT Mod by Nascar
Glad you like the mod and thank's for the translations, mirahalo. :)
heres my index.template.php Nascar :D
For Gothic rose
index.template.php:
(Backup file first)
Find:
<td class="title" height="32" align="center">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span><br />';
And replace whit:
<span style="font-size: 130%;">';
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if($context['user']['is_logged'])
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>
</span>
<br />';
// End CGDT Mod by Nascar
Modifications.LANGUAGE.php
Find:
?>
Add before:
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'Up Late Aren\'t We';
$txt['are_you_the_early_bird'] = 'Are you the early bird';
$txt['good_morning'] = 'Good Morning';
$txt['good_afternoon'] = 'Good Afternoon';
$txt['good_evening'] = 'Good Evening';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Shouldn\'t You Be Going To Bed Soon';
// End CGDT Mod by Nascar
hi,
I need it for mine Versatility Rocket theme ;-) (at: http://forums.pendzer.org)
Regards
Quote from: Sabre™ on September 10, 2008, 01:47:26 AM
Since noone has all themes installed, and most themes are coded/structured different, the easiest way for someone to help you, is for you to attach your index.template.php to your post :)
This doesnt mean for everyone to just throw up their templates, without even
trying to edit it themselves.
The benefits of finding the solution for your theme, will result in you understanding it
alot clearer, and will assist you with
other tasks.
By trying adjustments myself, I have slowly learnt how my theme "operates".
It is always better to try things first, experiment here n there, for your
own benefit, and for the development of your site.
Make the time/effort to learn.
You will thank yourself for it in the end ;)
Use the quoted comment as a last resort.
Thank's for that, Sabre :)
But still, as I wrote in the first post of this topic, I really like to help you install this for other themes ;)
Quote from: SISA on September 10, 2008, 06:50:36 PM
hi,
I need it for mine Versatility Rocket theme ;-) (at: http://forums.pendzer.org)
Regards
Hi, SISA!
I couldn't find a theme called Versatility Rocket at the Themes Site at SMF.org.
Where did you download it?
please see to the time problem
I'm working on it.
Please give me some time ;)
Quote from: Nascar on September 11, 2008, 02:56:58 AM
Thank's for that, Sabre :)
But still, as I wrote in the first post of this topic, I really like to help you install this for other themes ;)
hahaa Yeah.. I like to tinker with other templates aswell.
I guess its the ole tradition of giving someone a piece of fish, or teaching them
how to fish ;)
Keep up the good work :)
With the time problem, I just rearranged the lang strings to display at the appropriate time.
Not the proper way, but it will suffice till you find the solution.
Cheers :)
Thank's for those words, Sabre :)
And about the time porblem:
It's fixed!
Charles Hill gave me a fast solution to this.
First uninstall and remove the mod from your site.
Then download the new package from the Mod Site and install it.
For those I've helped whit custom themes:
You will need to edit your index.template.php once again :P
Find:
$date = date('H');
And replace whit:
$date = date('H', forum_time());
For Kelo-lt
index.template.php:
(Backup file first)
Find:
// The information that will be shown to the member when he/she is logged on
if($context['user']['is_logged'])
{
echo '
<div id="loggedin">
<b>', $txt[248], '</b> ', $context['user']['name'];
// Only tell them about their messages if they can read their messages!
And replace whit:
// The information that will be shown to the member when he/she is logged on
if($context['user']['is_logged'])
{
echo '
<div id="loggedin">';
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if($context['user']['is_logged'])
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>';
// End CGDT Mod by Nascar
// Only tell them about their messages if they can read their messages!
Modifications.LANGUAGE.php
Find:
?>
Add before:
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'Up Late Aren\'t We';
$txt['are_you_the_early_bird'] = 'Are you the early bird';
$txt['good_morning'] = 'Good Morning';
$txt['good_afternoon'] = 'Good Afternoon';
$txt['good_evening'] = 'Good Evening';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Shouldn\'t You Be Going To Bed Soon';
// End CGDT Mod by Nascar
Quote from: Sabre™ on September 10, 2008, 07:03:46 PM
Quote from: Sabre™ on September 10, 2008, 01:47:26 AM
Since noone has all themes installed, and most themes are coded/structured different, the easiest way for someone to help you, is for you to attach your index.template.php to your post :)
This doesnt mean for everyone to just throw up their templates, without even trying to edit it themselves.
The benefits of finding the solution for your theme, will result in you understanding it alot clearer, and will assist you with other tasks.
By trying adjustments myself, I have slowly learnt how my theme "operates".
It is always better to try things first, experiment here n there, for your own benefit, and for the development of your site.
Make the time/effort to learn.
You will thank yourself for it in the end ;)
Use the quoted comment as a last resort.
How do u know that I didn't tried to make?
Quote from: Sabre™ on September 10, 2008, 07:03:46 PM
Quote from: Sabre™ on September 10, 2008, 01:47:26 AM
Since noone has all themes installed, and most themes are coded/structured different, the easiest way for someone to help you, is for you to attach your index.template.php to your post :)
This doesnt mean for everyone to just throw up their templates, without even trying to edit it themselves.
The benefits of finding the solution for your theme, will result in you understanding it alot clearer, and will assist you with other tasks.
By trying adjustments myself, I have slowly learnt how my theme "operates".
It is always better to try things first, experiment here n there, for your own benefit, and for the development of your site.
Make the time/effort to learn.
You will thank yourself for it in the end ;)
Use the quoted comment as a last resort.
Quote from: Nascar on September 11, 2008, 03:01:29 AM
Quote from: SISA on September 10, 2008, 06:50:36 PM
hi,
I need it for mine Versatility Rocket theme ;-) (at: http://forums.pendzer.org)
Regards
Hi, SISA!
I couldn't find a theme called Versatility Rocket at the Themes Site at SMF.org.
Where did you download it?
I buy it from rockettheme.com
Then you need to attach index.template.php, SISA!
Have a nice day
Nascar
Quote from: SISA on September 11, 2008, 07:58:45 AM
How do u know that I didn't tried to make?
Was I speaking to you??
I was speaking in general.
Is that ok?
Looks Like a Great Mod !!
But,
How about Modding the Babylon Theme?
(I tried it and it won't work..........)
(attached)
Mine too ;)
Regards
(Attach)
TW1ST3D
Try the attached file. ;)
SISA
Your theme was a bit more difficult to edit then I thought.
I'll work on it.
Ok Nascar, thanks for ur time
Quote from: Nascar on September 12, 2008, 02:50:19 AM
TW1ST3D
Try the attached file. ;)
Works like a charm ......THANKS !!!
Hello everybody !
I am really interested to install this fantastic modification on my forum. Unfortunately it won't work on my current theme called : Smile blog which i downloaded from your themes site! But it works well on the default one !
Could somebody give me a hint ?
Thanks for everything,
John
Quote from: john123 on September 13, 2008, 01:28:20 AM
Hello everybody !
I am really interested to install this fantastic modification on my forum. Unfortunately it won't work on my current theme called : Smile blog which i downloaded from your themes site! But it works well on the default one !
Could somebody give me a hint ?
Thanks for everything,
John
Wait till Nascal edit index.template.php for you, or try make by your own.
John123:
The theme you use dosn't have any area for displaying greetings and username, I'm afraid. :-[
You wan't me to add one somewhere?
TW1ST3D
You're welcome!
SISA
Could you attach a screenshot of your theme so that I can see where too edit? ;D
Have a nice day
Nascar
Hello Nascar ! Thank you for your reply !
I managed to edit the theme a little bit, by getting a part from the default one. I post you a Screenpicture !
That's good, john123!
Please psot your index.template.php and I'll do the edits.
Wow, you are so fast ! Amazing !
Okay let's try it out !
Thank you very much Nascar !
Try this one, John123.
Thank you Nascar !
I tried it out, but it doesn't seem to work well !
I attach you a screenpicture !
Oh, your theme uses a custom Modifications.english.php file. Could you attach it?
Oh I didn't know about that ! I guess i'm to old ::)
Anyway , i found it !
Try this file.
Wow , it worked perfectly well ! You must be a code master !
Many thanks Nascar , i really appreciate it !
Thanks again ,
John
You're welcome!
Have a nice day
Nascar
Nascar u can see it at http://forums.pendzer.org
Pozdrav means Hello
Try this, SISA.
I haven't tested it, so mak sure you backup the original file first.
i have a problem with your mod it's not good for W3C validation why?? can you help me? my site is www.eknights.it/clan/index.php validate it with Link (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.eknights.it%2Fclan%2Findex.php&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.591)
If you do not experince any errors on your site there shouldn't be any problems, Mystiquo
if you go at the up link you see that error i have.
W3C saw is not valid site you understand? i attached my index.template thank for help
One second gives 100 + Errors
While installing i had error in index.template of dilbermc and admin.template error.
I have manually changed edited it.
Checked the Error Log and got 100 errors in one second.l
QuoteGuest Today at 20:44:16
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=17981.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:44:00
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=17077.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:57
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?action=tagged;id=23746;tag=placement somaiya college engineering
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/languages/GoogleTagged.english.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:51
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=21884.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:48
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=1279.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:44
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?action=register
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Register.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:43
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=26633.msg33154
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:35
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=8313.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:33
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=8675.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:24
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=21717.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:11
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=16144.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:09
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?action=search2;search=INFOSYS OPENINGS
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/languages/Arcade.english.php (main_above sub template - eval?)
Line: 412
Guest Today at 20:43:09
ip address c--------------------------------------------------7
http://forum.itacumens.com/index.php?topic=7191.0
8: Undefined index: w_guest
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 412
Kindly help me Nascar.
asudhakar, are you sure it's this mod doing this?
If so, are you using 1.1.x or 2.0 beta 4?
Am Using 1.1.6 and
While installing i had error in index.template of dilbermc and admin.template error.
I have manually changed edited it.
Checked the Error Log and got 100 errors in one second.
Just checked the log of my test forum and saw errors to. I'll have a look at this.
As long as your forum works this want be any big problem, but still it necessary to fix.
Ok, now my error page crossed more than 200 + - No of error pages . What i have to do now.
If the errors are disturbing you, you can uninstall the mod untill I have fixed this.
Ok, will uninstall as if now. But i have to again reedit the index and admin page.
After installing , i found this mod is most useful since it interacts to the people.
Thank you and hope you will fix it soon Nascar.
Hello again !
I hope I am not disturbing you Nascar, but I found out a little "problem", and I thought maybe you know a solution for it !
If I am logged in , everything is fine, but I tried to logout , and I got a strange view of my bar.
I attach you again a screenpicture of the problem , and a screenpicture of how i want it to be ! You think that is possible ?
Thanks again ,
John
nascar can you help me or not?
john123
That would be easy to fix.I'll do it for you in a while, as I'm busy creating my site right now. ;D
Mystiquo
I'll have a look on that when I have time.
Have a nice day
Nascar
Take all the time you need Nascar ! Thanks again for your support ! :)
Works now,
Thanks ;)
john123
I'm just chansing now as I have no site to test this on currently.Open index.template.php
Find:
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if ($date < 6)
Replace whit:
[/]// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if($context['user']['is_logged'])
if ($date < 6)
It's probably wrong, I'll have a better look at it when my test site is up running again. O:)
SISA
Glad it works :)
Mystiquo & asudhakar
I'll try to help you as soon as my test forum is working again.
Have a nice day
Nascar
thanks
Hello,
Very interesting MOD, but at the risk of asking something that may have already been addressed, are you looking at adding an Admin CP setting set to, at least, allow the messages displayed to be edited by the Admins. Ideally, to also allow the Admins to set the start times of each of those greetings (the end time would be the start time of the next greeting, minus one minute, so Admin input would not be needed, the first greeting, starting at 00:00, would also not be open to editing by Admins, the last one ending at 23:59).
I'm just not comfortable with the greetings that start at 22:00 and end at 06:59, otherwise I'd be incorporating it in my site as well (the greetings are really a nice touch!).
Thank you for working to make SMF more useful and, well, fun!
Cal O'Shaw
Yes, that would truly be great, but I think that's beyond my skills right now.
Maybe in the future.
please if u can customize this mod for clan wars theme it would be great!
gamgam
That will be done
Have a nice day
nascar
Awesome mod! I have a question though... im using more style and I can't find the place to add the code to. I was wondering if you could help with that. Thanks!
Quote from: Nascar on September 14, 2008, 06:54:46 AM
gamgam
That will be done
Have a nice day
nascar
thx, I appreciate that!
the_underworld
I'll have a look at that in a moment.
gamgam
No problem. I'll fix it soon.
Have a nice day
Nascar
the_underworld
Try the attached file. Remember to backup the original file first, in case I did a mistake.
Have a nice day
Nascar
gamgam
Try this:
Themes/ClanWar/Index.template.php
(Backup file first)
Find:
if($context['user']['is_logged'])
echo '
<td height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
And replace whit: if($context['user']['is_logged'])
echo '
<td height="32"><span style="font-size: 130%;">';
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
Have a nice day.
Nascar
it doesnt work mate, it just shows ,
Sry, your theme must be using a cutsom Modifications.english.php file.
Find:
?>
Add before:
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'Up Late Aren\'t We';
$txt['are_you_the_early_bird'] = 'Are you the early bird';
$txt['good_morning'] = 'Good Morning';
$txt['good_afternoon'] = 'Good Afternoon';
$txt['good_evening'] = 'Good Evening';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Shouldn\'t You Be Going To Bed Soon';
// End CGDT Mod by Nascar
news??
MY test forum will be back running again tomorrow. I'll try to fix it right then.
Quote from: Nascar on September 15, 2008, 08:58:49 AM
the_underworld
Try the attached file. Remember to backup the original file first, in case I did a mistake.
Have a nice day
Nascar
thanks for your time.... but... what file? lol i didn't see an attached one.....
Installed correctly with no shown errors.
Manually installed in my custom theme and it is fine.
On my default theme when logged out there is a problem.
Please refer to the screenshot.
Quote from: the_underworld on September 15, 2008, 05:19:11 PM
Quote from: Nascar on September 15, 2008, 08:58:49 AM
the_underworld
Try the attached file. Remember to backup the original file first, in case I did a mistake.
Have a nice day
Nascar
thanks for your time.... but... what file? lol i didn't see an attached one.....
My bad.. here it goes...
Simplemachines Cowboy
I'll have a look at it.
Quote from: Nascar on September 16, 2008, 01:04:22 AM
Quote from: the_underworld on September 15, 2008, 05:19:11 PM
Quote from: Nascar on September 15, 2008, 08:58:49 AM
the_underworld
Try the attached file. Remember to backup the original file first, in case I did a mistake.
Have a nice day
Nascar
thanks for your time.... but... what file? lol i didn't see an attached one.....
My bad.. here it goes...
Np. thanks for your hard work!
:)
And it works! THANK YOU! :D
Love the Mod. Is there a way for my to change the greetings to what I want them to say?
Hi, acjceo
For the moment you will have to edit the Modifiications.english.php file manually to change the greetings.
In the future there will be a Admin Section to edit the greetings.
Hi,
Mod looks great, but I can't get it to work with Rengli Theme, even after using the parser, is there any code for this?
Thanks.
Oh, i'm using 1.1.5 right now...
I will help you when I have time, beatlemanu
Hi,
Great mod.
Does it work with Rengli Theme on 1.1.5???
If not, how would I get it to show up?
Thanks.
Hi Nascar ive been using it for a long time and i just noticed that i have error logs on my forum from your mode , concerning the w_guest variable.
Take a look here:
(http://imageshack.gr/files/3o1d8oui1l1gesn6a432.jpg) (http://imageshack.gr/view.php?file=3o1d8oui1l1gesn6a432.jpg)
I would be in debt if you could help me fix it
Many people has this problem, I'm working on it.
Version 0.8 Released
Updates in this version:
Fixed the look for guests
For those who have manually installed this on custom themes:
index.template.php
Find:
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
Replace whit:
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if($context['user']['is_logged'])
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
if($context['user']['is_logged'])
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
For those who have problems whit error log:
I'm still trying to fix this. Be patient.
Have a nice day
Nascar
exscuse me but now it's right for W3C validator?
No, it is not.
In 0.9, comming in a few days, it will be fixed.
We appreciate your hard work mate , its a very cool mod.
Let us know when you are ready
Removing just this
if($context['user']['is_logged'])
echo '<br>';
else
echo $txt['w_guest'];
seems to have fixed everything on the error logs.
Really? ??? Why didn't I notice :D
blondeamon
I just had a closer look at your suggestion, and I found that that works for Dilber Mc only.
(Tell me if I'm wrong again)
I'll look for the right solution for the other themes.
Thank's for your help.
Btw I'll edit the package so that Dilmer MC is right edited from the begining.
Everyone who has encountered errors in the error log:
I think that if you just remove the errors from he log once, you shouldn't see them again, and your forum shouldn't have any problems.
Version 0.8.1
The codes for Kelo-Lt and Gothic Rose (Foud in this topic) has been updated.
Hi Nascar,
I am using Outline Omega theme,
I opened my index.template.php file and i cannot find what it asks to find as a little bit of code was different. but i did find this which i know is the rite one to change:
if ($context['user']['is_logged'])
{
echo '
<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
but when i replaced with the code it says to replace with i get:
QuoteTemplate Parse Error!
There was a problem loading the /Themes/OutlineOmega_115/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_ELSE
Can you do the edit for me please ??? file attached
There you go..
Hi,
thanks but can you sort a slight niggle using the file you uploaded after doing the edit for me ???
if you look at attached image my messages etc appear on same line as the good morning [my username] it should be underneath.
Thank you,
Mathew
My bad, use this:
Thanks, i knew i had to put a bracket in but did not know where.
Another great mod added to my forum, nice and personal for my members,
I did change the text on the "Are you the early bird" to "You are an early bird"
Thank you,
Mathew
Glad that you liked it.
The next version of the mod will allow you to customize greetings via the admin panel.
Quote from: Nascar on October 28, 2008, 09:55:03 AM
Glad that you liked it.
The next version of the mod will allow you to customize greetings via the admin panel.
Good for people who not kean on editing the modifications.english.php file, ;)
Mathew
Help with VB_Dark theme please
<td width="250" valign="top" class="windowbg"><span class="middletext" style="display:block;width:250px;">';
if($context['user']['is_logged'])
{
echo '
<strong>Welcome, ', $context['user']['name'] , '.</strong><br />';
}
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
<a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.<br />';
}
// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
I can help you, Existant, but I need your entire file, not only the part you included. ;)
To use with 1.1.7 & theme Vintage, download & install
Open & edit Themes/Vintage/index.template.php
Find
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
Replace with
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;">';
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if($context['user']['is_logged'])
if ($date < 6)
echo $txt['up_late_arent_we'];
elseif ($date < 7)
echo $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo $txt['good_morning'];
elseif ($date < 18)
echo $txt['good_afternoon'];
elseif ($date < 22)
echo $txt['good_evening'];
elseif ($date < 24)
echo $txt['shouldnt_you_be_going_to_bed_soon'];
if($context['user']['is_logged'])
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
// End CGDT Mod by Nascar
// display the time
I love the fun spirit of this mod but it apparently does not work for the theme I am using. Could I talk you into customizing (or telling me how to do it) the code to work for the Siradisi v0.0.2 theme? :-*
cool mod, helps to add a more friendly welcome throughout the day & nite
Thanks for the comment. Keep your eyes open for updates
SMF v1.1.7:
I installed your mod, and for me it does not work, the greeting comes up empty with just a comma (like ", Admin").
Any ideas?
Kind regards,
Rattler
Welcome to SMF, Rattler.
Are your forum using english language?
Quote from: Nascar on December 15, 2008, 02:30:02 PM
Welcome to SMF, Rattler.
Are your forum using english language?
Thanks, I assume so (where would I check?)
Rattler
Just check if the menu etc is in english.
Yep, everything is in English (test forum at: http://todos-contra-matias.net/forum/index.php)
Rattler
Could you attach the Modifications.English.php file located in ./themes/default/ in your next post?
Quote from: Nascar on December 16, 2008, 09:57:07 AM
Could you attach the Modifications.English.php file located in ./themes/default/ in your next post?
Rgr, willco.
OTOH, obviously all the 3 possible candidates (that is why I had asked where to check and that I assumed, as I really have no idea off which the forum actually pulls) have been modified by some mod (all have a bkup copy), so I will attach all three (my hunch is that the forum in its functions pulls off english-utf8):
- Modifications.english_british-utf8.php.
- Modifications.english-utf8.php
- Modifications.english.php
Thanks for your appreciation,
Kind regards,
Rattler
Add this to the end of all those files, right before ?>
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'Up Late Aren\'t We';
$txt['are_you_the_early_bird'] = 'Are you the early bird';
$txt['good_morning'] = 'Good Morning';
$txt['good_afternoon'] = 'Good Afternoon';
$txt['good_evening'] = 'Good Evening';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Shouldn\'t You Be Going To Bed Soon';
// End CGDT Mod by Nascar
Quote from: Nascar on December 16, 2008, 11:23:19 AM
Add this to the end of all those files, right before ?>
-snip-
On my hunch that the forum pulled off #2 I added it there (Modifications.english-utf8.php), voila! that did the trick already. ;D Works like a charm.
BTW, after installing it was present in #3 (Modifications.english.php)
Thanks a lot for your help, added you to the credit section of the test forum.
Kind regards,
Rattler
Yey! Great! Glad you made it :D
Version 0.9
Itroducing the adminpanel - Customize the greetings fast and easily,
Hi Nascar,
Downloaded the mod then click "Apply Mod" and nothing happens!! The page just refreshes itself. When I try "List Files", samething, nothing happens.
This is the first mod that I am having this problem. :(
I've attached both before and after edited versions of my custom theme index.template but I hate to think that I may have to do the entire mod manually.
Any ideas?
Well, the second file you attached should make the edits work.
Although I need the ModSettings.php file and Modifications.english.php files to, if you want me to install it for you.
I can't say anything about the page refresh when you try to install it. Have you tried to apply any other mods since you tried my mod?
Quote from: vulcan59 on December 23, 2008, 06:22:46 PM
Hi Nascar,
Downloaded the mod then click "Apply Mod" and nothing happens!! The page just refreshes itself. When I try "List Files", samething, nothing happens.
This is the first mod that I am having this problem. :(
I've attached both before and after edited versions of my custom theme index.template but I hate to think that I may have to do the entire mod manually.
Any ideas?
Have had the same prob several times with different mods (this one included), the solution is simple (I assume you unzipped and then uploaded?): The unzipped content is named in seperate words (i.e. not connected by "_"). Edit the name and the thingy works.
Hope this helps,
Rattler
Hi Rattler,
No, I uploaded the entire contents zipped. I had a look at the contents but I am not sure which part needs to be renamed. There are 3 files in there, cgdt, cgdt_smf2.0 and the package-info? Which one needs to renamed?
Hi Nascar,
Yes I had another mod there and when I clicked on it, it did bring the file test successful page but the CGDT does not do that at all. Clicking on CGDT seem to show the page refreshing but nothing else.
I downloaded it on another site and tried it and still got the same problem.
Any ideas?
ok added attachement like asked in pm
vulcan59
Having a look at this.
foempspeedy
Okey, try replacing your file whit the file I have attached below.
If it doesn't work, jsut get back to me.
Thanks Nascar,
But the problem is still, I am unable to install thru the package installer. I tried it at two sites now and only this mod doesn't seem to work. Other mods that I tried worked just fine!! :'( Also the attached might not work for me since I've got other mods like dozen pages and rules installed.
Very strange!! Perhaps you could explain what Rattler is saying. I'm not sure what he is saying I should re-name.
it didnt work,had lots errors on some lines, i removed package and uploading back my basic index
Getting an error:
Parse error: syntax error, unexpected T_ELSEIF in .../Themes/Default/index.template.php
And here is the line:
elseif (!empty($context['user']['is_logged']))
Please let me see your file, Simplemachines Cowboy!
Can't.
I ripped out the CGDT mod when it gave me that error.
I have tried installing the mod in several non-modded clean test forums and the same error, on the same line of code, every time.
The line in your mod which I showed in the previous post.
Hmm.. This is freaky. That line doesn't exist in my mod.
I'll do some researching on this one.
where abouts would you find this menu to changes this as i have looked everywhere and i cant find it
Nascar, I apologize.
As soon as you said this:
QuoteThat line doesn't exist in my mod.
I solved the problem.
I somehow managed to add that line into the code I was using to manually edit the mod on my custom theme, and I used the same file with the test install I did.
Version .9 works perfectly.
(Reminder to self: Don't play with code on a working forum after being awake for 20 hours... :))
chrisb,
For 1.1.7, once the mod is installed go to Admin - Features and Options - and the CGDT options will be there.
Hehe, glad you solved it, Simplemachines Cowboy! :)
Chrisb:
As Simplemachines Cowboy already have said (thank you) you will be able to edit the greetings if you go to Admin > Features & options, if you use 1.1.7.
If you use SMF 2.0, go to Admin > Modifications > Miscellaneous
Hi Nascar,
I am running SMF1.1.7 and CGDT runs excellent. This is a great mod! I want to add it to another theme or two. The one I really like it pnpn117. Do I just need to update the code in the index.template.php for any theme I want to add this to?
Thanks,
Murray
Thanks for the comment, and glad you liked this mod.
Yes, just apply the edits on your custom themes index.template.php and it will work.
Note that many custom themes are differently structured then the default theme and the codes might have to be a bit adjusted fro some themes.
Happy holidays
Nascar
Hello all. Has anyone been able to get this to work in the BlueSkies theme by Bloc? I've tried to edit the index.template manually but I keep getting a parse error regardless of my efforts. The index.template is attached for info
Cheers
Nos
Hi Nascar,
Tried installing this mod again and as previously stated nothing happens. Now however I get the following errors:
Quote8: Undefined variable: context
File: /home/mydomain/forum/Themes/default/Packages.template.php (main_above sub template - eval?)
Line: 691
Quote8: Undefined variable: context
File: /home/mydomain/forum/Themes/default/Packages.template.php (main_above sub template - eval?)
Line: 689
Quote
8: Undefined variable: context
File: /home/mydomain/forum/Themes/default/Packages.template.php (main_above sub template - eval?)
Line: 687
There are two pages of this error everytime I clicked "Apply Mod" button through the package manager.
I am using SMF 1.1.7 with TP 1.0.6 beta 2 and using BlueSkies theme.
Quote from: nosferatu on January 03, 2009, 03:22:16 PM
Hello all. Has anyone been able to get this to work in the BlueSkies theme by Bloc? I've tried to edit the index.template manually but I keep getting a parse error regardless of my efforts. The index.template is attached for info
Cheers
Nos
Having a look at it.
Quote from: vulcan59 on January 03, 2009, 07:16:18 PM
Hi Nascar,
Tried installing this mod again and as previously stated nothing happens. Now however I get the following errors:
Quote8: Undefined variable: context
File: /home/mydomain/forum/Themes/default/Packages.template.php (main_above sub template - eval?)
Line: 691
Quote8: Undefined variable: context
File: /home/mydomain/forum/Themes/default/Packages.template.php (main_above sub template - eval?)
Line: 689
Quote
8: Undefined variable: context
File: /home/mydomain/forum/Themes/default/Packages.template.php (main_above sub template - eval?)
Line: 687
There are two pages of this error everytime I clicked "Apply Mod" button through the package manager.
I am using SMF 1.1.7 with TP 1.0.6 beta 2 and using BlueSkies theme.
Have you tried making the edits on your custom theme?
Thanks for responding Nascar. This isn't a big issue but would be quite nice to sort. I've tried to edit the index.template.php which is the only file in the theme folder affected by this mod. The problem seems to be that when I replace the below text with that suggested, I get a parse error every time. It could well be a simple formatting issue because if I put both pieces of code onto the page, I don't get a parse error but nothing else happens. This is the code in my index.template.php
Quote// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<ul><li>', $txt['hello_member'], ' ', $context['user']['name'],'</li>';
This is what is suggested as an alternative:
Quoteif ($modSettings['cgdt_enable'] && !empty($context['user']['is_logged'])) {
echo '
<td class="titlebg2" height="32"><span style="font-size: 130%;">';
// Start CGDT Mod by Nascar
$date = date('H', forum_time());
if ($modSettings['cgdt_enable'] && !empty($context['user']['is_logged']))
if ($date < 6)
echo !empty($modSettings['cgdt_message1']) ? $modSettings['cgdt_message1'] : $txt['up_late_arent_we'];
elseif ($date < 7)
echo !empty($modSettings['cgdt_message2']) ? $modSettings['cgdt_message2'] : $txt['are_you_the_early_bird'];
elseif ($date < 12)
echo !empty($modSettings['cgdt_message3']) ? $modSettings['cgdt_message3'] : $txt['good_morning'];
elseif ($date < 18)
echo !empty($modSettings['cgdt_message4']) ? $modSettings['cgdt_message4'] : $txt['good_afternoon'];
elseif ($date < 22)
echo !empty($modSettings['cgdt_message5']) ? $modSettings['cgdt_message5'] : $txt['good_evening'];
elseif ($date < 24)
echo !empty($modSettings['cgdt_message6']) ? $modSettings['cgdt_message6'] : $txt['shouldnt_you_be_going_to_bed_soon'];
if ($modSettings['cgdt_enable'] && !empty($context['user']['is_logged']))
echo ', <b>', $context['user']['name'] , '</b>
</span>
</td>';
}
else
echo '<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// End CGDT Mod by Nascar
Any ideas.
Cheers
Nos
Please copy and paste the error message here.
Hi Nascar,
QuoteHave you tried making the edits on your custom theme?
Yes, no problems with manual installation but I am just curious why I keep getting this error with your mod but not the other mods.
Regards.
Nascar,can you make it be supported by the EfsaneTurkler2 theme?'Cause i wanna put it on my forum... ::)
Having problems adding it to the new theme I want to use on my forum ... index.template.php is attached if someone could help
German translation
Modification.German_utf8.php
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'So spät noch auf'';
$txt['are_you_the_early_bird'] = 'So früh schon auf';
$txt['good_morning'] = 'Guten Morgen';
$txt['good_afternoon'] = 'Guten Tag';
$txt['good_evening'] = 'Guten Abend';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Zeit ins Bett zu gehen';
$txt['cgdt_message1'] = 'CGDT Message 1 <div class="smalltext">Wird angezeigt von Mitternacht bis 5:59</div>';
$txt['cgdt_message2'] = 'CGDT Message 2 <div class="smalltext">Wird angezeigt von 6:00 bis 6:59</div>';
$txt['cgdt_message3'] = 'CGDT Message 3 <div class="smalltext">Wird angezeigt von 7:00 bis 11:59</div>';
$txt['cgdt_message4'] = 'CGDT Message 4 <div class="smalltext">Wird angezeigt von 12:00 bis 17:59</div>';
$txt['cgdt_message5'] = 'CGDT Message 5 <div class="smalltext">Wird angezeigt von 18:00 bis 21:59</div>';
$txt['cgdt_message6'] = 'CGDT Message 6 <div class="smalltext">Wird angezeigt von 22:00 bis 23:59</div>';
$txt['cgdt_enable'] = 'Enable custom greetings <div class="smalltext">Diese Mod zeigt verschiedene Grusstext im Kopf des Forums je nach Tageszeit. <br /> Grusstexte sind unten angezeigt.</div>';
// End CGDT Mod by Nascar
Modification.German.php
// Start CGDT Mod by Nascar
$txt['up_late_arent_we'] = 'So spät noch auf'';
$txt['are_you_the_early_bird'] = 'So früh schon auf';
$txt['good_morning'] = 'Guten Morgen';
$txt['good_afternoon'] = 'Guten Tag';
$txt['good_evening'] = 'Guten Abend';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Zeit ins Bett zu gehen';
$txt['cgdt_message1'] = 'CGDT Message 1 <div class="smalltext">Wird angezeigt von Mitternacht bis 5:59</div>';
$txt['cgdt_message2'] = 'CGDT Message 2 <div class="smalltext">Wird angezeigt von 6:00 bis 6:59</div>';
$txt['cgdt_message3'] = 'CGDT Message 3 <div class="smalltext">Wird angezeigt von 7:00 bis 11:59</div>';
$txt['cgdt_message4'] = 'CGDT Message 4 <div class="smalltext">Wird angezeigt von 12:00 bis 17:59</div>';
$txt['cgdt_message5'] = 'CGDT Message 5 <div class="smalltext">Wird angezeigt von 18:00 bis 21:59</div>';
$txt['cgdt_message6'] = 'CGDT Message 6 <div class="smalltext">Wird angezeigt von 22:00 bis 23:59</div>';
$txt['cgdt_enable'] = 'Enable custom greetings <div class="smalltext">Diese Mod zeigt verschiedene Grusstext im Kopf des Forums je nach Tageszeit. <br /> Grusstexte sind unten angezeigt.</div>';
// End CGDT Mod by Nascar
Thanks, but could you please look over that translation? Parts of it are still in english. ("message" and "Enable custom greetings")
apologies ... copied the wrong bit from my text editor
$txt['cgdt_message1'] = 'CGDT Grusstext 1 <div class="smalltext">Wird angezeigt von Mitternacht bis 5:59</div>';
$txt['cgdt_message2'] = 'CGDT Grusstext 2 <div class="smalltext">Wird angezeigt von 6:00 bis 6:59</div>';
$txt['cgdt_message3'] = 'CGDT Grusstext 3 <div class="smalltext">Wird angezeigt von 7:00 bis 11:59</div>';
$txt['cgdt_message4'] = 'CGDT Grusstext 4 <div class="smalltext">Wird angezeigt von 12:00 bis 17:59</div>';
$txt['cgdt_message5'] = 'CGDT Grusstext 5 <div class="smalltext">Wird angezeigt von 18:00 bis 21:59</div>';
$txt['cgdt_message6'] = 'CGDT Grusstext 6 <div class="smalltext">Wird angezeigt von 22:00 bis 23:59</div>';
$txt['cgdt_enable'] = 'Eigene Grusstexte aktivieren <div class="smalltext">Dieses Mod zeigt verschiedene Grusstexte im Kopf des Forums je nach Tageszeit. <br /> Grusstexte sind unten angezeigt.</div>';
This part is the same for both versions as it does not contain any German Umlaute
Thanks. Illadd it to the packege soon. Bump me if I forget to.
Hey if you get the chance or some time, could you give me the fix for the IronWow theme by Crip.
Here's the index file, appreciate the work!
Great Mod. Love it :)
I only had one error
But the mod still works fine ;)
Thanks
I see the custom greeting in my ADMIN area, but isnt it supposed to work for anyone who logs in on the top right corner where it says "Hello (username)"??? If it only works in the admin area, sorry to say but its kind of pointless and would make this mod suck. If Im doing something wrong where its only showing in my admin area, please let me know, this is for my viewers, not for me.
Are you using a custom theme, grfkdesign?
Then that is why. Yo uneed to manually edit your custom theme.
v1.0 is comming. This mod moves the actual message to sourcefiles, which means that only a very small variable will have to be added to custom themes.
Added a unested version of 1.0.
Please backup all affected files before installation.
Uninstall old versions before installing this one.
Spanish Translation
// Start CGDT Mod by Nas
$txt['up_late_arent_we'] = 'Es Muy Tarde No';
$txt['are_you_the_early_bird'] = 'Esres el ave mañanera';
$txt['good_morning'] = 'Buenos Dias';
$txt['good_afternoon'] = 'Buenas Tardes';
$txt['good_evening'] = 'Buenas Noches';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Deberias Ir A La Cama Muy Pronto Shouldn\'t You Be Going To Bed Soon';
$txt['cgdt_message1'] = 'Mensaje CGDT 1 <div class="smalltext">Mostrado desde las 12:00am hasta las 5:59am</div>';
$txt['cgdt_message2'] = 'Mensaje CGDT 2 <div class="smalltext">Mostrado desde las 6:00am hasta las 6:59am</div>';
$txt['cgdt_message3'] = 'Mensaje CGDT 3 <div class="smalltext">Mostrado desde las 7:00 hasta las 11:59am</div>';
$txt['cgdt_message4'] = 'Mensaje CGDT 4 <div class="smalltext">Mostrado desde las 12:00pm hasta las 5:59pm</div>';
$txt['cgdt_message5'] = 'Mensaje CGDT 5 <div class="smalltext">Mostrado desde las 6:00pm hasta las 9:59pm</div>';
$txt['cgdt_message6'] = 'Mensaje CGDT 6 <div class="smalltext">Mostrado desde las 10:00pm hasta las 11:59pm</div>';
$txt['cgdt_enable'] = 'Enable custom greetings <div class="smalltext">Esto deberia mostrar diferentes saludos en el Encabezado del foro dependiendo de la hora del dia. <br /> Los Mensajes se Establecen Luego.</div>';
// End CGDT Mod by Nas
Hey
Great mod, it installed fine and it seems to work fine but in my error log i see this:
8: Undefined index: greeting
File: /Themes/default/Errors.template.php (body_above sub template - eval?)
Line: 242
I've attached my Errors.template.php file, any help would be appreciated :)
Edit: Im using 2.0 RC1 with default theme
Quote from: Tanks on April 26, 2009, 10:06:26 AM
Hey
Great mod, it installed fine and it seems to work fine but in my error log i see this:
8: Undefined index: greeting
File: /Themes/default/Errors.template.php (body_above sub template - eval?)
Line: 242
I've attached my Errors.template.php file, any help would be appreciated :)
Edit: Im using 2.0 RC1 with default theme
I'm getting the same error, but mine is on Login.template.php.
Yes i also have this error on login.php and errors.php.
Any fix for this ?
hello..
Good mod :)
Turkish translate.
Modifications.turkish.php
// Start CGDT Mod by Nas
$txt['up_late_arent_we'] = 'Geç Kaldık Değil Mi ?.'; // Sabahlarmısınız diyede çevirilebilir
$txt['are_you_the_early_bird'] = 'Çok Erkencisiniz ';
$txt['good_morning'] = 'Günaydın';
$txt['good_afternoon'] = 'Tünaydın';
$txt['good_evening'] = 'İyi Akşamlar';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Uykuya yakın olmanız lazım degilmiydi?'; // Geceye hoşgeldiniz olarakda çevirilebilir.
$txt['cgdt_message1'] = 'CGDT Mesaj 1 <div class="smalltext">Gösterim zamanı 12:00am , 5:59am</div>';
$txt['cgdt_message2'] = 'CGDT Mesaj 2 <div class="smalltext">Gösterim zamanı at 6:00am to 6:59am</div>';
$txt['cgdt_message3'] = 'CGDT Mesaj 3 <div class="smalltext">Gösterim zamanı at 7:00 to 11:59am</div>';
$txt['cgdt_message4'] = 'CGDT Mesaj 4 <div class="smalltext">Gösterim zamanı at 12:00pm to 5:59pm</div>';
$txt['cgdt_message5'] = 'CGDT Mesaj 5 <div class="smalltext">Gösterim zamanı at 6:00pm to 9:59pm</div>';
$txt['cgdt_message6'] = 'CGDT Mesaj 6 <div class="smalltext">Gösterim zamanı at 10:00pm to 11:59pm</div>';
$txt['cgdt_enable'] = 'Özel Selamları Aktif Et <div class="smalltext">Günün zamanına bağlı olarak forum başlıgında farklı selamlar gösterir. <br /> Mesajlar Aşagıda Belirtilmiştir..</div>';
// End CGDT Mod by Nas
HI, I just installed this mod and now my forum will not open. I tried it both in FF and IE but I get a blank white page.
http://pircnet.com/forum
What should I do? I was going to try and uninstall it using the parser but I don't know which files to modify - the ones with the little squiggied ~ after the name or the other one by the same name. Both have the same date as well .
Update: Never mind, I figured out how to remove the module manually and everything works perfectly now.
I don't know if it makes any difference or not but the code that was in the index.php file ws in there twice, one right after the other. Could that have caused the problem?
Quote from: Tanks on May 04, 2009, 01:22:52 AM
Yes i also have this error on login.php and errors.php.
Any fix for this ?
Same any idea ?
I'm sorry for the lack of response on this one.
I've been inactive at SMF for some time, but now I'll have a look into this.
i wasn't able to reproduce the error, but this fix mgiht help you:
Find:
if(!empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$context['user']['name'].'</strong>';
}
elseif(!empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_member_ndt'].', <strong>'.$context['user']['name'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$txt['guest'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_guest'].', <strong>'.$txt['guest'].'</strong>';
}
Replace with:
if(!empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = @$greeting.', <strong>'.$context['user']['name'].'</strong>';
}
elseif(!empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_member_ndt'].', <strong>'.$context['user']['name'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = @$greeting.', <strong>'.$txt['guest'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_guest'].', <strong>'.$txt['guest'].'</strong>';
}
sorry I did not go back and read all the pages, so sorry if this problem has been answered.. I loaded and it works fine in the admin screen... but I only see it on the admin screen not on the welcome pages..
Quote from: sreisenb001 on May 23, 2009, 07:41:05 PM
sorry I did not go back and read all the pages, so sorry if this problem has been answered.. I loaded and it works fine in the admin screen... but I only see it on the admin screen not on the welcome pages..
Are you using a custom theme?
yes.... I just thought it was weird it showed up in place on the theme but not the other
It shows up in the adminpanel as that is another template, and your theme doesnot have that template - Therefor it used the default template for that area. The defaulttemplate is edited, so the message shows up there.
To make it show up in your custom theme, go back to the modsite, choose your version and click parse.
In there you'll see the edits you need to do.
The only edit required for your theme is to add ', $context['greeting'], ' whee you want the greeting.
thanks :D
Cooool man ! :)
Quote from: Nas on May 24, 2009, 06:53:28 AM
It shows up in the adminpanel as that is another template, and your theme doesnot have that template - Therefor it used the default template for that area. The defaulttemplate is edited, so the message shows up there.
To make it show up in your custom theme, go back to the modsite, choose your version and click parse.
In there you'll see the edits you need to do.
The only edit required for your theme is to add ', $context['greeting'], ' whee you want the greeting.
So i used the parse and made the changes... still nothing
It works great with DilberMc, but can I get help with BluesMc, here is my index.templete.php:
THX!
Ps....I'm using CGDT 1.1
Try the attached file.
What I did was removing this:
// Otherwise they're a guest - send them a lovely greeting...
else
echo '<div style="margin-right: 100px;">', $txt['welcome_guest'], '</div>';
And replacing this:
if($context['user']['is_logged'])
echo '
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span><br />';
With this:
<span style="font-size: 130%;">', $context['greeting'] , '</span><br />';
Let me know if you need anything more. :)
Quote from: sreisenb001 on May 25, 2009, 03:00:14 PM
Quote from: Nas on May 24, 2009, 06:53:28 AM
It shows up in the adminpanel as that is another template, and your theme doesnot have that template - Therefor it used the default template for that area. The defaulttemplate is edited, so the message shows up there.
To make it show up in your custom theme, go back to the modsite, choose your version and click parse.
In there you'll see the edits you need to do.
The only edit required for your theme is to add ', $context['greeting'], ' whee you want the greeting.
So i used the parse and made the changes... still nothing
May I see your ./Themes/{your_theme}/index.template.php ?
Quote from: Nas on May 26, 2009, 12:45:29 PM
Try the attached file.
What I did was removing this:
// Otherwise they're a guest - send them a lovely greeting...
else
echo '<div style="margin-right: 100px;">', $txt['welcome_guest'], '</div>';
And replacing this:
if($context['user']['is_logged'])
echo '
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span><br />';
With this:
<span style="font-size: 130%;">', $context['greeting'] , '</span><br />';
Let me know if you need anything more. :)
Nothing happened :'(...I see Hello, and other normal SMF things. I see fileds in custom theme where I can write what I want but it's visible only in default theme.
Sorry, thats totally my fault. I attached the wrong file erlier. Sorry about that. Try the new one below.
Quote from: Nas on May 26, 2009, 01:03:37 PM
Sorry, thats totally my fault. I attached the wrong file erlier. Sorry about that. Try the new one below.
Oooo Yes, it works percetly, many thanks!
You're welcome! :)
Quote from: Nas on May 26, 2009, 12:46:44 PM
Quote from: sreisenb001 on May 25, 2009, 03:00:14 PM
Quote from: Nas on May 24, 2009, 06:53:28 AM
It shows up in the adminpanel as that is another template, and your theme doesnot have that template - Therefor it used the default template for that area. The defaulttemplate is edited, so the message shows up there.
To make it show up in your custom theme, go back to the modsite, choose your version and click parse.
In there you'll see the edits you need to do.
The only edit required for your theme is to add ', $context['greeting'], ' whee you want the greeting.
So i used the parse and made the changes... still nothing
May I see your ./Themes/{your_theme}/index.template.php ?
I am new to all this... how do i get that to you.. it is big file
Use FTP (How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480)) and downloads that file. Then go back here and click on "Reply". Write your message, and click on "Additional options". Browse for your file, and post.
It is possible to add a function of the message by day?
If this is Friday then be written in "good weekend"?
Quote from: ttuu on May 27, 2009, 12:48:49 AM
It is possible to add a function of the message by day?
If this is Friday then be written in "good weekend"?
That'd be possible. I'll come back to that in a few hours. :)
Great mod nascar, keep up the good work.
hi, tried this on default core, installed using packages on smf119, it works on the default theme but how to install on custom themes?
Simply edit ./Themes/{your_theme}/index.template.php, and add ', $context['greeting'], ' where you want to display the greeting. (the greeting includes the user name and everything)
Quote from: Nas on May 27, 2009, 12:49:24 AM
Quote from: ttuu on May 27, 2009, 12:48:49 AM
It is possible to add a function of the message by day?
If this is Friday then be written in "good weekend"?
That'd be possible. I'll come back to that in a few hours. :)
any news?
Do you want that instead of the "timebased" greetings or do yo uwant both of them at the same time?
instead
Okey, install the latest version of the mod.
then go to ./Sources/Load.php.
// Load a custom greeting
function loadGreeting()
{
global $context, $txt, $modSettings;
$date = date('H', forum_time());
if ($date < 6)
$greeting = !empty($modSettings['cgdt_message1']) ? $modSettings['cgdt_message1'] : $txt['up_late_arent_we'];
elseif ($date < 7)
$greeting = !empty($modSettings['cgdt_message2']) ? $modSettings['cgdt_message2'] : $txt['are_you_the_early_bird'];
elseif ($date < 12)
$greeting = !empty($modSettings['cgdt_message3']) ? $modSettings['cgdt_message3'] : $txt['good_morning'];
elseif ($date < 18)
$greeting = !empty($modSettings['cgdt_message4']) ? $modSettings['cgdt_message4'] : $txt['good_afternoon'];
elseif ($date < 22)
$greeting = !empty($modSettings['cgdt_message5']) ? $modSettings['cgdt_message5'] : $txt['good_evening'];
elseif ($date < 24)
$greeting = !empty($modSettings['cgdt_message6']) ? $modSettings['cgdt_message6'] : $txt['shouldnt_you_be_going_to_bed_soon'];
if(!empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$context['user']['name'].'</strong>';
}
elseif(!empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_member_ndt'].', <strong>'.$context['user']['name'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$txt['guest'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_guest'].', <strong>'.$txt['guest'].'</strong>';
}
}
// Load a custom greeting
function loadGreeting()
{
global $context, $txt, $modSettings;
$date = date('D', forum_time());
if ($date = 'Mon')
$greeting = $modSettings['cgdt_message1'];
elseif ($date = 'Tue')
$greeting = $modSettings['cgdt_message2'];
elseif ($date = 'Wed')
$greeting = $modSettings['cgdt_message3'];
elseif ($date = 'Thu')
$greeting = $modSettings['cgdt_message4'];
elseif ($date = 'Fri')
$greeting = $modSettings['cgdt_message5'];
elseif $date = 'Sat')
$greeting = $modSettings['cgdt_message6'];
elseif $date = 'Sun')
$greeting = $modSettings['cgdt_message7'];
if(!empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$context['user']['name'].'</strong>';
}
elseif(!empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_member_ndt'].', <strong>'.$context['user']['name'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$txt['guest'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_guest'].', <strong>'.$txt['guest'].'</strong>';
}
}
Save.
Then go to ./Sources/MangeSettings.php
array('text', 'cgdt_message6'),
array('text', 'cgdt_message6'),
array('text', 'cgdt_message7'),
That should enable you to go to Admin > Modifications, and enter 7 different messages. The first is for Monday, the last is for Sunday.
its not work. after change i cannot see any custom message.
Quote from: Nas on June 22, 2009, 05:40:45 AM
Simply edit ./Themes/{your_theme}/index.template.php, and add ', $context['greeting'], ' where you want to display the greeting. (the greeting includes the user name and everything)
hi, thanks it worked =)
Quote from: ttuu on June 22, 2009, 04:40:06 PM
its not work. after change i cannot see any custom message.
Try this in Load.php instead:
// Load a custom greeting
function loadGreeting()
{
global $context, $txt, $modSettings;
$date = date('N', forum_time());
if ($date = 1)
$greeting = $modSettings['cgdt_message1'];
elseif ($date = 2)
$greeting = $modSettings['cgdt_message2'];
elseif ($date = 3)
$greeting = $modSettings['cgdt_message3'];
elseif ($date = 4)
$greeting = $modSettings['cgdt_message4'];
elseif ($date = 5)
$greeting = $modSettings['cgdt_message5'];
elseif $date = 6)
$greeting = $modSettings['cgdt_message6'];
elseif $date = 7)
$greeting = $modSettings['cgdt_message7'];
if(!empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$context['user']['name'].'</strong>';
}
elseif(!empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_member_ndt'].', <strong>'.$context['user']['name'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$txt['guest'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_guest'].', <strong>'.$txt['guest'].'</strong>';
}
}
Quote from: Nas on June 28, 2009, 05:16:14 AM
Quote from: ttuu on June 22, 2009, 04:40:06 PM
its not work. after change i cannot see any custom message.
Try this in Load.php instead:
// Load a custom greeting
function loadGreeting()
{
global $context, $txt, $modSettings;
$date = date('N', forum_time());
if ($date = 1)
$greeting = $modSettings['cgdt_message1'];
elseif ($date = 2)
$greeting = $modSettings['cgdt_message2'];
elseif ($date = 3)
$greeting = $modSettings['cgdt_message3'];
elseif ($date = 4)
$greeting = $modSettings['cgdt_message4'];
elseif ($date = 5)
$greeting = $modSettings['cgdt_message5'];
elseif $date = 6)
$greeting = $modSettings['cgdt_message6'];
elseif $date = 7)
$greeting = $modSettings['cgdt_message7'];
if(!empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$context['user']['name'].'</strong>';
}
elseif(!empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_member_ndt'].', <strong>'.$context['user']['name'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && !empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $greeting.', <strong>'.$txt['guest'].'</strong>';
}
elseif(empty($context['user']['is_logged']) && empty($modSettings['cgdt_enable'])) {
$context['greeting'] = $txt['hello_guest'].', <strong>'.$txt['guest'].'</strong>';
}
}
still not work.
I have just installed this and went right to the error log and notice this error and after clearing it out after the page reloads it comes right back.
8: Undefined index: good_morning
File: /home2/ac919h/public_html/Sources/Load.php
Line: 2223
The mod shows the custom greeting but there is nothing showing in the members area.
How do I correct this?
I have added my index php for you to look at
That is not the file I need. The file is located in ./Sources/.
Edit: Sorry, it's Load.php I need.
Here ya go bud.
Nas
Where do I go to change the font colour?
You could use HTML in the CGDT messagebox in the admin panel,
<span style="color: #cccccc">Good morning</span>
Thanks Bud Looks a lot better.
now it's w3c xhtml validator???
Hi Nas
I noticed, as a guest. It says Hello instead of being blank
Joe on both of my forums I use this mod and the message are the same for guests and members.
Oh yeah. Must of been smf 1x
Hi. Great mod and my members love it. Thanks! I have 1.1.10 and am getting this error.
Undefined index: greeting
File: /Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 190
Is this post earlier the fix?
http://www.simplemachines.org/community/index.php?topic=260367.msg2074121#msg2074121
Yes, bbmtalk, that fix should do it. :)
Great! Thanks, Nas. Which file should I edit?
./Sources/Load.php
thanks. I edited the file but it is giving me error.
Parse error: syntax error, unexpected $end in /Sources/Load.php on line 2316
Make sure you added the complete code, it looks like youve forgotten to add a }
If you attach your Load.php, somebody may take a look at it for you
Thanks, Sabre. Looks like I didn't copy and paste the code correctly. I just edited the code again and this time it is not giving me the syntax error after uploading. I will follow up if there is still something in the error log.
No worries champ, glad you got it sorted out :)
Thanks, Sabre. It seems that the greeting error now is gone.
Thank's for helping out, Sabre :)
I'm glad you got it solved, bbmtalk.
Sorry to be a pain. The same error message appears today again.
Undefined index: greeting
File: /Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 190
I notice it only appears when a particular member logs on. Any help please. Thanks!
erm...
just installed this, didn't see any conflicts
now I'm getting this:
QuoteFatal error: Cannot redeclare loadgreeting() (previously declared in .../public_html/Sources/Load.php:2217) in .../public_html/Sources/Load.php on line 2292
from my browser
I suspect that my connection might have dropped at the wrong moment causing a resend of "install this mod"
would that explain it?, (I'm very new to this, and kinda freaking out)
Should I manually remove the edits? since I can't get to my control panel is there another way?
on SMF 1.1.10
Hello, damouse!
That is indeed caused by the mod being installed twice. You should locate Load.php and remove loadgreeting() once - Leave one of the two functions.
:o :o :o :o :o :o is very very very cool! :o :o :o :D
Edit: installation error
QuoteYou cannot download or install new packages because the Packages directory or one of the files in it are not writable!
Why?
Quote from: Nas on October 16, 2009, 01:41:45 AM
Hello, damouse!
That is indeed caused by the mod being installed twice. You should locate Load.php and remove loadgreeting() once - Leave one of the two functions.
thank you so much for the quick response
ok I found it, and fixed it then I went through other other edits and caught them too. got my pages back etc.
I'm still having trouble, the greeting has defaulted to "hello" in bold. And generating an error message on the log for each user on every page, at every time of day :/ ... makes my users very easy to track because it happens on every page and the time of day is practically included in the message :P
Quote
.../index.php?action=viewErrorLog;desc
Apply Filter: Only show the errors with the same message
8: Undefined index: good_afternoon
File:...blic_html/Sources/Load.php
Line: 2233
I'm going to go through all the edits manually and just check myself, I ran the uninstall test which tells me both modsettings and theme/index were not as expected
I'll let you know how it goes.
Hi again
I cleaned up all the modifications to their original...at least I thought I had
but somethings still amiss
I know it's not technically the mod that caused it, but a practical error during installation, but I sure could use some help on this.
when the mod is installed, the greeting remains
QuoteHello,Username
and I get an error in the log like this:
Quote8: Undefined index: up_late_arent_we
File:.../public_html/Sources/Load.php
Line: 2227
when the mod is uninstalled there is no greeting whatsoever, just a blank line
do I need to make a change to a table, how do I correct the "undefined Index" mentioned above
*Edit, ok the blank line is only on the Abagail theme, so disregard that tidbit, I'll have to solve that.
This is purely a cosmetic mod, but it adds a nice touch... would love an SMF2 RC2 version. :)
Thanks!
sremick, hopefully I'll get around to update it this weekend. :)
scuse me but now it's w3c ok??
Quote from: Nas on November 13, 2009, 03:20:09 AM
sremick, hopefully I'll get around to update it this weekend. :)
Any News? ;)
No news? :-[
Bump. :)
Russian translation:
// Start CGDT Mod by Nas
$txt['up_late_arent_we'] = 'Поздновато ты';
$txt['are_you_the_early_bird'] = 'А ты ранняя пташка';
$txt['good_morning'] = 'Доброе утро';
$txt['good_afternoon'] = 'День добрый';
$txt['good_evening'] = 'Вечер добрый';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'А не пора ли тебе в кроватку';
$txt['cgdt_message1'] = 'CGDT сообщение 1 <div class="smalltext">Отображается с 0:00 до 5:59</div>';
$txt['cgdt_message2'] = 'CGDT сообщение 2 <div class="smalltext">Отображается с 6:00 до 6:59</div>';
$txt['cgdt_message3'] = 'CGDT сообщение 3 <div class="smalltext">Отображается с 7:00 до 11:59</div>';
$txt['cgdt_message4'] = 'CGDT сообщение 4 <div class="smalltext">Отображается с 12:00 до 17:59</div>';
$txt['cgdt_message5'] = 'CGDT сообщение 5 <div class="smalltext">Отображается с 18:00 до 21:59</div>';
$txt['cgdt_message6'] = 'CGDT сообщение 6 <div class="smalltext">Отображается с 22:00 до 23:59</div>';
$txt['cgdt_enable'] = 'Включить выборочные привествия <div class="smalltext">Эта опция активирует демонстрацию различных приветствий в зависимости от времени суток.</div>';
// End CGDT Mod by Nas
As there seems to be no update to the mod being ready for 2.0 RC2 I would hazard a guess that a manual edit may be in order.
Please update to 2.0RC2
I have marked this modification as Archived for now, as I don't have the time or interest to actively support or develop it on this very moment.
Once SimpleDesk and my other mods and projects come further along, I will update this modification for the latest version and start to support it again.
Sorry for the inconvenience.
Per request, i updated this mod for RC2.
NAS, i hope im not stepping in your shoes. :o
this is my log error
8: Undefined index: greeting
Same Solution?
Thanks you =)
Just as an update on this one, I'm going to upgrade it for RC3 during the coming couple of weeks. Hold on ;)
Quote from: Nas on March 09, 2010, 02:45:47 PM
Just as an update on this one, I'm going to upgrade it for RC3 during the coming couple of weeks. Hold on ;)
What about Rc2?
Quote from: BlueDevil on February 12, 2010, 02:47:30 PM
Per request, i updated this mod for RC2.
NAS, i hope im not stepping in your shoes. :o
You have this mod for rc2?
Nice Mod
Please update it for SMF 2.0RC3 ;)
Thanks
Quote from: Bobn on March 14, 2010, 06:02:38 PM
Quote from: Nas on March 09, 2010, 02:45:47 PM
Just as an update on this one, I'm going to upgrade it for RC3 during the coming couple of weeks. Hold on ;)
What about Rc2?
Uh, no, RC2 is outdated, buggy, and insecure...
Quote from: Eclipse16V on March 15, 2010, 01:49:43 AM
Nice Mod
Please update it for SMF 2.0RC3 ;)
Thanks
Will do within the next few weeks.
Went ahead and updated this. It should now work on SMF 2.0 RC3. Let me know of any issues.
Will this work on rc2? I am told that if I want to upgrade I will loos all my mods and settings in all my themes,,, what a pain. love this mod
It is not tested on RC2, however if you try to emulate SMF 2.0 RC3 in your package manager it should work.
Quote from: Nas on March 16, 2010, 11:44:55 AM
It is not tested on RC2, however if you try to emulate SMF 2.0 RC3 in your package manager it should work.
Thanks,, I dont see that in the packages,, Also I dont know the software well enough.
To emulate a version, go to your package managers and look at the bottom. You'll see an "Advanced" link to the right, just below the list of installed packages. Click on that, and then type 'SMF 2.0 RC3' (without the quotes). That should allow you to install this mod.
Cool, what was fixed in this release? What's the changelogs?
Only made some minor code cleanup and added RC3 support. No new functions at this point. I may add some after the release of SimpleDesk, taken that there actually is something to add. Ideas? ;)
Quote from: Nas on March 16, 2010, 11:53:37 AM
To emulate a version, go to your package managers and look at the bottom. You'll see an "Advanced" link to the right, just below the list of installed packages. Click on that, and then type 'SMF 2.0 RC3' (without the quotes). That should allow you to install this mod.
Worked! How can I manually install this mode on other templates sir?
It has potential yes, How about customizing time?
Quote from: Bobn on March 16, 2010, 12:05:22 PM
Quote from: Nas on March 16, 2010, 11:53:37 AM
To emulate a version, go to your package managers and look at the bottom. You'll see an "Advanced" link to the right, just below the list of installed packages. Click on that, and then type 'SMF 2.0 RC3' (without the quotes). That should allow you to install this mod.
Worked! How can I manually install this mode on other templates sir?
If the edit used for the default theme (Curve) doesn't work on your theme, i.e the lines are different, you need to find the line in ./Themes/{your_theme}/index.template.php that prints the default greeting, and replace the greeting code there with ', $context['greeting'], '.
Quote from: Dismal Shadow on March 16, 2010, 12:08:08 PM
It has potential yes, How about customizing time?
That could indeed be an idea.
Quote from: Nas on March 16, 2010, 12:09:39 PM
Quote from: Bobn on March 16, 2010, 12:05:22 PM
Quote from: Nas on March 16, 2010, 11:53:37 AM
To emulate a version, go to your package managers and look at the bottom. You'll see an "Advanced" link to the right, just below the list of installed packages. Click on that, and then type 'SMF 2.0 RC3' (without the quotes). That should allow you to install this mod.
Worked! How can I manually install this mode on other templates sir?
If the edit used for the default theme (Curve) doesn't work on your theme, i.e the lines are different, you need to find the line in ./Themes/{your_theme}/index.template.php that prints the default greeting, and replace the greeting code there with ', $context['greeting'], '.
Quote from: Dismal Shadow on March 16, 2010, 12:08:08 PM
It has potential yes, How about customizing time?
That could indeed be an idea.
Could you look at my index.template.php?
<?php
// Version: 2.0 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['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'] = '2.0 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;
/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;
/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;
/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;
/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}
// The main sub template above the content.
function template_html_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title_html_safe'], '" />
<meta name="keywords" content="', $context['meta_keywords'], '" />
<title>', $context['page_title_html_safe'], '</title>';
// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />';
// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="', $context['canonical_url'], '" />';
// The ?rc2 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'], '/css/index', $context['theme_variant'], '.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?rc2" media="print" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<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']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['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']);
}
// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7', 'ie6', 'firefox', 'webkit') as $cssfix)
if ($context['browser']['is_' . $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/', $cssfix, '.css" />';
// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css" />';
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?rc2"></script>
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/theme.js?rc2"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_default_theme_url = "', $settings['default_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'], '";', $context['show_pm_popup'] ? '
var fPmPopup = function ()
{
if (confirm("' . $txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' : '', '
var ajax_notification_text = "', $txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
// ]]></script>';
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];
echo '
</head>
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="mainframe"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
<div id="header">
<div id="head-l">
<div id="head-r">
<div id="userarea" class="clearfix">
<table width="100%">';
if (!empty($context['user']['avatar']))
echo '<div id="my-avatar" class="clearfix">'.$context['user']['avatar']['image'].'</div>';
if ($context['user']['is_logged']){
echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
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 - this time ask them to either register or login - lazy bums...
else
{
echo sprintf($txt['welcome_guest'], $txt['guest_title']);
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<input type="submit" value="', $txt['login'], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $context['current_time'],'<br />';
}
// Begin Ad Seller Pro Location - Welcome Area/User Information Box
global $sourcedir;
include_once $sourcedir . "/adseller2.php";
$adSellerAdData = ShowAdLocation(13);
if ($adSellerAdData != false)
{
echo '</td>';
echo '<td class="windowbg">';
echo $adSellerAdData;
}
// End Ad Seller Pro Location - Welcome Area/User Information Box
echo '</table>
</div>
<div id="searcharea">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" /> ';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>
</div>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])){
echo '<div id="news">
<b>', $txt['news'], ':</b> ', $context['random_news_line'], '</div>';}
echo '
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>';
echo '
<div id="toolbar">
',template_menu(),'
</div>
<div id="bodyarea">';
theme_linktree2();
// Begin Ad Seller Pro Location - Overall Header
global $sourcedir;
include_once $sourcedir . "/adseller2.php";
$adSellerAdData = ShowAdLocation(1);
if ($adSellerAdData != false)
{
echo $adSellerAdData;
}
// End Ad Seller Pro Location - Overall Header
// Begin Ad Seller Pro Location - Left Side of the Forum
echo '<table border="0" width="100%">
<tr>';
global $sourcedir;
include_once $sourcedir . "/adseller2.php";
$adSellerAdData = ShowAdLocation(9);
if ($adSellerAdData != false)
{
echo '<td valign="top">';
echo $adSellerAdData;
echo '</td>';
}
echo '<td valign="top" width="100%">';
// End Ad Seller Pro Location - Left Side of the Forum
}
function template_body_below()
{
global $context, $settings, $options, $scripturl, $txt;
// Begin Ad Seller Pro Location - Right Side of the Forum
echo '</td>';
global $sourcedir;
include_once $sourcedir . "/adseller2.php";
$adSellerAdData = ShowAdLocation(10);
if ($adSellerAdData != false)
{
echo '<td valign="top">';
echo $adSellerAdData;
echo '</td>';
}
echo '</tr></table>';
// End Ad Seller Pro Location - Right Side of the Forum
echo '
</div>';
// Begin Ad Seller Pro Location - Overall Footer
global $sourcedir;
include_once $sourcedir . "/adseller2.php";
$adSellerAdData = ShowAdLocation(2);
if ($adSellerAdData != false)
{
echo $adSellerAdData;
}
// End Ad Seller Pro Location - Overall Footer
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer">
<div id="foot-l">
<div id="foot-r">
<div id="footerarea" class="smalltext">
<div class="right">', theme_copyright(), ' | <a id="button_xhtml" href="http://validator.w3.org/check/referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>XHTML</span></a> | <a id="button_rss" href="', $scripturl , '?type=rss;action=.xml" class="new_win"><span>RSS</span></a> | <a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>WAP2</span></a>
</div>
<div class="left">
<strong>Anecdota</strong> by <a href="http://www.jpr62.com/theme/index.php"><strong>Crip</strong></a>
</div>';
// Show the load time?
if ($context['show_load_time'])
echo '
<p class="smalltext" id="show_loadtime">', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';
echo '
</div>
</div>
</div>
</div>';
}
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree2()
{
global $context, $settings, $options;
echo '
<div id="linktree">';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &#187; ';
}
echo '
</div>';
}
function theme_linktree()
{
return;
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="menumain">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';
echo '
</ul>
</div>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $strip_options = array())
{
global $settings, $context, $txt, $scripturl;
if (!is_array($strip_options))
$strip_options = array();
// Right to left menu should be in reverse order.
if ($context['right_to_left'])
$button_strip = array_reverse($button_strip, true);
// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<li' . (isset($value['active']) ? ' class="active"' : '') . '><a href="' . $value['url'] . '"' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . (isset($value['active']) ? '<em>' : '') . $txt[$value['text']] . (isset($value['active']) ? '</em>' : '') . '</span></a></li>';
// No buttons? No button strip either.
if (empty($buttons))
return;
// Make the last one, as easy as possible.
$list_item = array('<li>', '<li class="active">');
$active_item = array('<li class="last">', '<li class="active last">');
$buttons[count($buttons) - 1] = str_replace($list_item, $active_item, $buttons[count($buttons) - 1]);
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '>
<ul class="reset clearfix">
', implode('', $buttons), '
</ul>
</div>';
}
?>
This line:
echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';
Will need $context['greeting']. Like this:
echo $context['greeting'], '<br />';
Quote from: Nas on March 16, 2010, 12:30:46 PM
This line:
echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';
Will need $context['greeting']. Like this:
echo $context['greeting'], '<br />';
Yea! Yea! Works great! Thanks!! Anyway to bold the greeting?
To bold:
echo '<strong>', $context['greeting'], '</strong><br />';
Quote from: Nas on March 16, 2010, 12:40:49 PM
To bold:
echo '<strong>', $context['greeting'], '</strong><br />';
Thanks! Your awesome! This is one of my favorite mods :)
Glad to be able to help, Bobn. :)
Quote from: Bobn on March 16, 2010, 12:47:12 PM
Quote from: Nas on March 16, 2010, 12:40:49 PM
To bold:
echo '<strong>', $context['greeting'], '</strong><br />';
Thanks! Your awesome! This is one of my favorite mods :)
Try on this for size
"What are you doing awake? It's late, Dismal Shadow"
The forum orders me. ;D
Thanks Nas
Work fine on RC3
German Lang
$txt['up_late_arent_we'] = 'So spät noch auf';
$txt['are_you_the_early_bird'] = 'So früh schon auf';
$txt['good_morning'] = 'Guten Morgen';
$txt['good_afternoon'] = 'Guten Tag';
$txt['good_evening'] = 'Guten Abend';
$txt['shouldnt_you_be_going_to_bed_soon'] = 'Zeit ins Bett zu gehen';
$txt['cgdt_message1'] = 'CGDT Grusstext 1 <div class="smalltext">Wird angezeigt von Mitternacht bis 5:59</div>';
$txt['cgdt_message2'] = 'CGDT Grusstext 2 <div class="smalltext">Wird angezeigt von 6:00 bis 6:59</div>';
$txt['cgdt_message3'] = 'CGDT Grusstext 3 <div class="smalltext">Wird angezeigt von 7:00 bis 11:59</div>';
$txt['cgdt_message4'] = 'CGDT Grusstext 4 <div class="smalltext">Wird angezeigt von 12:00 bis 17:59</div>';
$txt['cgdt_message5'] = 'CGDT Grusstext 5 <div class="smalltext">Wird angezeigt von 18:00 bis 21:59</div>';
$txt['cgdt_message6'] = 'CGDT Grusstext 6 <div class="smalltext">Wird angezeigt von 22:00 bis 23:59</div>';
$txt['cgdt_enable'] = 'Eigene Grusstexte aktivieren <div class="smalltext">Dieses Mod zeigt verschiedene Grusstexte im Kopf des Forums je nach Tageszeit. <br /> Grusstexte sind unten angezeigt.</div>';
Got another bug for you, Nas.
I don't know how to duplicate this, but it appear on the error log from time to time.
8: Undefined index: greeting
File: /home/user/public_html/forum.com/Themes/default/index.template.php
Line: 250
What? Is that still there? Thought I fixed it. Will look later.
Hi NAS,
I've gotten passably good at making my own edits, but in this case the word greeting, nevermind that whole line, isn't even in the index.template.php for Aaron's Bright Forest theme. The mod works fine in the default theme.
I've had it working fine in my 1.1.11 forum forever. This is 2.0 rc3 If you could take a glance at this file and tell me where to put that one simple edit. I sure would appreciate it.
Thanks
Hi Nas.
My custom theme index.template.php uses this:
echo '<div class="profile_info"><h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
rather than this:
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
So putting this: <span style="font-size: 130%;"> ',$context['greeting'],'</span>
Gives me this error:
441: {
442: if (!empty($context['user']['avatar']))
443: {
444: $context['user']['avatar']['image'] = strtr($context['user']['avatar']['image'], array("class=\"avatar\"" => "class=\"avatar_t\""));
445: echo '<div style="margin-top: 15px; float: left;">', $context['user']['avatar']['image'], '</div>';
446: }
447: else
448: echo '<div style="margin-top: 15px; float: left;"><a href="' . $scripturl . '?action=profile;u=', $context['user']['id'], ';sa=forumProfile"><img src="' . $settings['images_url'] . '/noavatar.png" alt="missing avatar" alt="" width="65px" height="65px" /></a></div>';
449:
450: <span style="font-size: 130%;"> ',$context['greeting'],'</span>
451:
452: echo '<div id="useropts"><ul>';
453: // Only tell them about their messages if they can read their messages!
454: if ($context['allow_pm'])
Is there a work around?
Many, many thanks.
You've removed the echo().
echo'<span style="font-size: 130%;"> ',$context['greeting'],'</span>';
Should be like that.
Well... that broke the theme.
This worked:
echo '<div class="profile_info"><h3>',$context['greeting'],'</b></h3>';
That includes the theme specifications, but then? No change. It simply says:
Hello, ____
Any guesses?
Quote from: Scratching my Head on April 18, 2010, 04:12:57 PM
Well... that broke the theme.
I based it on what you posted, so that's why...
Quote from: Scratching my Head on April 18, 2010, 04:12:57 PM
That includes the theme specifications, but then? No change. It simply says:
Hello, ____
Any errors in the log? Is the mod properly installed?
I installed by hand on a test forum... good advice to anyone: Install test forum, test mods there first (wink)...
So everything installed fine. Just no change, Nas. I can't figure it out?
No errors.
Hello Nas,
We installed Your mod and it technically works.
But:
while in the Admincenter the right messages are chosen (and therefore obviously the right time) on the starting page the wrong text is displayed.
Can you imagine how this difference can occur? Where can I check, which times are used?
I am sorry, Newby and not-native, hope you do understand what I mean anyway.
Thanks,
Jessy
[Edit: sorry, the problem is solved.
Somehow the inputs made in the administrator center directly are not written into the Modifications.german.php. Did this manually and it works fine
Jessy]
This is a great mod but will it be made compatible with RC4 as well. Just upgraded and lost the mod!
Many thanks
Okay, I read all 16 pages, but must have missed something. I am using 1.1.12 and a custom theme based off default. So when I install this mod, I use the package manager, then do the parse instructions for my version. Only thing I did different was where parse instructions called for default/... I used my theme folder.
Is this right, because the mod is not working at all. I get no errors, but I also get no custom greetings.
Anything?
This mod contains a small bug:
./Themes/default/index.template.php
Find: [Select]
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
Replace With: [Select]
<li class="greeting">', $context['greeting'], '</span></li>
should be:
Replace With: [Select]
<li class="greeting"><span>', $context['greeting'], '</span></li>
Hi Akyne. Will this be available for RC4 please?
Thanks
I have no idea, I'm not the author.
Apologies
Hello
I am getting this error from several members in my error log:
Undefined index: greeting
File: /home/sharks/forum/Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 222
Quote from: Akyhne on November 30, 2010, 05:28:35 AM
This mod contains a small bug:
./Themes/default/index.template.php
Find: [Select]
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
Replace With: [Select]
<li class="greeting">', $context['greeting'], '</span></li>
should be:
Replace With: [Select]
<li class="greeting"><span>', $context['greeting'], '</span></li>
When I parse for version 1.1.12, I don't see this code modification at all... help?
I think we have another mod which has been abandoned. The SMF team should create a separate section for all those mods who could be picked up by others...
Agreed
Quote from: sharks on December 23, 2010, 10:52:35 AM
I think we have another mod which has been abandoned. The SMF team should create a separate section for all those mods who could be picked up by others...
How many times have YOU already been told thats not how it works... the mod author has to give permission for someone to take over the mod... the team cannot just give someones mod away... be it abandoned or otherwise.
... This is not abandoned. I just happen to have other projects as well as a real life to attend to. Once I find the time to do so, this will be updated again. If anyone wants to update this, feel free to do so - Just contact me if you are a suitable developer (and I reserve the rights to judge that myself ;))
Anybody use this mod with RC 4?
RC3 Edit help needed here...
theme index.template does not contain any of the FIND code
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
So i have no clear idea where to insert the REPLACE string
<li class="greeting">', $context['greeting'], '</span></li>
index.template attached if anyone can oblige
thanks
this is a good mod.. any chance it could be edited to be compatible for 2.0 Gold?
Quote from: soki2ng on August 18, 2011, 03:52:08 PM
this is a good mod.. any chance it could be edited to be compatible for 2.0 Gold?
I have it working on my 2.0 forum.
Updated to SMF 2.0.1
PD: Also for SMF 1.1.15
Quote from: Diego Andrés on October 01, 2011, 10:25:42 PM
Updated to SMF 2.0.1
Good job on the update.
Confirmation that it went smoothly.
I am VERY new at installing mods, this was only my 2nd time. Can someone tell me where in the admin panel I set the time so the greeting shows? I am using 1.1.15 Thank you so much!
You can't change the time, but you can change the message for ALL the hours that the MOD will display diferent messages.
The options are in The Modifications area in the Administration.
This has been one of my favourite mods for a long time.
Congratulations for bringing it back to life.
Quote from: Diego Andrés on October 07, 2011, 11:55:53 PM
You can't change the time, but you can change the message for ALL the hours that the MOD will display diferent messages.
The options are in The Modifications area in the Administration.
Er...
Quote from: jilly on October 07, 2011, 07:36:17 PMI am using 1.1.15
Features and options, perhaps?
K@, you are the bomb! Thank so so much, I had no idea where to place the greetings. I was unclear in my message I guess. I did it! It's the little things I get excited about lol.
Shame... My thing's not little. ;)
[/tastelessness]
(http://i249.photobucket.com/albums/gg230/pegould/LaughingSmiley.gif)
not compatible with this version of SMF 2.0.2 is there plans in the near future? was great before I upgraded.
Use the Mod Emulation link in my signature.
http://custom.simplemachines.org/mods/index.php?mod=1388
Updated ;D
Where can I find this mod on my forum once installed? In other words, I have already installed it with no errors and I cannot find it anywhere. Where do I go to edit the greetings?
UPDATE: Nevermind! I found it. It was under "Miscellaneous", under Admin>Configuration. That took so long to find! LOL. Why not just put it under its own button called "Custom Greetings"?
Hi guys
I've installed this mod in smf 2.0.2, but I get a load of text appearing on the Home page
Link to my site (http://valehosting.co.uk/forums)
Any ideas would appreciated
Thanks
Graham
Quote from: wizzie on August 21, 2012, 07:14:34 AM
Hi guys
I've installed this mod in smf 2.0.2, but I get a load of text appearing on the Home page
Something has gone wrong during the editing of your modifications.english.php file.
Look for a misplaced ?> somewhere in the file, or if you're not confident attach it here and we can have a ganders
Thanks shambles, here is the attachment
I think I've found the problem the ?> was in the wrong place :)
Have now rectified it and all is working ok
Thanks for your help
Splendid. You can remove that attachment if you want ;D
Diego Andrés, please check the compatibility range for your mod; we got a mod report with a valid issue that it won't install on 2.0.3. Please set the compatibility range to 2.0 - 2.0.99
Quote from: Yoshi2889 on January 03, 2013, 07:04:26 AM
Diego Andrés, please check the compatibility range for your mod; we got a mod report with a valid issue that it won't install on 2.0.3. Please set the compatibility range to 2.0 - 2.0.99
Thanks, working on that, I saw the report also on my website.
Regards
Fixed package info, updated for smf 2.0.3
Thanks, it looks fine now :)
Bummer... installing this mod TESTS fine... no errors... but upon installation I get a white screen and I have to go to my backups to get the site back up and running.
I "AM" running stock theme but it's been modified quite a bit. I am guessing the necessary code is dropping in to an area that has been modified.
Just updated to 1.5 to get rid of the "Undefined index: greeting" error but to no avail. It seems to only show up for guests visiting the home page which uses the ClearSky theme.
8: Undefined index: greeting
File: ............/forum/Themes/ClearSky_SMF2-Final/index.template.php
Line: 205
Attached is the current index.template.php file.
Any chance someone can have a look at it?
Quote from: Chas Large on January 22, 2013, 05:20:33 PM
Just updated to 1.5 to get rid of the "Undefined index: greeting" error but to no avail. It seems to only show up for guests visiting the home page which uses the ClearSky theme.
8: Undefined index: greeting
File: ............/forum/Themes/ClearSky_SMF2-Final/index.template.php
Line: 205
Attached is the current index.template.php file.
Any chance someone can have a look at it?
It's weird, let me check that on a test forum and I reply again
I don't get this error, could be the Theme?
I am trying to install this mod on the Vertex theme but it says test failed, is there a way I can get past this
Test failed just means a manual edit is required.
I presume this is probably due to you not using the default theme.
How would I go about this, bearing in mind im a total novice at editing ;D
http://www.domesticcricketforum.com/index.php (http://www.domesticcricketforum.com/index.php)
Thats my forum
Quote from: Diego Andrés on January 24, 2013, 07:14:27 PM
Quote from: Chas Large on January 22, 2013, 05:20:33 PM
Just updated to 1.5 to get rid of the "Undefined index: greeting" error but to no avail. It seems to only show up for guests visiting the home page which uses the ClearSky theme.
8: Undefined index: greeting
File: ............/forum/Themes/ClearSky_SMF2-Final/index.template.php
Line: 205
Attached is the current index.template.php file.
Any chance someone can have a look at it?
It's weird, let me check that on a test forum and I reply again
I don't get this error, could be the Theme?
Yes, it was a theme issue but I fixed it by adding an @ before the $context as below:
<li class="greeting"><span>', @$context['greeting'], '</span></li>
That fixed it. ;D
If by 'telling PHP to ignore an error if it happens', then yes, you did fix it.
The correct fix would be to find out why $context['greeting'] is not defined and fix *that*.
Quote from: Old Fossil on May 15, 2013, 04:17:11 PM
Test failed just means a manual edit is required.
I presume this is probably due to you not using the default theme.
What sort of files need editing?
Still nothing? I hate being a novice! :-[
I am using the Vertex theme and the edit says
Code: (Find) [Select]
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
Code: (Replace) [Select]
<li class="greeting">', $context['greeting'], '</span></li>
The only trouble is I cant find the find bit on the index.template.php file
Hi, do you want to attach your file here and let us take a look at it? :)
As requested here is my index.template.php file
Thanks ;D
Its ok, I've played around with the code for a bit and now its working on my website :)
Sorry, I was out all day yesterday, but I'm glad to see you got it working yourself! Nice one!! :D
I was using the fix_packages.php file and received the attached error. I deleted all of my packages on my test site and found that the Custom Greeting Mod is causing the error. I can uninstall and the error goes away. I install it and the error returns. I am running 2.0.6
The package appears to work but I am concerned that I have this error showing up.
I am attaching my Load.php file. The error says it is on line 198.
No it doesn't. The error is saying that it is on line 198 of the code being run by line 2151 of Load.php which without looking will be the code to execute a subtemplate.
I'd assume that it's an error on line 198 of index.template.php.
Arantor,
Thank you for the reply. I have attached the index.template.php
And sure enough, line 198 of that file is referencing $context['greeting'] which hasn't been defined for some reason.
That suggests the rest of the mod isn't actually installed anywhere.
Thank you once again for your answer. I am currently testing this using my test system on my local computer. It install/uninstalls without error. I will load a fresh copy of 2.0.6 and test it to make sure it is not an error in my test environment.
Well, I did a new web install of 2.0.6 with a new database. I installed only this mod without any errors. Ran the fix_packages.php and once again I am receiving the error "see attached". Hopefully the creator or somebody can fix this mod?
Thanks
So the advice I already gave you should now be followed: verify that all the changes the mod wants to make have been carried out (you can use the 'parse' option on the mod's page to check what changes are needed)
I will do that as soon as I can find the time. Thank you again.
OK, because this was bugging me, I found the time "now I can go eat dinner". I parsed it as directed and everything matched 100%. This is now beyond my limited capabilities to correct. Hopefully the creator of this mod is still available to make changes.
Thanks Arantor for taking the time to guide me through the troubleshooting.
Humm, I have fixed it.
I have called the function loadGreeting() in index.template instead of index.php
But I still working to see what else I can do
Thanks for the report
Diego,
Thank you for looking at my postings. Please let me know when you release an update or post code.
John
Diego is there much in the way of differences between the latest update and the previous?
Mod updated! :)
+Now is using hooks
+Changed the location where the function is used
-Removed support for 1.1.x versions
Quote from: SeeFoodDiet on January 04, 2014, 11:17:49 PM
Diego is there much in the way of differences between the latest update and the previous?
Just a bit, preferable to update it :D
No fryingpan for you this time lol.
;)
Thank you for the update.^^
Hi, I've just uploaded & installed this apparently without any problems. But nothing's happening...could it be because I have a header block on my forum? www.thenaturalhairforum.co.uk
What do you mean by Nothings happening?
Have you checked the settings?
Check the default theme. Does it show?
Hi, you're supposed to be able to modify the settings in admin but I can't find it anywhere. Absolutely nothing has happened, although it says the installation worked just fine. I'm scared to change to my default theme as I've only just got my forum as I want it - after lots of sweat & blood. If that's the only way I can find out what's going on, I'll leave it. It's not essential - just would've been nice.
Were there any errors on install?
Nothing, not a thing. Only on one of the old themes I still have installed on my forum, no error messages for my current theme - otherwise I wouldn't have installed the mod.
Do you have a test account I can use so I can check for you?
I'm afraid I don't. That's something I should do actually. But thanks for asking. I'll come back to this, I have more pressing things with the forum that I want to sort out first. It takes me so long to do the simplest tasks. :'(
Quote from: S Mac on March 06, 2014, 12:22:36 PM
I'm afraid I don't. That's something I should do actually. But thanks for asking. I'll come back to this, I have more pressing things with the forum that I want to sort out first. It takes me so long to do the simplest tasks. :'(
Please check if the mod had been installed in your theme.
There's one edit to the index.template.php
Thanks. It said it had installed in my theme. How would I check?
Quote from: S Mac on March 06, 2014, 03:13:55 PM
Thanks. It said it had installed in my theme. How would I check?
What theme are you using?
It's a modified curve theme. That's why nothing is ever simple. ;) www.thenaturalhairforum.co.uk
Mmm let's check the file, please attach the index.template.php from that theme
Is this what you wanted??
No, I'm asking for the index.template.php file.
It should be in /Themes/smf-curve/index.template.php
And please attach the one that doesn't thave the ~
Regards
sorry - here it is. :)
No sorry, that is not the file.
The name of the file is: index.template.php which is inside the theme folder you're using.
Oops. Here it is - thanks in advance.
Try this one
Diego, a German user was so kind as to provide a translation to your mod here http://www.simplemachines.org/community/index.php?topic=526703.0 if you want to put that into your next version.
Quote from: ❀ Justyne on August 22, 2014, 10:34:42 AM
Diego, a German user was so kind as to provide a translation to your mod here http://www.simplemachines.org/community/index.php?topic=526703.0 if you want to put that into your next version.
Thanks, I'll Add it later :D
The placement of in my options menu is wrong. The title appears lower then the actual options. (the bold title)
hello guys, i install this mode but i m receiving this error
Fatal error: Call to undefined function Custom_Greeting_Load() in C:\xampp\htdocs\web1\smf\Sources\Subs.php on line 3422
kindly help
Hi all,
Sorry to open up an old thread, I have searched but could not find an answer. I have just installed Custom Greeting 2.0 and ticked to activate and filled in the greetings, but when I save it, it does not change the greeting. I am using the theme Concept3 by MGCVisuals and I believe that is the issue of Custom Greeting not working as it works on another forum with the standard SMF theme.
My question is, can anything be done to make it work with Concept3?
Many thanks in advance,
Steve
I've updated this old relic to SMF 2.1.
Currently no new features, just legacy settings
3.0.1 - 27 December 2021
(https://smftricks.com/Themes/SMFTricks/images/changelog/bug--minus.png) Use the time function instead of forum_time.
3.0 - 03 October 2021
(https://smftricks.com/Themes/SMFTricks/images/changelog/tag--plus.png) Mod updated for SMF 2.1.
(https://smftricks.com/Themes/SMFTricks/images/changelog/tag--pencil.png) Removed support for SMF 2.0.x
Hello,
Installed this on 2.1.3 and while it installed correctly, the greetings did not correspond to the time on the forum. For example, 10pm got a 'Good Morning' message.
The messages did not match either the forum timezone or mine. What do you use to determine the time? Almost looks like UTC rather than user offset.
Thanks
Thanks for reporting the issues.
This mod is a bit outdated atm, I will try to update it at some point.