News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

intro

Started by Terax, August 22, 2021, 09:13:46 AM

Previous topic - Next topic

Terax

Imam forum vezan za SA:MP e sada posto je to smf a imo sam prije u vbullet tako, neznam sad ovdje kako da uradim, znaci kada stisne netko na web , da se otvori intro tipa neka slika i DOBRO DOSLI KOD NAS bla bla, i da traje ajde 3sec i otvori onda portal ili forum.. Znaci ocu intro prije ucitavanja foruma, kako sta gdje..

Dzonny

Pozdrav.

Ili neki float window da ide (ima milion načina da se to ubaci, kod dodaješ npr u index.template ako želiš da se prikaže na bilo kojoj stranici foruma), mada ovde treba voditi računa da se on prikaže samo jednom prilikom prvog učitavanja, ili kao neki text uz loading animaciju ili nešto slično, ali nisam video da konkretno ima mod ili nešto slično što bi ti automatski omogućilo tako nešto, tako da mislim da moraš svakako to ručno ispisati i ubaciti u template, ili naći već gotovo rešenje negde na netu...

Terax

našao sam ovo, tu bi stavio kao pravila foruma da se prihvati , sve to znam sloziti ali neznam gdje u index.template da ubacim jer di god ubacim dodje greska sa ucitavanjem predloska, ovo bi trebalo ici samo kod ucitavanja foruma tj kod prvog pokretanja..

kod koji stvara poseban prozor

<script language="JavaScript1.2">
<!--
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isActive=false;

function MoveInit(e){
  topOne=isIE ? "BODY" : "HTML";
  whichOne=isIE ? document.all.FloatingLayer : document.getElementById("FloatingLayer"); 
  ActiveOne=isIE ? event.srcElement : e.target; 
  while (ActiveOne.id!="titleBar"&&ActiveOne.tagName!=topOne){
    ActiveOne=isIE ? ActiveOne.parentElement : ActiveOne.parentNode;
  } 
  if (ActiveOne.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichOne.style.left);
    nowY=parseInt(whichOne.style.top);
    MoveEnabled=true;
    document.onmousemove=Move;
  }
}

function Move(e){
  if (!MoveEnabled) return;
  whichOne.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichOne.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false; 
}

function MoveN4(whatOne){
  if (!isN4) return;
  N4=eval(whatOne);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isActive){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function ToggleFloatingLayer(DivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)    //NN4+
    {
       document.layers[DivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)   //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(DivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all) // IE 4
    {
        document.all[DivID].style.visibility = iState ? "visible" : "hidden";
    }
}

document.onmousedown=MoveInit;
document.onmouseup=Function("MoveEnabled=false");
// -->
</script>



<!-- Start Floating Layer -->
<div id="FloatingLayer" style="position:absolute;width:500px;left:400px;top:600px;visibility:visible; border:solid 1px #FF6600;">
    <div id="titleBar" style="cursor:move; width:100%; position:relative; border-bottom:solid 1px #FF6600; background-color:#FF9933;">
        <div id="title" style="margin-right:30px; padding-left:3px;">
            <font face="Arial" color="#333333">Pravila</font>
        </div>
        <div id="closeX" style="cursor:hand; position:absolute; right:5px; top:0px;">
            <a href="#" onClick="ToggleFloatingLayer('FloatingLayer',0);return false"  style="text-decoration:none"><font color="#333333" size="2" face="arial">X</font></a>
        </div>
    </div>
    <div id="floatingContent" style="padding:3px; background-color:#CCCCCC; color:#333333;">
        <!-- place your HTML content here-->
    Pravila

bla bla

bla

bla
        <!-- End of content area -->
    </div>
</div>
<!-- End Floating layer -->

<!-- To Show The Layer -->
<a href="javascript:ToggleFloatingLayer('FloatingLayer',1);">Show</a>
<input type="button" onClick="ToggleFloatingLayer('FloatingLayer',1);" value="Show Layer">

<!-- To Hide The Layer -->
<a href="javascript:ToggleFloatingLayer('FloatingLayer',0);">Hide</a>
<input type="button" onClick="ToggleFloatingLayer('FloatingLayer',0);" value="Hide Layer">

slika prozora



e sad di god kod ubacim dodje greska predloska, ili se forum uopce ne ucitava..

znaci imam kodove i intra jos sve sam slozio ali neznam di da ubacim a da se pokaze kod ucitavanja foruma..

Dzonny

Ceo deo koda koji stoji u script tagu prebaci u zaseban .js fajl, i onda ga pozovi iz template-a:
<script src="skripta.js"></script>
Ostatak koda ubaci u template, u suštini gde god.
Ako se ne snađeš piši i okači index.template fajl da vidimo :)

Terax

@Dzonny

nisam uspio evo ti sve tag u index template je Dzonny , da mozes nac di sam stavio


tagaj mi sa //Rjeseno da mogu lakse nac di je, jer stavit cu slicno tomu al za sve je isto.. ja kad stavim kak si rekao dolazi Nije uspjelo učitavanje 'main_above' predloška.

test  .js

<script language="JavaScript1.2">
<!--
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isActive=false;

function MoveInit(e){
  topOne=isIE ? "BODY" : "HTML";
  whichOne=isIE ? document.all.FloatingLayer : document.getElementById("FloatingLayer");
  ActiveOne=isIE ? event.srcElement : e.target;
  while (ActiveOne.id!="titleBar"&&ActiveOne.tagName!=topOne){
    ActiveOne=isIE ? ActiveOne.parentElement : ActiveOne.parentNode;
  }
  if (ActiveOne.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichOne.style.left);
    nowY=parseInt(whichOne.style.top);
    MoveEnabled=true;
    document.onmousemove=Move;
  }
}

function Move(e){
  if (!MoveEnabled) return;
  whichOne.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichOne.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;
}

function MoveN4(whatOne){
  if (!isN4) return;
  N4=eval(whatOne);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isActive){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function ToggleFloatingLayer(DivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)    //NN4+
    {
       document.layers[DivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)   //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(DivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all) // IE 4
    {
        document.all[DivID].style.visibility = iState ? "visible" : "hidden";
    }
}

document.onmousedown=MoveInit;
document.onmouseup=Function("MoveEnabled=false");
// -->
</script>


index template

<?php
/**
 * @package NightBreeze SMF Theme
 * @author SychO (M.S) https://sycho9.github.io
 * @version 2.0
 *
 * @license Copyright (C) 2020 SychO (M.S)
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * LICENSE.TXT
 *
 * version 2.0
*/
// 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';

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

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

$mybefore = array("[""]""<strong");
$myafter = array("""""<strong class='navPages active'");
if(!empty($context['page_index']))
$context['page_index'] = str_replace($mybefore$myafter$context['page_index']);

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''>
<head>'
;

// The ?fin20 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?fin20" />
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/responsive.css?fin20" />';

// FontAwesome 5.11.2 (free)
echo'
<link href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" crossorigin="anonymous" rel="stylesheet">'
;

// ToolTipster 4.0
echo'
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/tooltipster.bundle.min.css" />
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/tooltipster-sideTip-borderless.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script>
jq = jQuery.noConflict(true);
</script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/tooltipster.bundle.min.js"></script>
'
;

// jQuery 3.3.1
//echo '<script   src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>';

// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7''ie6''webkit') as $cssfix)
if ($context['browser']['is_' $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/'$cssfix'.css" />';

if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') === false or preg_match('/Edge/i',$_SERVER['HTTP_USER_AGENT']))
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/notwebkit.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" />';

// Here comes the JavaScript bits!
echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?fin20"></script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/theme.js?fin20"></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>'
;

echo '
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#181818">
<meta name="msapplication-navbutton-color" content="#181818">
<meta name="apple-mobile-web-app-status-bar-style" content="#181818">
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
<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'], '" />';

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

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

echo '
<script>
        jq(document).ready(function() {
            jq(\'.tooltip\').tooltipster({
delay: 0,
theme: \'tooltipster-borderless\'
});
        });
    </script>
</head>
<body>'
;
}

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

echo '
<header><div class="frame">
<div id="top_section" class="wideOpen">
<div class="wrapper">
<div class="user '
, !empty($context['show_login_bar']) ? 'guest' '''">
<ul class="dropmenu">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
$fp allowedTo(array('profile_extra_any''profile_extra_own'));
$as allowedTo(array('profile_identity_any''profile_identity_own''manage_membergroups'));
$pm allowedTo('pm_read');
$one_of_three = !empty($context['unapproved_members']) || (!empty($context['open_mod_reports']) && $context['show_open_reports']) || $context['user']['unread_messages']>0;
$totally = (!empty($context['unapproved_members']) ?(int)$context['unapproved_members'] : 0) + (!empty($context['open_mod_reports']) ? (int)$context['open_mod_reports'] : 0) + $context['user']['unread_messages'];
echo'<li><a class="firstlevel" href="javascript:void(0)"><img src="', !empty($context['user']['avatar']) ? $context['user']['avatar']['href'] : $settings['theme_url'].'/images/default_avatar.png''" alt="" class="avatar" /><span class="spshl">'$context['user']['name'], '   ' fontawesome('fas fa-caret-down') . '</span></a>
<ul>'
;
if($pm)
echo '<li><a class="'$context['user']['unread_messages'] > 'notice' '''" href="'$scripturl'?action=pm">' fontawesome('fas fa-envelope') . '     '$context['user']['unread_messages'] > '<span class="newNumber">'.$context['user']['unread_messages'].'</span> '.$txt['new_messages'] : $txt['messages'].' ('.$context['user']['messages'].')''</a></li>';

echo'
'
$as '<li><a class="" href="'.$scripturl.'?action=profile;area=account">' fontawesome('fas fa-user-cog') . '    '.$txt['account_settings'].'</a></li>' '''
'
$fp '<li><a class="" href="'.$scripturl.'?action=profile;area=theme;u='.$context['user']['id'].'">' fontawesome('fas fa-paint-brush') . '    '.$txt['look_and_layout'].'</a></li>' '''
'
$fp '<li><a class="" href="'.$scripturl.'?action=profile;area=notification;u='.$context['user']['id'].'">' fontawesome('fas fa-bell') . '    '.$txt['notifications'].'</a></li>' '''';

if (!empty($context['unapproved_members']))
echo '<li><a class="notice" href="'$scripturl'?action=admin;area=viewmembers;sa=browse;type=approve">' fontawesome('fas fa-users-cog') . '    '$txt['approve_members_waiting'], ' <span class="newNumber">'$context['unapproved_members'], '</span></a></li>';

if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '<li><a class="notice" href="'$scripturl'?action=moderate;area=reports">' fontawesome('fas fa-folder-open') . '    '$txt['mod_reports_waiting'], ' <span class="newNumber">'$context['open_mod_reports'], '</span></a></li>';

echo'
<li><a href="'
$scripturl'?action=logout;'$context['session_var'], '='$context['session_id'], '">' fontawesome('fas fa-sign-out-alt') . '    '$txt['logout'], '</a></li>
</ul>
'
$one_of_three '<span class="newNumber newNumberAbs">'.$totally.'</span>' '''
</li>
<li><a class="firstlevel" href="'
$scripturl'?action=unread">' fontawesome('fas fa-user-plus') . '     <span>'$txt['unread_since_visit'], '</span></a></li>
<li><a class="firstlevel" href="'
$scripturl'?action=unreadreplies">' fontawesome('fas fa-comments') . '    <span>'$txt['show_unread_replies'], '</span></a></li>';

}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{ //<li><a href="javascript:void(0)" class="firstlevel "><img class="avatar" src="', $settings['theme_url'], '/images/default_avatar.png" alt="Guest"/><span class="spshl">', $txt['guest'], '</span></a></li>

echo'
<li><a href="javascript:void(0)" class="firstlevel loginOpen">' 
fontawesome('fas fa-sign-in-alt') . '    <span>'$txt['login'], '</span></a></li>
<li><a href="'
$scripturl'?action=register" class="firstlevel ">' fontawesome('fas fa-user-plus') . '    <span>'$txt['register'], '</span></a></li>';
}

echo ' </ul>
</div>'
;

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

echo '<div class="menuOpener taphoOnlyInline floatright buttonLike" data-state="closed">' fontawesome('fas fa-bars') . '</div>
</div>
</div>
<div id="upper_section" class="middletext wrapper"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>';

if(empty($context['header_logo_url_html_safe'])) {
$site_slogan = empty($settings['site_slogan']) ? '' $settings['site_slogan'];
echo'
<h1 class="forumtitle" '
, !empty($settings['forumtitle_size']) ? 'style="font-size: '.$settings['forumtitle_size'].'px"' '''>
<a href="'
$scripturl'" class="">
'
, !empty($settings['header_fa']) ? '<div class="side_icon float">' fontawesome($settings['header_fa']) . '</i></div>' '''<div>'$context['forum_name'].'<br><span>'.$site_slogan.'</span>''</div></a>
</h1>'
;
}
else
echo'
<h1 class="forumtitle imgHead">
<a href="'
$scripturl'" class="imgHeader">
<img src="' 
$context['header_logo_url_html_safe'] . '" alt="' $context['forum_name'] . '" />
</a>
</h1>'
;

// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '<div class="news normaltext taphoNone">
<div id="newsfader" class="taphoNone">
<h3>'
$txt['news'], ':</h3>
<ul class="reset" id="smfFadeScroller"'
, empty($options['collapse_news_fader']) ? '' ' style="display: none;"''>';

foreach ($context['news_lines'] as $news)
echo '
<li>'
$news'</li>';

echo '
</ul>
</div>
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[

// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: '
JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: '
, empty($settings['newsfader_time']) ? 5000 $settings['newsfader_time'], '
});

// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: '
, empty($options['collapse_news_fader']) ? 'false' 'true'',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: '
JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: '
JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: '
$context['user']['is_guest'] ? 'false' 'true'',
sOptionName: \'collapse_news_fader\',
sSessionVar: '
JavaScriptEscape($context['session_var']), ',
sSessionId: '
JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: '
$context['user']['is_guest'] ? 'true' 'false'',
sCookieName: \'newsupshrink\'
}
});
// ]]></script></div>'
;
}

echo '

</div>'
;

echo ' <div class="clear"></div>
</div>
<div class="clear"></div>
</header>'
;

// The main content should go here.
echo '<div class="header_back"></div>
<main>'
;

// Show the navigation tree.
theme_linktree();

echo'
<div class="frame">
<div id="main_content_section">'
;

echo' // Dzonny
<script src="test.js"></script>

<!-- Start Floating Layer -->
<div id="FloatingLayer" style="position:absolute;width:500px;left:400px;top:600px;visibility:visible; border:solid 1px #FF6600;">
<div id="titleBar" style="cursor:move; width:100%; position:relative; border-bottom:solid 1px #FF6600; background-color:#FF9933;">
<div id="title" style="margin-right:30px; padding-left:3px;">
<font face="Arial" color="#333333">Pravila</font>
</div>
<div id="closeX" style="cursor:hand; position:absolute; right:5px; top:0px;">
<a href="#" onClick="ToggleFloatingLayer('
FloatingLayer',0);return false"  style="text-decoration:none"><font color="#333333" size="2" face="arial">X</font></a>
</div>
</div>
<div id="floatingContent" style="padding:3px; background-color:#CCCCCC; color:#333333;">
<!-- place your HTML content here-->
Pravila

bla bla

bla

bla
<!-- End of content area -->
</div>
</div>
<!-- End Floating layer -->

<!-- To Show The Layer -->
<a href="javascript:ToggleFloatingLayer('
FloatingLayer',1);">Show</a>
<input type="button" onClick="ToggleFloatingLayer('
FloatingLayer',1);" value="Show Layer">

<!-- To Hide The Layer -->
<a href="javascript:ToggleFloatingLayer('
FloatingLayer',0);">Hide</a>
<input type="button" onClick="ToggleFloatingLayer('
FloatingLayer',0);" value="Hide Layer">';

// Random News For Phones&Tablets.
if (!empty($settings['enable_news']) && empty($settings["restrict_newsfader"])  && !empty($context['fader_news_lines'])) {
echo '
<div class="taphoOnly">
<div class="cat_bar">
<h3 class="catbg">
fontawesome('fas fa-newspaper') . '    '$txt['news'], '
</h3>
</div>
<div class="windowbg2">
<span class="topslice"><span></span></span>
<div class="content">
'
$context['random_news_line'], '
</div>
<span class="botslice"><span></span></span>
</div>
</div>'
;
}
// Custom banners and shoutboxes should be placed here, before the linktree.

}

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

echo '
<div class="clear"></div>
</div>

</div>

<div class="clear"></div>
</main>'
;

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

if(!empty($settings['footer_bits_content']) || !empty($settings['footer_blinks_state']))
{
echo'
<div class="frame for_abt '
, (empty($settings['footer_bits_content'])||empty($settings['footer_blinks_state'])) ? 'single' '''">
<div class="wrapper">'
;

if(!empty($settings['footer_bits_content']))
echo'
<div class="ryo ryone">
<h3 class="for_title">'
, !empty($settings['header_fa']) ? fontawesome($settings['header_fa']) : '''    ', empty($settings['footer_bits_title']) ? $context['forum_name'] : $settings['footer_bits_title'], '</h3>
<div class="for_desc">'
$settings['footer_bits_content'], '</div>
</div>'
;

if(!empty($settings['footer_blinks_state']))
echo'
<div class="ryo ryowt">
<h3 class="for_title">' 
fontawesome('fas fa-location-arrow') . '   ', empty($settings['footer_blinks_title']) ? $txt['footer_blinks_title'] : $settings['footer_blinks_title'], '</h3>
<div class="for_desc">
<ul>
'
, (empty($settings['footer_blinks_1'])||empty($settings['footer_blinks_href_1'])) ? '' '<li>' fontawesome('fas fa-angle-double-right') . '      <a href="'.$settings['footer_blinks_href_1'].'" target="_blank">'.$settings['footer_blinks_1'].'</a></li>''
'
, (empty($settings['footer_blinks_2'])||empty($settings['footer_blinks_href_2'])) ? '' '<li>' fontawesome('fas fa-angle-double-right') . '      <a href="'.$settings['footer_blinks_href_2'].'" target="_blank">'.$settings['footer_blinks_2'].'</a></li>''
'
, (empty($settings['footer_blinks_3'])||empty($settings['footer_blinks_href_3'])) ? '' '<li>' fontawesome('fas fa-angle-double-right') . '      <a href="'.$settings['footer_blinks_href_3'].'" target="_blank">'.$settings['footer_blinks_3'].'</a></li>''
'
, (empty($settings['footer_blinks_4'])||empty($settings['footer_blinks_href_4'])) ? '' '<li>' fontawesome('fas fa-angle-double-right') . '      <a href="'.$settings['footer_blinks_href_4'].'" target="_blank">'.$settings['footer_blinks_4'].'</a></li>''
'
, (empty($settings['footer_blinks_5'])||empty($settings['footer_blinks_href_5'])) ? '' '<li>' fontawesome('fas fa-angle-double-right') . '      <a href="'.$settings['footer_blinks_href_5'].'" target="_blank">'.$settings['footer_blinks_5'].'</a></li>''
</ul>
</div>
</div>'
;

echo'
</div>
<div class="clear"></div>
</div>'
;
}

echo'
<div class="clear"></div>
<div class="frame">
<div class="wrapper">
<div class="righter">
<ul class="reset">
<li class="copyright">'
smf_theme_copyright(), '</li>
</ul>'
;

echo '
</div>
<div class="middler">
'
, !empty($settings['facebook']) ? '<a href="'.$settings['facebook'].'" class="buttonLike invert icon_style tooltip facebook" title="'.$txt['facebook'].'">' fontawesome('fab fa-facebook-f') . '</a>' '''<!--
-->'
, !empty($settings['youtube']) ? '<a href="'.$settings['youtube'].'" class="buttonLike invert icon_style tooltip youtube" title="'.$txt['youtube'].'">' fontawesome('fab fa-youtube') . '</a>' '''<!--
-->'
, !empty($settings['twitter']) ? '<a href="'.$settings['twitter'].'" class="buttonLike invert icon_style tooltip twitter" title="'.$txt['twitter'].'">' fontawesome('fab fa-twitter') . '</a>' '''<!--
-->'
, !empty($settings['steam']) ? '<a href="'.$settings['steam'].'" class="buttonLike invert icon_style tooltip steam" title="'.$txt['steam'].'">' fontawesome('fab fa-steam-symbol') . '</a>' '''';

if (!empty($settings['more_link']))
{
echo'<a href="'.$settings['more_link'].'" class="buttonLike invert icon_style tooltip" title="', !empty($settings['more_link_label']) ? $settings['more_link_label'] : $txt['more'],'">' fontawesome($settings['more_link_fa']) . '</a>';
}

echo'
</div>
<div class="lefter">
<a href="'
$scripturl'">', empty($settings['footer_copyright']) ? $context['forum_name'].$txt['cop_y'] : $settings['footer_copyright'], '</a><br>', !$context['show_load_time'] ? '<p>'.$context['current_time'].'</p>' '';

// Show the load time?
if ($context['show_load_time'])
echo '
<p>'
$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

echo'
</div>
</div>
<div class="clear">
</div>
</div><div class="clear"></div></footer>
<div class="goup taphoNone">' 
fontawesome('fas fa-chevron-up') . '</div>';
}

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


// Fullscreen Search Bar
echo'<div class="fullscreen searchBar" style="display:none;">
<div class="fsClose">' 
fontawesome('fas fa-times-circle') . '</div>
<div class="fsInner">'
;
echo'
<form id="search_form" action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '">
<div class="inGroup" style="margin-top: 25px;">
<input type="text" name="search" value="" class="input_text" required/>
<span class="highlight"></span>
<span class="bar"></span>
<label>Search </label>
</div>
<input type="submit" name="submit" value="'
$txt['search'], '" class="button_submit" />
<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>
</div>
</div>'
;

if (!empty($context['show_login_bar']))
{
echo '
<div class="fullscreen loginBar" style="display:none;">
<div class="fsClose">' 
fontawesome('fas fa-times-circle') . '</div>
<div class="fsInner">
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' ''' autocomplete="off" >
<input autocomplete="false" name="hidden" type="text" style="display:none;">
<div class="inGroup griny" style="margin-top: 25px;">
<input type="text" name="user" size="10" class="input_text" autocomplete="off" required/>
<span class="highlight"></span>
<span class="bar"></span>
<label>'
$txt['username'], '</label>
</div>
<div class="inGroup griny">
<input type="password" name="passwrd" size="10" class="input_password" autocomplete="nope" required/>
<span class="highlight"></span>
<span class="bar"></span>
<label>'
$txt['password'], '</label>
</div>
<label class="container">'
$txt['always_logged_in'], '
  <input type="checkbox" name="cookieneverexp" class="input_check" />
  <span class="checkmark"></span>
</label>
<div class="downer">
<input type="submit" value="'
$txt['login'], '" class="button_submit" />
<a href="'
$scripturl'?action=reminder">'$txt['forgot_your_password'], '</a>
</div>'
;

if (!empty($modSettings['enableOpenID']))
echo '
<br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />'
;

echo '
<input type="hidden" name="hash_passwrd" value="" /><input type="hidden" name="'
$context['session_var'], '" value="'$context['session_id'], '" />
</form>
</div>
</div>'
;
}

echo '
<script>
jq(document).ready(function () {
jq(".fsOpen").click(function () {
jq("input:text:visible:first").focus();
jq("body").css("overflow", "hidden");
});
jq(".searchButton").click(function () {
jq(".fullscreen.searchBar").css("display", "block");
});
jq(".loginOpen").click(function () {
jq(".fullscreen.loginBar").css("display", "block");
});
jq(".fullscreen .fsClose").click(function () {
jq(".fullscreen").css("display", "none");
jq("body").css("overflow", "auto");
});
});
</script>
<div class="sampleClass"></div>
</body></html>'
;
}

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

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

echo '
<div class="navigate_section">
<div class="searchButton fsOpen buttonLike icon_style floatright tooltip" title="'
$txt['search'], '">' fontawesome('fas fa-search') . '</div>
'
$context['user']['is_admin'] ? '<a class="themeSettings buttonLike icon_style floatright tooltip" title="'.$txt['theme_settings'].'" href="'.$scripturl.'?action=admin;area=theme;sa=settings;th='.$settings['theme_id'].';'.$context['session_var'].'='.$context['session_id'].'">' fontawesome('fas fa-cogs') . '</a>' '';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<a class="notice buttonLike icon_style floatright tooltip" title="'$txt['maintain_mode_on'], '" href="'$scripturl'?action=admin;area=serversettings;' $context['session_var'] . '=' $context['session_id'] . '">' fontawesome('fas fa-exclamation-triangle') . '</a></li>';

echo'
<div class="home-tree"><a href="'
$boardurl'">' fontawesome('fas fa-home') . '</a></div>
<ul>'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li '
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''><div class="cust">';

// 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'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] . '</span>';

// 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></li>'
;
}
echo '
</ul>
</div>'
;

$shown_linktree true;
}

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

echo '
<nav>
<div class="incarn taphoOnly"><h4>'
$txt['menu'], '</h4><div class="menuOpener taphoOnlyInline floatright buttonLike" data-state="opened">' fontawesome('fas fa-times') . '</div></div>
<ul class="dropmenu" id="menu_nav">'
;

$menu_icons = array(
'home' => empty($settings['home_icon']) ? 'fa-home' $settings['home_icon'],
'help' => empty($settings['help_icon']) ? 'fa-info' $settings['help_icon'],
'search' => empty($settings['search_icon']) ? 'fa-search' $settings['search_icon'],
'admin' => empty($settings['admin_icon']) ? 'fa-key' $settings['admin_icon'],
'moderate' => empty($settings['moderate_icon']) ? 'fa-pencil-alt' $settings['moderate_icon'],
'profile' => empty($settings['profile_icon']) ? 'fa-user' $settings['profile_icon'],
'pm' => empty($settings['pm_icon']) ? 'fa-envelope' $settings['pm_icon'],
'calendar' => empty($settings['calendar_icon']) ? 'fa-calendar-alt' $settings['calendar_icon'],
'mlist' => empty($settings['mlist_icon']) ? 'fa-users' $settings['mlist_icon'],
'logout' => empty($settings['logout_icon']) ? 'fa-sign-out-alt' $settings['logout_icon'],
'login' => empty($settings['login_icon']) ? 'fa-sign-in-alt' $settings['login_icon'],
'register' => empty($settings['register_icon']) ? 'fa-user-plus' $settings['register_icon'],
);
foreach ($context['menu_buttons'] as $act => $button)
{
if($act=="logout" || $act=="login" || $act=="register")
continue;

$icon '';
if (!empty($settings[$act '_icon']))
$icon $settings[$act '_icon'];

echo '
<li id="button_'
$act'">
<a class="'
$button['active_button'] ? 'active ' '''firstlevel" href="'$button['href'], '"', isset($button['target']) ? ' target="' $button['target'] . '"' '''>
'
fontawesome($icon, !empty($menu_icons[$act]) ? $menu_icons[$act] : 'fas fa-chevron-circle-right'), '
<span class="'
, isset($button['is_last']) ? 'last ' '''firstlevel">'$button['title'], '</span>
'
, !empty($button['sub_buttons']) ? '<div class="taphoOnlyInline buttonLike icon_style">' fontawesome('fas fa-caret-down') . '</div>' '''
</a>'
;
if (!empty($button['sub_buttons']))
{
echo '
<ul>'
;

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="'
$childbutton['href'], '"', isset($childbutton['target']) ? ' target="' $childbutton['target'] . '"' '''>
<span'
, isset($childbutton['is_last']) ? ' class="last"' '''>'$childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' '''</span>
</a>'
;
// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>'
;

foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a href="'
$grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' $grandchildbutton['target'] . '"' '''>
<span'
, isset($grandchildbutton['is_last']) ? ' class="last"' '''>'$grandchildbutton['title'], '</span>
</a>
</li>'
;

echo '
</ul>'
;
}

echo '
</li>'
;
}
echo '
</ul>'
;
}
echo '
</li>'
;
}

echo '
</ul>
</nav>'
;
}

// 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();

// List the buttons in reverse order for RTL languages.
if ($context['right_to_left'])
$button_strip array_reverse($button_striptrue);

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '
<li><a' 
. (isset($value['id']) ? ' id="button_strip_' $value['id'] . '"' '') . ' class="button_strip_' $key . (isset($value['active']) ? ' active' '') . '" href="' $value['url'] . '"' . (isset($value['custom']) ? ' ' $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a></li>';
}

// No buttons? No button strip either.
if (empty($buttons))
return;

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
, !empty($direction) ? ' float' $direction '''"', (empty($buttons) ? ' style="display: none;"' ''), (!empty($strip_options['id']) ? ' id="' $strip_options['id'] . '"'''), '>
<ul>'
,
implode(''$buttons), '
</ul>
</div>'
;
}

function 
smf_theme_copyright() {
global $txt;

return theme_copyright() . $txt['nightbreeze_cpr'];
}

/**
 * @param string $key fontawesome icon full name
 * @param string $default
 */
function fontawesome($key ''$default null)
{
return '<i class="' faIcon($key$default) . '"></i>';
}

/**
 * @param string $key fontawesome icon full name
 * @param string $default
 */
function faIcon($key ''$default null)
{
if (empty($key) && !empty($default))
return faIcon($default);

$types = array(
'fab''fas''far''fal'
);
$def_type $types[1];
$prefixed false;

foreach ($types as $type)
$prefixed |= strpos($key$type) !== false;

if (!$prefixed && !empty($key))
$key $def_type ' ' $key;

return $key;
}

function 
sycho_credits()
{
global $context$settings$txt;

echo '
<div class="windowbg2">
<div class="content">
<h3 class="for_title">' 
fontawesome('fas fa-smile') . '    '$txt['nightbreeze_skidayo'], '</h3>
<img src="'
$settings['theme_url'], '/images/nightbreeze.png" style="float: right;max-width: 100%;">
<span class="buttonLike notButton tiny invert"><font color="red">' 
fontawesome('fas fa-heart') . '</font>    '$txt['nightbreeze_support_coffee'], '</span><br>
<span class="buttonLike notButton tiny invert"><font color="#f0f0f0">' 
fontawesome('fas fa-comments') . '</font>    '$txt['nightbreeze_support_qs'], '</span><br>
<span class="buttonLike notButton tiny invert"><font color="#7289da">' 
fontawesome('fab fa-discord') . '</font>    '$txt['join_us_on_discord'], '</span>
</div>
</div>'
;
}




Dzonny

Pokušaj bez script taga u .js fajlu ;)

Advertisement: