Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Template Parse sorunu

Aloittaja lordreco, toukokuu 24, 2009, 10:26:53 AP

« edellinen - seuraava »

lordreco

Arkadaşlar menüyü ekledim. fakat üyelerden menüyü saklama kodu varya if ($context['user']['is_logged']) kodu bunu nereye koyarsam koyayım template parse geliyor. Acabaa bu menüyü bana yerleştirecek olan varmıdır

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

<li><a href="register.php"><span>Kayıt ol</span></a></li>

';


bu kodları eklediğimde ise template parse diyor lütfen yardım edin


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

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

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

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<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_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>

'
;

echo 
'


<script type="text/javascript"  src="'
$settings['theme_url'], '/menu.js"></script>
<script type="text/javascript"  src="'
$settings['theme_url'], '/global.js"></script>
</STYLE>'
;
echo
'

<SCRIPT type=text/javascript>

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

</SCRIPT>'
;

echo
'
<SCRIPT type=text/javascript>
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm(' 
$txt[108] , '))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</SCRIPT>
</head>
<body>

'
;

//Yararlı linkler menüsü by Turklord
echo'
<div class="tborder"   id="usercptools_menu" style="display:none">
<table  cellpadding="4" cellspacing="1" border="0">

<tr><td class="yararli_link">Yararli Linkler</td></tr>
<tr><td style="border-top:1px solid #ffffff;" class="vbmenu_option"><a href="'
$scripturl'?action=unread">Bugünkü Mesajlar </a></td></tr>
<tr><td style="border-top:1px solid #ffffff;" class="vbmenu_option"><a href="'
$scripturl'?action=unreadreplies">Mesajlarıma Yazılan Cevaplar </a></td></tr>
<tr><td style="border-top:1px solid #ffffff;" class="vbmenu_option"><a href="'
$scripturl'?action=markasread;sa=all;sesc=' $context['session_id'] . '">Forumlari Okundu Kabul Et</a></td></tr>

<tr><td class="yararli_link"><a href="'
$scripturl'?action=profile">Profiliniz</a></td></tr>
<tr><td style="border-top:1px solid #ffffff;" class="vbmenu_option"><a href="' 
$scripturl '?action=profile;u=' $context['member']['id'] . ';sa=account">Üyelik ayarlariniz</a></td></tr>
<tr><td style="border-top:1px solid #ffffff;"  class="vbmenu_option"><a href="' 
$scripturl '?action=profile;u=' $context['member']['id'] . ';sa=forumProfile">Kimlik bilginiz</a></td></tr>
<tr><td style="border-top:1px solid #ffffff; border-bottom:1px solid #ffffff;"   class="vbmenu_option"><a href="' 
$scripturl '?action=profile;u=' $context['member']['id'] . ';sa=theme">Forum ayarlarınız</a></td></tr>

<tr><td class="yararli_link">Çesitli</td></tr>
<tr><td style="border-top:1px solid #ffffff;"  class="vbmenu_option"><a href="'
$scripturl'?action=pm">Özel Mesajlar</a></td></tr>
<tr><td style="border-top:1px solid #ffffff;"  class="vbmenu_option"><a href="'
$scripturl'?action=stats">Daha Fazla İstatistik</a></td></tr>
<tr><td style="border-top:1px solid #ffffff;border-bottom:1px solid #ffffff;"    class="vbmenu_option"><a href="' 
$scripturl '?action=who">Kimler Online</a></td></tr>


</table>
</div> '
;
//Hızlı arama by Turklord
echo'
<div class="tborder" id="navbar_search_menu" style="display:none">

<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="yararli_link">Hizli Arama</td>
</tr>
<tr>
<td class="windowbg" title="">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">

<div class="middletext"><input type="text" name="search" value="" size="25" tabindex="1001"/>


<input type="submit" class="button" value="Git" tabindex="1004" /></div>
<input type="hidden" name="advenced" value="0"  size="25" tabindex="1001">
</td>
</tr>

<tr> <td style="border-top:1px solid #ffffff;border-bottom:1px solid #ffffff;"    class="vbmenu_option"><a href="'
$scripturl'?action=search;advanced" accesskey="4" rel="nofollow">Gelismis Arama Yap</a></td>
</tr>
</table>
</form>
</div>'
;

echo
'


<body>
<!-- logo -->
<a name="top"></a>
<div style="width:900px;margin: 0 auto;">
<div id="header">
<div id="headerleftbg">
<div id="headerrightbg">
<div id="logo"><a href="index.php"><img src="images/funkyfresh/header/logo.gif" alt="" width="223" height="69" /></a></div>
<br  style="clear:both"/>
<div id="nav">
  <ul>
    <li><a href="index.php"><span>Home</span></a></li>
 
 
   
    <li><a href="register.php"><span>Register</span></a></li>
 
    <li><a href="calendar.php"><span>Calendar</span></a></li>
<li><a href="memberlist.php"><span>Members</span></a></li>
<li><a href="search.php"><span>Search</span></a></li>
<li><a href="faq.php"><span>Help</span></a></li>
  </ul>
</div>

<div id="search">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="s" value="" />
<input type="hidden" name="securitytoken" value="guest" />
 
<input name="query" type="text" class="search_field" /><input  type="image" src="images/funkyfresh/header/go_button.gif" class="search_button"/>
</form>
</div>
<br style="clear:both" />
<div class="welcome">
 
 
<p>Welcome back, <strong>Unregistered</strong>. Please <a href="login.php">login!</a></p>
 
</div>

</div>

</div>

</div>
</div>
<!-- open content container -->
 
<div align="center">
<div class="page" style="width:900px; text-align:left">
<div style="padding:0px 10px 0px 10px" align="left">
 
 
 
<br />
<div class="curve" id="ads">

<div class="curveleft">

<div class="curveright">
<div class="adstext"><br /></div>
<div class="ads">

<img src="images/funkyfresh/header/ads.gif" alt="" />
</div>


</div>

</div>

</div>



<div class="curve" id="login">

<div class="curveleft">

<div class="curveright">

<div class="login">
 
 




 
 
 
</form>
 
</div>


</div>

</div>

</div>





<br style="clear:both" />
 
<!-- /logo -->
<!-- content table -->
 
 
<br />









'
;


echo
'

<!-- NAVBAR POPUP MENUS -->
 

<!-- community link menu -->
<div class="vbmenu_popup" id="community_menu" style="display:none;margin-top:3px" align="left">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">Community Links</td></tr>


<tr><td class="vbmenu_option"><a href="group.php">Social Groups</a></td></tr>


<tr><td class="vbmenu_option"><a href="album.php">Pictures &amp; Albums </a></td></tr>



<tr><td class="vbmenu_option"><a href="memberlist.php">Members List</a></td></tr>


</table>
</div>
<!-- / community link menu -->



<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none;margin-top:3px" align="left">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Search Forums</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
 
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="" />
<input type="hidden" name="securitytoken" value="guest" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="Go" tabindex="1004" /></div>
<div style="margin-top:6px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />Show Threads</label>
&nbsp;
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />Show Posts</label>
</div>
</form>
</td>
</tr>

<tr>
<td class="vbmenu_option"><a href="tags.php" rel="nofollow">Tag Search</a></td>
</tr>

<tr>
<td class="vbmenu_option"><a href="search.php" accesskey="4" rel="nofollow">Advanced Search</a></td>
</tr>

</table>
</div>
<!-- / header quick search form -->



<!-- / NAVBAR POPUP MENUS -->
 
'
;






echo 
'
<table border="0" width="100%" cellpadding="10" cellspacing="0" style="background-color:#FFFFFF;">
<tr>
  <td><table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color:#cdd2d9;">
      <tr>

      </tr>
    </table>
    <!-- content table -->
    <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#cdd2d9;">
    <tr>
      <td>
<!-- content table -->
<!-- open content container -->


<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 15px 0px 15px">



<div class="spacer"></div>
<div class="spacer"></div>

<!-- breadcrumb, login, pm info -->
<!-- Aria Categoty Top -->
<table   border="0" cellpadding="0" cellspacing="0"  width="100%"  align="center" style="background-image: url('
$settings['images_url'], '/cat_t.gif)">
  <tr>
    <td width="57" height="25" align="left" valign="top"><img border="0" src="'
$settings['images_url'], '/cat_tleft.gif" alt="" /></td>
    <td width="100%"  height="25" align="left" valign="middle">&nbsp;&nbsp;</td>
    <td width="57" height="25" align="right" valign="top"><img border="0" src="'
$settings['images_url'], '/cat_tright.gif" alt="" /></td>
  </tr>

</table>
<!-- /Aria Categoty Top -->
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="windowbg2" width="100%">

 <div class="smallfont" style="font-size:10pt"> <strong>'
theme_linktree(), '</strong></div>

</td>'
;





echo 
'

</tr>
</table>
<!-- Aria Categoty Bottom -->
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="11" align="left" valign="top"><img src="'
$settings['images_url'], '/cat_bleft.gif" width="11" height="11" alt=" " border="0" /></td>
        <td  width="100%" style="background-image:url('
$settings['images_url'], '/cat_b.gif)"><img src="'$settings['images_url'], '/clear.gif" width="100%" height="11" alt=" " border="0" /></td>
        <td width="11" align="right" valign="top"><img src="'
$settings['images_url'], '/cat_bright.gif" width="11" height="11" alt=" " border="0" /></td>
      </tr>
    </table>
 <!-- /Aria Categoty Bottom -->
<!-- / breadcrumb, login, pm info -->

<div class="spacer"></div>'
;





// The main content should go here.
echo '
<div id="bodyarea" style="padding: 3ex 0px 2ex 0px;">'
;




// İMANIN VARSA, ALLAH'IN VARSA, COPYRİGHTE DOKUNMA HAKKIMI HELAL ETMEM!!!
}

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 '


