News:

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

Main Menu

nCode Image Resizer

Started by vbgamer45, May 18, 2008, 01:43:55 PM

Previous topic - Next topic

MissyNL

Hi.. love this mod!! here is the dutch translation:

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Klik deze titelbar om de volledige afbeeld te bekijken.';
$txt['ncode_imageresizer_warning_filesize'] = 'Deze afbeelding is verkleint. Klik de titelbar om de volledige afbeelding te zien. De originele afbeelding heeft een formaat van %1$sx%2$s and groote %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Deze afbeelding is verkleint. Klik de titelbar om de volledige afbeelding te zien. De originele afbeelding heeft een formaat van %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Klik deze titelbar om de kleine afbeelding te bekijken.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Behoud orignele grootte';
$txt['ncode_imageresizer_enlarge_same'] = 'Vergroot in het zelfde document';
$txt['ncode_imageresizer_open_same'] = 'Open in de zelfde venster';
$txt['ncode_imageresizer_open_new'] = 'Open in een nieuwe window';
$txt['ncode_imageresizer_max_width'] = 'Maximum breedte';
$txt['ncode_imageresizer_max_height'] = 'Maximum hoogte<br /><span class="smalltext">Laat leeg voor geen maximum hoogte.</span>';
// --- End added code ---
Sorry for my poor English, but i think it's probably better then your Dutch :)


Sakae

Quote from: NIBOGO on March 10, 2009, 03:06:43 PM
Quote from: problemwt2.0 on March 10, 2009, 09:31:53 AM
hi :) this mod is also resizing images in signatures :( any way to disable this ?

thanx :)

I quote that.

I use your mod to resize images bigger than 400px of width because of my SimplePortal MOD installed (so the home page don't get scrambled), but unfortunately most of my members signatures are a little bigger than this size.

If there's a way of desactivating this mod just for signatures, it would be awesome.

Meanwhile, here's the Modifications.portuguese_brazilian-utf8 translation:

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Clique para ver em tamanho normal.';
$txt['ncode_imageresizer_warning_filesize'] = 'Imagem redimensionada. Clique para ver em tamanho normal. Imagem %1$sx%2$s com %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Imagem redimensionada. Clique para ver em tamanho normal. Imagem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique para ver em tamanho reduzido.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Manter tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar na mesma janela';
$txt['ncode_imageresizer_open_same'] = 'Abrir na mesma janela';
$txt['ncode_imageresizer_open_new'] = 'Abrir em nova janela';
$txt['ncode_imageresizer_max_width'] = 'Largura m&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para manter a largura.</span>';
// --- End added code ---
http://www.tigrelog.com.br
l: simple p: machines

MissyNL

Hi.. i was wondering if it is possible to make an exeption for the admin. This because i have images on my frontpage that are 800 px width... and now i have to turn it into a flash in order to prefend a resize... Maybe by enabling it or something for the ones who don't want this feature?
Sorry for my poor English, but i think it's probably better then your Dutch :)

ElectricSquid

Hi, I just installed this mod and it's a GREAT addition to my forum. Thank You!!

... but I have one suggestion, It would be easier for the end user if you put the CSS code in the style.css file instead of index.template.php
This way the end user can find the css attributes all in one place when they change the colors and layout of their forum.

ElectricSquid

#145
OK, I moved the CSS code to style.css and noticed that the font color was not responding to my changes. In fact,  it wasn't responding even before I moved it.
A simple move of
        "color: #000000;"
from "table.ncode_imageresizer_warning"
    to "table.ncode_imageresizer_warning td"
made it work without issue.
Just figured I'd pass that info on to anyone else that might have had that issue.

I'm using SMF 1.1.9
TinyPortal 0.9.8
w/ a heavily modified custom theme

harisx

#146
Hello...

This MOD working great in my forum...but, how to disaffect this mod function to any images at user signature??

Please come and visit my forum at http://www.vitanouva.net [nofollow]

Thanks for your help ;)
Vitanouva Brotherhood [nofollow] | HarisMedia Dot Com [nofollow]

Sakae

Ok, I might have a solution to disable this MOD for signatures. Not sure if works, I haven't tested because I use SMF 2.0 RC1-1.

For those using SMF 1.1.x, try to install Signature Settings Mod and allow signatures being the width you need.

http://custom.simplemachines.org/mods/index.php?mod=528
http://www.tigrelog.com.br
l: simple p: machines

ElectricSquid

I looked into the support topic for that mod and it seems as if they are having an error issue with it at this time.


harisx

i used SMF 2.0 RC1-1 version too
Vitanouva Brotherhood [nofollow] | HarisMedia Dot Com [nofollow]


baioslaio

Kind of work but the text wont appear anywhere :(


silverf0x

hi i've installed this mod today on my 2.1RC1-1 forum

it's working fine on default theme, but not on any other themes i have

i've uploaded the ncode_imageresizer.js to themes dir

here is my index.template.php

<?php
// Version: 2.0 Beta 4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

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

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 Beta 4';

/* 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 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;
}

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

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" 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'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");' '''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<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" />'
;

// The ?b4 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'$context['theme_variant'], '.css?b4" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?b4" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';

// 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']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

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

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

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3420549-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<!-- google analytics -->

'
;

echo '
<script src="http://www.pequenasnotaveis.com.br/script/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>'
;
}

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

echo 
'
<div id="wrapper">

<!-- Top flash -->
<div id="topflash">
<!-- fla -->

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="262">
  <param name="movie" value="'
$settings['images_url'], '/topo.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="7.0.70.0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don'
t want users to see the prompt. -->
  <
param name="expressinstall" value="http://www.pequenasnotaveiscom.br/script/expressInstall.swf" />
  <!-- 
Next object tag is for non-IE browsersSo hide it from IE using IECC. -->
  <!--[if !
IE]>-->
  <
object type="application/x-shockwave-flash" data="', $settings['images_url'], '/topo.swf" width="100%" height="262">
    <!--<![endif]-->
    <
param name="quality" value="high" />
    <
param name="wmode" value="opaque" />
    <
param name="swfversion" value="7.0.70.0" />
    <
param name="expressinstall" value="http://www.pequenasnotaveis.com.br/script/expressInstall.swf" />
    <!-- 
The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <
div>
      <
h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <
p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </
div>
    <!--[if !
IE]>-->
  </
object>
  <!--<![endif]-->
</
object>
<
script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

<!-- fla -->
</div>
<!-- Top flash -->

<div id="header">
<!-- <div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div> -->';
if (!empty($settings['
enable_news']))
echo '
<div id="news"><p>', $context['random_news_line'], '</p></div>';
echo '
</div
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="userinfo">
<b>', $context['common_stats']['total_posts'], '</b', $txt['posts'], ' ', $txt['in'], ' <b>', $context['common_stats']['total_topics'], '</b', $txt['topics'], '', $txt['by'], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b', $txt['members'], '</span> -
', $txt['latest_member'], ': <b', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
<div id="searchfield">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="biginput" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 170px;" /> ';

// 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 boardlimit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form><br />
</div>'
;
echo '
<div id="mainarea">
<div id="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6717987246331038";
/* 728x90, criado 23/02/08 */
google_ad_slot = "8353186740";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'
;

// Show the navigation tree.
theme_linktree();

}

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

echo '
</div>
'
;

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

<div id="footer">
'
theme_copyright(), '
<br />Theme by <a href="http://www.cybercreations.com.br">Cyber</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />';

echo '
</div>'
;
}

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

echo 
'
</div>
</body></html>'
;
}

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

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

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

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

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

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

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

// The end of tab section.

       
echo '
</ul>'
;

}

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

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

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'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>

Sabre™

#153
@ baioslaio
Check that the language strings were inserted into your Modifications.english.php.
If youre using UTF8 language file, then copy the strings into your Modifications.english-utf8.php.
The same applies if youre using a language file other than english. eg. Modifications.Klingon.php

Hope that helps :)


@ silverf0x
Try this

<?php
// Version: 2.0 Beta 4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

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

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 Beta 4';

/* 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 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;
}

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

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" 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'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");' '''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<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" />'
;

// The ?b4 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'$context['theme_variant'], '.css?b4" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?b4" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';

// 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']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

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

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

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3420549-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<!-- google analytics -->

'
;

echo '
<script src="http://www.pequenasnotaveis.com.br/script/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>'
;
}

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

echo 
'
<div id="wrapper">

<!-- Top flash -->
<div id="topflash">
<!-- fla -->

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="262">
  <param name="movie" value="'
$settings['images_url'], '/topo.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="7.0.70.0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don'
t want users to see the prompt. -->
  <
param name="expressinstall" value="http://www.pequenasnotaveiscom.br/script/expressInstall.swf" />
  <!-- 
Next object tag is for non-IE browsersSo hide it from IE using IECC. -->
  <!--[if !
IE]>-->
  <
object type="application/x-shockwave-flash" data="', $settings['images_url'], '/topo.swf" width="100%" height="262">
    <!--<![endif]-->
    <
param name="quality" value="high" />
    <
param name="wmode" value="opaque" />
    <
param name="swfversion" value="7.0.70.0" />
    <
param name="expressinstall" value="http://www.pequenasnotaveis.com.br/script/expressInstall.swf" />
    <!-- 
The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <
div>
      <
h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <
p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </
div>
    <!--[if !
IE]>-->
  </
object>
  <!--<![endif]-->
</
object>
<
script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

<!-- fla -->
</div>
<!-- Top flash -->

<div id="header">
<!-- <div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div> -->';
if (!empty($settings['
enable_news']))
echo '
<div id="news"><p>', $context['random_news_line'], '</p></div>';
echo '
</div
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="userinfo">
<b>', $context['common_stats']['total_posts'], '</b', $txt['posts'], ' ', $txt['in'], ' <b>', $context['common_stats']['total_topics'], '</b', $txt['topics'], '', $txt['by'], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b', $txt['members'], '</span> -
', $txt['latest_member'], ': <b', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
<div id="searchfield">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="biginput" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 170px;" /> ';

// 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 boardlimit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form><br />
</div>'
;
echo '
<div id="mainarea">
<div id="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6717987246331038";
/* 728x90, criado 23/02/08 */
google_ad_slot = "8353186740";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'
;

// Show the navigation tree.
theme_linktree();

}

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

echo '
</div>
'
;

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

<div id="footer">
'
theme_copyright(), '
<br />Theme by <a href="http://www.cybercreations.com.br">Cyber</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />';

echo '
</div>'
;
}

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

echo 
'
</div>
</body></html>'
;
}

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

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

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

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

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

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

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

// The end of tab section.

       
echo '
</ul>'
;

}

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

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

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'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>


P.S
Are you aware that for every custom theme which contains its own index.template.php file, you will need to make the edits for them?
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


silverf0x

@ Sabre™

thanks a lot, it's working now!  :D

what u've edited?

Sabre™

My pleasure buddy :)

When you download a mod, on that download page beneath the mod([THIS] mod for example), you will see this text
'Manual Install Instructions for SMF'
You select your version of SMF, then press the 'Parse' button.
The next page will show you what code to add, where to add it, and what templates to add them to.

Happy learning mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


baioslaio

Quote from: Sabre™ on June 09, 2009, 12:00:31 PM
@ baioslaio
Check that the language strings were inserted into your Modifications.english.php.
If youre using UTF8 language file, then copy the strings into your Modifications.english-utf8.php.
The same applies if youre using a language file other than english. eg. Modifications.Klingon.php

Hope that helps :)


@ silverf0x
Try this

<?php
// Version: 2.0 Beta 4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

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

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 Beta 4';

/* 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 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;
}

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

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" 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'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");' '''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<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" />'
;

// The ?b4 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'$context['theme_variant'], '.css?b4" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?b4" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';

// 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']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

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

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

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3420549-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<!-- google analytics -->

'
;

echo '
<script src="http://www.pequenasnotaveis.com.br/script/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>'
;
}

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

echo 
'
<div id="wrapper">

<!-- Top flash -->
<div id="topflash">
<!-- fla -->

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="262">
  <param name="movie" value="'
$settings['images_url'], '/topo.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="7.0.70.0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don'
t want users to see the prompt. -->
  <
param name="expressinstall" value="http://www.pequenasnotaveiscom.br/script/expressInstall.swf" />
  <!-- 
Next object tag is for non-IE browsersSo hide it from IE using IECC. -->
  <!--[if !
IE]>-->
  <
object type="application/x-shockwave-flash" data="', $settings['images_url'], '/topo.swf" width="100%" height="262">
    <!--<![endif]-->
    <
param name="quality" value="high" />
    <
param name="wmode" value="opaque" />
    <
param name="swfversion" value="7.0.70.0" />
    <
param name="expressinstall" value="http://www.pequenasnotaveis.com.br/script/expressInstall.swf" />
    <!-- 
The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <
div>
      <
h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <
p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </
div>
    <!--[if !
IE]>-->
  </
object>
  <!--<![endif]-->
</
object>
<
script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

<!-- fla -->
</div>
<!-- Top flash -->

<div id="header">
<!-- <div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div> -->';
if (!empty($settings['
enable_news']))
echo '
<div id="news"><p>', $context['random_news_line'], '</p></div>';
echo '
</div
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="userinfo">
<b>', $context['common_stats']['total_posts'], '</b', $txt['posts'], ' ', $txt['in'], ' <b>', $context['common_stats']['total_topics'], '</b', $txt['topics'], '', $txt['by'], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b', $txt['members'], '</span> -
', $txt['latest_member'], ': <b', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
<div id="searchfield">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="biginput" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 170px;" /> ';

// 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 boardlimit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form><br />
</div>'
;
echo '
<div id="mainarea">
<div id="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6717987246331038";
/* 728x90, criado 23/02/08 */
google_ad_slot = "8353186740";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'
;

// Show the navigation tree.
theme_linktree();

}

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

echo '
</div>
'
;

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

<div id="footer">
'
theme_copyright(), '
<br />Theme by <a href="http://www.cybercreations.com.br">Cyber</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />';

echo '
</div>'
;
}

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

echo 
'
</div>
</body></html>'
;
}

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

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

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

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

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

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

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

// The end of tab section.

       
echo '
</ul>'
;

}

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

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

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'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>


P.S
Are you aware that for every custom theme which contains its own index.template.php file, you will need to make the edits for them?


Thanks :)
Changing in the utf8 fix'd it!

.Vapor

Wonderful mod...thank you very much !

Lighting_site

Quote from: lonrot on May 18, 2008, 08:28:37 PM
Okay, it works!

To enable this mod you must do this:

1) At > Features and Options > Basic Features > Leave 0 for Max width and Max height
2) At >" " > Layout and Options> Edit Resize Mode and width and lenght.
For example I placed 615 in the width field only.

The bad thing is that if you used image resize before, all the old posts would be already resized.
This mod only works for new posts.

Dont work for my :S

Sabre™

Since you haven't explained what the exact problem is, [This Link] will help others to help you.

Thank You :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Advertisement: