Skocz do zawartości
kamilo23

Shortcut Icon

Rekomendowane odpowiedzi

Do strony głównej dodać tą ikonę sobie dałem rady.

 

Ale w index.php do strony głównej nie wiem gdzie wpisać to

 

» Naciśnij, żeby pokazać/ukryć tekst oznaczony jako spoiler... «
<?php

/********************************************************************************

**

* index.php *

********************************************************************************

***

* SMF: Simple Machines Forum *

* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) *

* =============================================================================== *

* Software Version: SMF 1.1.3 *

* Software by: Simple Machines (http://www.simplemachines.org) *

* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *

* 2001-2006 by: Lewis Media (http://www.lewismedia.com) *

* Support, News, Updates at: http://www.simplemachines.org *

********************************************************************************

***

* This program is free software; you may redistribute it and/or modify it under *

* the terms of the provided license as published by Simple Machines LLC. *

* *

* This program is distributed in the hope that it is and will be useful, but *

* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY *

* or FITNESS FOR A PARTICULAR PURPOSE. *

* *

* See the "license.txt" file for details of the Simple Machines license. *

* The latest version can always be found at http://www.simplemachines.org. *

********************************************************************************

**/

 

 

/* This, as you have probably guessed, is the crux on which SMF functions.

Everything should start here, so all the setup and security is done

properly. The most interesting part of this file is the action array in

the smf_main() function. It is formatted as so:

 

'action-in-url' => array('Source-File.php', 'FunctionToCall'),

 

Then, you can access the FunctionToCall() function from Source-File.php

with the URL index.php?action=action-in-url. Relatively simple, no?

*/

 

$forum_version = 'SMF 1.1.3';

 

// Get everything started up...

define('SMF', 1);

@set_magic_quotes_runtime(0);

error_reporting(E_ALL);

$time_start = microtime();

 

// Load the settings...

require_once(dirname(__FILE__) . '/Settings.php');

 

// And important includes.

require_once($sourcedir . '/QueryString.php');

require_once($sourcedir . '/Subs.php');

require_once($sourcedir . '/Subs-Seo4SMF.php');

require_once($sourcedir . '/Errors.php');

require_once($sourcedir . '/Load.php');

require_once($sourcedir . '/Security.php');

 

// Using an old version of PHP?

if (@version_compare(PHP_VERSION, '4.2.3') != 1)

require_once($sourcedir . '/Subs-Compat.php');

 

// If $maintenance is set specifically to 2, then we're upgrading or something.

if (!empty($maintenance) && $maintenance == 2)

db_fatal_error();

 

// Connect to the MySQL database.

if (empty($db_persist))

$db_connection = @mysql_connect($db_server, $db_user, $db_passwd);

else

$db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd);

 

// Show an error if the connection couldn't be made.

if (!$db_connection || !@mysql_select_db($db_name, $db_connection))

db_fatal_error();

 

// Load the settings from the settings table, and perform operations like optimizing.

reloadSettings();

// Clean the request variables, add slashes, etc.

cleanRequest();

$context = array();

 

// Determine if this is using WAP, WAP2, or imode. Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should.

if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)

$_REQUEST['wap2'] = 1;

elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)

{

if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)

$_REQUEST['imode'] = 1;

else

$_REQUEST['wap'] = 1;

}

 

if (!defined('WIRELESS'))

define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

 

// Some settings and headers are different for wireless protocols.

if (WIRELESS)

{

define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : '')));

 

// Some cellphones can't handle output compression...

$modSettings['enableCompressedOutput'] = '0';

// !!! Do we want these hard coded?

$modSettings['defaultMaxMessages'] = 5;

$modSettings['defaultMaxTopics'] = 9;

 

// Wireless protocol header.

if (WIRELESS_PROTOCOL == 'wap')

header('Content-Type: text/vnd.wap.wml');

}

 

// Check if compressed output is enabled, supported, and not already being done.

if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0)

{

// If zlib is being used, turn off output compression.

if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION, '4.2.0') == -1)

$modSettings['enableCompressedOutput'] = '0';

else

ob_start('ob_gzhandler');

}

// This makes it so headers can be sent!

if (empty($modSettings['enableCompressedOutput']))

ob_start();

 

// Register an error handler.

set_error_handler('error_handler');

 

// Start the session. (assuming it hasn't already been.)

loadSession();

 

// What function shall we execute? (done like this for memory's sake.)

call_user_func(smf_main());

 

// Call obExit specially; we're coming from the main area ;).

obExit(null, null, true);

 

// The main controlling function.

function smf_main()

{

global $modSettings, $settings, $user_info, $board, $topic, $maintenance, $sourcedir;

 

// Special case: session keep-alive.

if (isset($_GET['action']) && $_GET['action'] == 'keepalive')

die;

 

// Load the user's cookie (or set as guest) and load their settings.

loadUserSettings();

 

// Load the current board's information.

loadBoard();

 

// Load the current theme. (note that ?theme=1 will also work, may be used for guest theming.)

loadTheme();

 

// Check if the user should be disallowed access.

is_not_banned();

 

// Load the current user's permissions.

loadPermissions();

 

// Do some logging, unless this is an attachment, avatar, theme option or XML feed.

if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach', 'jsoption', '.xml')))

{

// Log this user as online.

writeLog();

 

// Check if time to run visual warning update

if ($modSettings['autoWarningTime'] < time())

autoWarn();

 

// Track forum statistics and hits...?

if (!empty($modSettings['hitStats']))

trackStats(array('hits' => '+'));

}

 

// Is the forum in maintenance mode? (doesn't apply to administrators.)

if (!empty($maintenance) && !allowedTo('admin_forum'))

{

// You can only login.... otherwise, you're getting the "maintenance mode" display.

if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'login2')

{

require_once($sourcedir . '/LogInOut.php');

return 'Login2';

}

// Don't even try it, sonny.

else

{

require_once($sourcedir . '/Subs-Auth.php');

return 'InMaintenance';

}

}

// If guest access is off, a guest can only do one of the very few following actions.

elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', '.xml', 'verificationcode'))))

{

require_once($sourcedir . '/Subs-Auth.php');

return 'KickGuest';

}

elseif (empty($_REQUEST['action']))

{

// Action and board are both empty... BoardIndex!

if (empty($board) && empty($topic))

{

require_once($sourcedir . '/BoardIndex.php');

return 'BoardIndex';

}

// Topic is empty, and action is empty.... MessageIndex!

elseif (empty($topic))

{

require_once($sourcedir . '/MessageIndex.php');

return 'MessageIndex';

}

// Board is not empty... topic is not empty... action is empty.. Display!

else

{

require_once($sourcedir . '/Display.php');

return 'Display';

}

}

 

// Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function).

$actionArray = array(

'activate' => array('Register.php', 'Activate'),

'admin' => array('Admin.php', 'Admin'),

'announce' => array('Post.php', 'AnnounceTopic'),

'ban' => array('ManageBans.php', 'Ban'),

'boardrecount' => array('Admin.php', 'AdminBoardRecount'),

'buddy' => array('Subs-Members.php', 'BuddyListToggle'),

'calendar' => array('Calendar.php', 'CalendarMain'),

'cleanperms' => array('Admin.php', 'CleanupPermissions'),

'collapse' => array('Subs-Boards.php', 'CollapseCategory'),

'convertentities' => array('Admin.php', 'ConvertEntities'),

'convertutf8' => array('Admin.php', 'ConvertUtf8'),

'coppa' => array('Register.php', 'CoppaForm'),

'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'),

'detailedversion' => array('Admin.php', 'VersionDetail'),

'display' => array('Display.php', 'Display'),

'dlattach' => array('Display.php', 'Download'),

'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'),

'editpoll' => array('Poll.php', 'EditPoll'),

'editpoll2' => array('Poll.php', 'EditPoll2'),

'featuresettings' => array('ModSettings.php', 'ModifyFeatureSettings'),

'featuresettings2' => array('ModSettings.php', 'ModifyFeatureSettings2'),

'findmember' => array('Subs-Auth.php', 'JSMembers'),

'help' => array('Help.php', 'ShowHelp'),

'helpadmin' => array('Help.php', 'ShowAdminHelp'),

'im' => array('PersonalMessage.php', 'MessageMain'),

'jsoption' => array('Themes.php', 'SetJavaScript'),

'jsmodify' => array('Post.php', 'JavaScriptModify'),

'lock' => array('LockTopic.php', 'LockTopic'),

'lockVoting' => array('Poll.php', 'LockVoting'),

'login' => array('LogInOut.php', 'Login'),

'login2' => array('LogInOut.php', 'Login2'),

'logout' => array('LogInOut.php', 'Logout'),

'maintain' => array('Admin.php', 'Maintenance'),

'manageattachments' => array('ManageAttachments.php', 'ManageAttachments'),

'manageboards' => array('ManageBoards.php', 'ManageBoards'),

'managecalendar' => array('ManageCalendar.php', 'ManageCalendar'),

'managesearch' => array('ManageSearch.php', 'ManageSearch'),

'markasread' => array('Subs-Boards.php', 'MarkRead'),

'membergroups' => array('ManageMembergroups.php', 'ModifyMembergroups'),

'mergetopics' => array('SplitTopics.php', 'MergeTopics'),

'mlist' => array('Memberlist.php', 'Memberlist'),

'modifycat' => array('ManageBoards.php', 'ModifyCat'),

'modifykarma' => array('Karma.php', 'ModifyKarma'),

'modreport' => array('ModReport.php', 'ModReport'),

 

'modlog' => array('Modlog.php', 'ViewModlog'),

'movetopic' => array('MoveTopic.php', 'MoveTopic'),

'movetopic2' => array('MoveTopic.php', 'MoveTopic2'),

'news' => array('ManageNews.php', 'ManageNews'),

'notify' => array('Notify.php', 'Notify'),

'notifyboard' => array('Notify.php', 'BoardNotify'),

'optimizetables' => array('Admin.php', 'OptimizeTables'),

'packageget' => array('PackageGet.php', 'PackageGet'),

'packages' => array('Packages.php', 'Packages'),

'permissions' => array('ManagePermissions.php', 'ModifyPermissions'),

'pgdownload' => array('PackageGet.php', 'PackageGet'),

'pm' => array('PersonalMessage.php', 'MessageMain'),

'post' => array('Post.php', 'Post'),

'post2' => array('Post.php', 'Post2'),

'postsettings' => array('ManagePosts.php', 'ManagePostSettings'),

'printpage' => array('Printpage.php', 'PrintTopic'),

'profile' => array('Profile.php', 'ModifyProfile'),

'profile2' => array('Profile.php', 'ModifyProfile2'),

'quotefast' => array('Post.php', 'QuoteFast'),

'quickmod' => array('Subs-Boards.php', 'QuickModeration'),

'quickmod2' => array('Subs-Boards.php', 'QuickModeration2'),

'recent' => array('Recent.php', 'RecentPosts'),

'regcenter' => array('ManageRegistration.php', 'RegCenter'),

'register' => array('Register.php', 'Register'),

'register2' => array('Register.php', 'Register2'),

'reminder' => array('Reminder.php', 'RemindMe'),

'removetopic2' => array('RemoveTopic.php', 'RemoveTopic2'),

'removeoldtopics2' => array('RemoveTopic.php', 'RemoveOldTopics2'),

'removepoll' => array('Poll.php', 'RemovePoll'),

'repairboards' => array('RepairBoards.php', 'RepairBoards'),

'reporttm' => array('SendTopic.php', 'ReportToModerator'),

'reports' => array('Reports.php', 'ReportsMain'),

'requestmembers' => array('Subs-Auth.php', 'RequestMembers'),

'search' => array('Search.php', 'PlushSearch1'),

'search2' => array('Search.php', 'PlushSearch2'),

'sendtopic' => array('SendTopic.php', 'SendTopic'),

'serversettings' => array('ManageServer.php', 'ModifySettings'),

'serversettings2' => array('ManageServer.php', 'ModifySettings2'),

'smileys' => array('ManageSmileys.php', 'ManageSmileys'),

'smstats' => array('Stats.php', 'SMStats'),

'spellcheck' => array('Subs-Post.php', 'SpellCheck'),

'splittopics' => array('SplitTopics.php', 'SplitTopics'),

'stats' => array('Stats.php', 'DisplayStats'),

'sticky' => array('LockTopic.php', 'Sticky'),

'theme' => array('Themes.php', 'ThemesMain'),

'trackip' => array('Profile.php', 'trackIP'),

'about:mozilla' => array('Karma.php', 'BookOfUnknown'),

'about:unknown' => array('Karma.php', 'BookOfUnknown'),

'unread' => array('Recent.php', 'UnreadTopics'),

'unreadreplies' => array('Recent.php', 'UnreadTopics'),

'viewErrorLog' => array('ManageErrors.php', 'ViewErrorLog'),

'viewmembers' => array('ManageMembers.php', 'ViewMembers'),

'viewprofile' => array('Profile.php', 'ModifyProfile'),

'verificationcode' => array('Register.php', 'VerificationCode'),

'vote' => array('Poll.php', 'Vote'),

'viewquery' => array('ViewQuery.php', 'ViewQuery'),

'warnadd' => array('VisualWarning11.php', 'AddWarning'),

'warnadd2' => array('VisualWarning11.php', 'AddWarning2'),

'warnlist' => array('VisualWarning11.php', 'ListWarnings'),

'warnlist2' => array('VisualWarning11.php', 'ListWarnings2'),

'warnpmman' => array('VisualWarning11.php', 'Manager'),

'warnpmman2' => array('VisualWarning11.php', 'Manager2'),

'who' => array('Who.php', 'Who'),

'.xml' => array('News.php', 'ShowXmlFeed'),

 

'seo4smfadmin' => array('Seo4SMFAdmin.php', 'Seo4SMFAdmin'),

'seo4smfadminsave' => array('Seo4SMFAdmin.php', 'Seo4SMFAdminSave'),

'seo4smfadminsavexml' => array('Seo4SMFAdmin.php', 'Seo4SMFAdminSaveXML'),

'seo4smfsitemaps' => array('Seo4SMFSitemaps.php', 'Seo4SMFSitemaps'),

);

 

// Get the function and file to include - if it's not there, do the board index.

if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))

{

// Catch the action with the theme?

if (!empty($settings['catch_action']))

{

require_once($sourcedir . '/Themes.php');

return 'WrapAction';

}

 

// Fall through to the board index then...

require_once($sourcedir . '/BoardIndex.php');

return 'BoardIndex';

}

 

// Otherwise, it was set - so let's go to that action.

require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]);

return $actionArray[$_REQUEST['action']][1];

}

 

?>

 

:?

Udostępnij tę odpowiedź


Odnośnik do odpowiedzi
Udostępnij na innych stronach

Mam strone główną www.xxxx.pl

 

i w katalogu gdzie był index.php do tej strony zmodyfikowałem go i dodałem tam tą frazę żeby się ta ikonka pokazała i jest ok.

 

A teraz chce żeby się pokazywała obok www.xxxx.pl/forum bo się nie pokazuje no i znalazłem w odpowiednim katalogu index.php który odnosi się to tego forum tylko nie wiem gdzie to wkleić. chyb że coś jest nie tak :mur:

 

chyba wiesz juz o co mi chodzi :)

Udostępnij tę odpowiedź


Odnośnik do odpowiedzi
Udostępnij na innych stronach

W folderze ze style jest

 

index.php i w nim pisze

 

» Naciśnij, żeby pokazać/ukryć tekst oznaczony jako spoiler... «
<?php

 

// Try to handle it with the upper level index.php. (it should know what to do.)

if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))

include (dirname(dirname(__FILE__)) . '/index.php');

else

exit;

 

?>

 

i jest jeszcze index.templete.php

 

» Naciśnij, żeby pokazać/ukryć tekst oznaczony jako spoiler... «
<?php

// Version: 1.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 RC2';

 

/* 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'] = true;

 

/* Show sticky and lock status seperate from topic icons? */

$settings['seperate_sticky_lock'] = true;

}

 

// The main sub template above the content.

function template_main_above()

{

global $context, $settings, $options, $scripturl, $txt, $modSettings;

 

// Show right to left and the character set for ease of translating.

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>

<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />

<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '

<meta name="robots" content="noindex" />', '

<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>

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

var smf_theme_url = "', $settings['theme_url'], '";

var smf_images_url = "', $settings['images_url'], '";

var smf_scripturl = "', $scripturl, '";

var smf_session_id = "', $context['session_id'], '";

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

 

if (empty($settings['default_theme_color']))

{

echo 'orange';

}

else

{

echo $settings['default_theme_color'];

}

echo '.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>';

 

// This is the main table defining the forum width

echo '

<center>

<table class="maintable" cellspacing="0" cellpadding="0" border="0" align="center" width="';

 

//The width definer

 

if (empty($settings['forum_width']))

{

echo '760';

}

else

{

echo $settings['forum_width'];

}

 

echo '">

<tr>

<td class="header" style="background-image:url(';

 

//The header logo

 

if (empty($settings['header_logo_url']))

{

echo $settings['images_url'], '/top_bg_';

 

if (empty($settings['default_theme_color']))

{

echo 'orange';

}

else

{

echo $settings['default_theme_color'];

}

 

echo'.gif';

}

 

else

{

echo $settings['header_logo_url'];

}

 

echo ');">';

 

//The width definer

 

if (!empty($settings['hide_name']))

echo ' ';

else

echo $context['forum_name'];

 

echo '

 

</td>

</tr>

<tr>

<td>

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

<tr>';

 

if (!empty($context['user']['avatar']))

echo '<td class="headerdown">', $context['user']['avatar']['image'], '</td>';

 

echo '

<td class="headerdown" align="left" width="70%">';

 

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

if ($context['user']['is_logged'])

{

echo '

', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

 

// Only tell them about their messages if they can read their messages!

if ($context['allow_pm'])

echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];

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

 

 

echo '

<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />

<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />

', $context['current_time'];

}

// Otherwise they're a guest - so politely ask them to register or login.

else

{

echo '

', $txt['welcome_guest'], '<br />

', $context['current_time'], '<br />';

}

 

echo '

</td>';

 

// The "key stats" box.

echo '

<td class="headerdown" align="right" width="30%" style="padding-right: 8px;">

<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], ' ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span><br />

', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>

</td>

</tr>

</table>

</td>';

echo '

</tr>

<tr>

<td class="bodytd">';

 

echo '

<div id="navmenu">';

 

// Show the menu here, according to the menu sub template.

template_menu();

 

echo '

<BR>

<script type="text/javascript"><!--

if (document.getElementById(\'adKontekst_0\')==null) {

var adKontekst_pola=new Array;

document.write(\'<scr\'+\'ipt type="text/javascript" \'+

\'src="http://adsearch.wp.pl/akon/spliter?prid=1348&caid=74130&ns=\'

+(new Date()).getTime()+\'"\'+\'></\'+\'scri\'+\'pt>\');

}

var adc_i=adKontekst_pola.length;

document.write("<div id=\'adKontekst_"+adc_i+"\'> </"+"div>");

adKontekst_pola[adc_i]=new Object();

adKontekst_pola[adc_i].nazwa="adKontekst_"+adc_i;

adKontekst_pola[adc_i].typ=101;

adKontekst_pola[adc_i].r=1;

adKontekst_pola[adc_i].c=4;

adKontekst_pola[adc_i].x=724;

adKontekst_pola[adc_i].y=90;

adKontekst_pola[adc_i].paleta=new Object();

adKontekst_pola[adc_i].paleta.kolor_tlo="#FFFFFF";

adKontekst_pola[adc_i].paleta.kolor_tytul="#ECB164";

adKontekst_pola[adc_i].paleta.kolor_opis="#000000";

adKontekst_pola[adc_i].paleta.kolor_url="#ECB164";

adKontekst_pola[adc_i].paleta.kolor_naglowek="#ECB164";

adKontekst_pola[adc_i].nform=1;

//--></script>

</div>';

 

// The main content should go here. A table is used because IE 6 just can't handle a div.

echo '

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

<td>';

}

 

function template_main_below()

{

global $context, $settings, $options, $scripturl, $txt;

 

echo '</td>

</tr></table><br />';

 

// This is the main table defining the forum width

echo '

</td>

</tr>

<tr>

<td class="footer">

<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="30" height="18" style="margin: 5px 16px;" border="0" /></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="30" height="18" style="margin: 5px 16px;" border="0" /></a>

</td>

<td valign="middle" align="center" style="white-space: nowrap;" class="copyright">

', theme_copyright();

 

// Show the load time?

if ($context['show_load_time'])

echo '

<br /><span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

 

echo'

</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="30" height="18" style="margin: 5px 16px;" border="0" /></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="30" height="18" style="margin: 5px 16px;" border="0" /></a>

</td>

</tr>

</table>

</td>

</tr>

 

</table>

</center>';

 

// The following will be used to let the user know that some AJAX process is running

echo '

<div id="ajax_center"><div id="ajax_in_progress" style="display: block;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div></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;

 

// Folder style or inline? Inline has a smaller font.

echo '<span class="nav">';

 

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

 

// Don't show a separator for the last one.

if ($link_num != count($context['linktree']) - 1)

echo '  |  ';

}

 

echo '</span>';

}

 

// Show the menu up top. Something like [home] [help] [profile] [logout]...

function template_menu()

{

global $context, $settings, $options, $scripturl, $txt;

 

// Work out where we currently are.

$current_action = 'home';

if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))

$current_action = 'admin';

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

$current_action = $context['current_action'];

if ($context['current_action'] == 'search2')

$current_action = 'search';

 

// Show the start of the tab section.

echo '

<ul>';

 

// Show the [home] button.

echo '<li><a' , $current_action == 'home' ? ' class="active"' : '', ' href="', $scripturl, '">' , $txt[103] , '</a></li>';

 

// Show the [help] button.

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

 

// How about the [search] button?

if ($context['allow_search'])

echo '<li><a' , $current_action == 'search' ? ' class="active"' : '', ' href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';

 

// Go to PM center... [pm]

if ($context['user']['is_logged'] && $context['allow_pm'])

echo '<li><a' , $current_action == 'pm' ? ' class="active"' : '', ' href="', $scripturl, '?action=pm">' , $txt['pm_short'] , '', $context['user']['unread_messages'] > 0 ? '[<strong> '. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';

 

// Is the user allowed to administrate at all? ([admin])

if ($context['allow_admin'])

echo '<li><a' , $current_action == 'admin' ? ' class="active"' : '', ' href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';

 

// Edit Profile... [profile]

if ($context['allow_edit_profile'])

echo '<li><a' , $current_action == 'profile' ? ' class="active"' : '', ' href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';

 

// The [calendar]!

if ($context['allow_calendar'])

echo '<li><a' , $current_action == 'calendar' ? ' class="active"' : '', ' href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';

 

// If the user is a guest, show [login] button.

if ($context['user']['is_guest'])

echo '<li><a' , $current_action == 'login' ? ' class="active"' : '', ' href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';

 

 

// If the user is a guest, also show [register] button.

if ($context['user']['is_guest'])

echo '<li><a' , $current_action == 'register' ? ' class="active' : '', ' href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';

 

 

// Otherwise, they might want to [logout]...

if ($context['user']['is_logged'])

echo '<li><a' , $current_action == 'register' ? ' class="active' : '', ' href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';

 

// The end of tab section.

echo '</ul>';

 

}

 

// Generate a strip of buttons, out of buttons.

function template_button_strip($button_strip, $direction = 'top')

{

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]))

$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>', implode($context['menu_separator'], $button_strip) , '</td>';

}

?>

Udostępnij tę odpowiedź


Odnośnik do odpowiedzi
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Przywróć formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

Ładowanie


×
×
  • Dodaj nową pozycję...