<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 valign="middle" align="center" style="smallfont">
'
theme_copyright(), '<br><font size="1">Aria by <a href="http://www.forumbol.com">LordReco</a> | <a href="http://www.forumbol.com/lordreco-temalari-artik-bu-sayfada-t10080.0.html" target="_blank" title="SMF Temalar">FoRuMBoL Themes</a></font>
</td>

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

echo
'
</td>
</tr>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#cdd2d9">
  <tr>

  </tr>
</table>
</td>
  </tr>
</table>'
;

echo 
'
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <td height="10" colspan="3" style="background-image: url('
$settings['images_url'], '/footer_special.png;"><img src="'$settings['images_url'], '/clear.gif" width="100%" height="1" alt="" /></td>
<tr align="left" valign="middle" >

  </tr>

  <tr align="left" valign="middle"> 
    <td style="background-color:#A8B0BA;"><a href="javascript:scroll(0,0);"><img src="'
$settings['images_url'], '/enaltsol.png"  border="0" alt="" /></a></td>
    <td width="100%" height="46" align="center"  style="background-image: url('
$settings['images_url'], '/enalt.gif); background-color:#A8B0BA;">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr align="left"> 



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


<td class="tfooter" align="right" width="100%">
<div class="smallfont">
<strong>
<a href="mailto:[email protected]" rel="nofollow" accesskey="9">İletişim</a> -
<a href="http://www.forumbol.com/lordreco-temalari-artik-bu-sayfada-t10080.0.html">SMF Temalar</a> -


<a href="/archives.php">Arşiv</a> -

<a href="#top" onclick="self.scrollTo(0, 0); return false;">Yukarı Git</a>
</strong>
</div>
</td>

    
</tr>
</table>

</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 == "Aria") && 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>'
;
}




// The following will be used to let the user know that some AJAX process is running
echo '<SCRIPT type=text/javascript>vBulletin_init();</SCRIPT>
<div id="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 (vB Clone).  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="inlineimg">';

echo '<img class="inlineimg" src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp;';

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

                if ((
$link_num == count($context['linktree']) - 1) && count($context['linktree'])>1)
                        echo 
'<br />
<img src="' 
$settings['images_url'] . '/icons/linktree_side.gif" alt="" border="0" />&nbsp;';

                
// 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">' $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']) - 2)
                        echo 
'&nbsp;&raquo;&nbsp;';

        }

        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''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';


// Show the [home] button.
echo '

<ul><li><a href="'
$scripturl'?action=home"><span>ANA SAYFA</span></a></li></ul>';

// Show the [help] button.

echo '
<ul><li><a href="'
$scripturl'?action=help"><span>YARDIM</span></a></li></ul>';




// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '

<ul><li><a href="'
$scripturl'?action=profile"><span>PROFİL</span></a></li></ul>';


// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '

<ul><li><a href="'
$scripturl'?action=pm"><span>MESAJLARIM</span></a></li></ul>';

// The [calendar]!
if ($context['allow_calendar'])
echo '
<ul><li><a href="'
$scripturl'?action=calendar"><span>TAKVİM</span></a></li></ul>';

// the [member] list button
if ($context['allow_memberlist'])
echo '

<ul><li><a href="'
$scripturl'?action=mlist"><span>ÜYELER</span></a></li></ul>';


// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '

<ul><li><a href="'
$scripturl'?action=admin"><span>ADMİN</span></a></li></ul>';

// How about the [search] button?
if ($context['allow_search'])
echo '


<ul><li><a href="'
$scripturl'?action=search" rel="nofollow"><span>ARAMA</span></a></li></ul>';
       


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '


<ul><li><a href="'
$scripturl'?action=login"><span>GİRİŞ</span></a></li></ul>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '

<ul><li><a href="'
$scripturl'?action=register"><span>KAYIT</span></a></li></ul>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '

<ul><li><a onclick="return log_out()" href="'
$scripturl'?action=logout;sesc='$context['session_id'], '"><span>ÇIKIŞ</span></a></li></ul>';


}


// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>

grafitus

Sen böyle
if ($context['user']['is_logged'])
echo '
<li><a href="register.php"><span>Kayıt ol</span></a></li>';

bir kod yazarsan "Eğer üye giriş yapmışsa" dersin.Ama
if ($context['user']['is_guest'])
echo '
<li><a href="register.php"><span>Kayıt ol</span></a></li>';


dersen sorunun çözülür.



Bir de SMF'de "register.php" diye kayıt olunmaz. "index.php?action=register" diye olunur..

lordreco

benim sorunum link değilki ne yaparsam yapayım template parse geliyo o kadar çok uğraştımki gözümü ne zaman kapatsam karşıma template parse ekranı geliyo rüyamada girecek

Yağız...


lordreco

#4
header bölümüne zaten kodlar orada linkleri önemli değil onları ayarlayacam fakat gizleme kodunu yerleştirdiğim an template parse diyor kaç gündür uğraşıyom zaten menü varda onları saklayamadım. saklama kodunu ekleyince hata alıyorum


<!-- logo -->
<a name="top"></a>
<div style="width:900px;margin: 0 auto;">
<div id="header">
               <div id="headerleftbg">
                  <div id="headerrightbg">
                     <div id="logo"><a href="index.php"><img src="images/funkyfresh/header/logo.gif" alt="" width="223" height="69" /></a></div>
                     <br  style="clear:both"/>
                     <div id="nav">
  <ul>
    <li><a href="index.php"><span>Home</span></a></li>


   
    <li><a href="register.php"><span>Register</span></a></li>

    <li><a href="calendar.php"><span>Calendar</span></a></li>
   <li><a href="memberlist.php"><span>Members</span></a></li>
   <li><a href="search.php"><span>Search</span></a></li>
   <li><a href="faq.php"><span>Help</span></a></li>
  </ul>
</div>

Yağız...

<!-- logo -->
<a name="top"></a>
<div style="width:900px;margin: 0 auto;">
<div id="header">
               <div id="headerleftbg">
                  <div id="headerrightbg">
                     <div id="logo"><a href="index.php"><img src="images/funkyfresh/header/logo.gif" alt="" width="223" height="69" /></a></div>
                     <br  style="clear:both"/>
                     <div id="nav">
  <ul>
    <li><a href="index.php"><span>Home</span></a></li>';
   if ($context['user']['is_logged'])
   echo '
    <li><a href="register.php"><span>Register</span></a></li>';
  if ($context['allow_calendar'])
   echo '
    <li><a href="calendar.php"><span>Calendar</span></a></li>';
  if ($context['allow_memberlist'])
   echo '
   <li><a href="memberlist.php"><span>Members</span></a></li>';
  if ($context['allow_search'])
   echo '
   <li><a href="search.php"><span>Search</span></a></li>';
  echo '
   <li><a href="faq.php"><span>Help</span></a></li>
  </ul>
</div>

lordreco

#6
helal gardaşlığım oldu Allah (c.c) Razı olsun senden sorunu çözdüm sayende



Advertisement: