Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: drogbaamir on May 22, 2011, 06:01:15 AM

Title: please guys help me :)
Post by: drogbaamir on May 22, 2011, 06:01:15 AM
(http://i51.tinypic.com/ou8cnd.jpg)
How CAn i remove this? "in the black things"
i dont need it to be there!! :S
Please help

Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 06:20:36 AM
Quote from: drogbaamir on May 22, 2011, 06:01:15 AM
How CAn i remove this? "in the black things"
i dont need it to be there!! :S
Please help

Attach your index.template.php (from your custom theme).

But please note that this container will become a lot smaller, sized to the height of "Welcom To AT-WorlD Website, etc" (which a little margin)
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 06:34:12 AM
<?php
// Version: 2.0 RC3; index

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="'
$scripturl'?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - '$txt['rss'], '" href="'$scripturl'?type=rss;action=.xml" />';

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

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

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

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/rtl.css" />';

echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?rc3"></script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/theme.js?rc3"></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 ()
{
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' 
'''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>'
;

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

echo '
</head>
<body>'
;
}

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

echo '



<div id="body-top">
<div id="top-banner">
</div>
</div>
'
,template_menu(),'

<div id="mainbody">
<div class="clr"/></div>
<div class="wrapper">'
;


theme_linktree2(false,'white');



}

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

echo '<br /><br />
<div align="center" class="smalltext" style="padding: 4px;">
'
theme_copyright(), '
</div>

</div>
'
;

//DO NOT REMOVE THIS :)
echo'
<div class="footerlu">
<a href="WwW.At-WorlD.Co.Cc" target="_blank">
Estalia
</a> by 
<a href="WwW.At-WorlD.Co.Cc" target="_blank">
AmiR.Taha
</a>'
;


// Show the load time?
if ($context['show_load_time'])
echo '<br />
<span class="smalltext">'
$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';


echo'</div>';
}

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

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

}

function 
theme_linktree($force_show false){echo'<br />';}
function 
theme_linktree2($force_show false$color 'black')
{
 global $context$settings$options$txt$scripturl;
// display the user info panel
echo '


<table width="100%" cellspacing="0" cellpadding="6" class="tborder" border="0" align="center">
<tr>'
;
echo '
<td align="left" valign="middle">'
;
// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav-tree">';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];
if (($link_num == count($context['linktree']) - 1) && count($context['linktree'])>1)
echo '<br />
&nbsp;&raquo;&nbsp;'
;

// Show the link, including a URL if it should have one.
echo ''$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" style="color: '.$color.';">' $tree['name'] . '</a>' $tree['name'], '';


// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
// Don't show a separator for the last one.
if ($link_num count($context['linktree']) - 2)
echo '&nbsp;&raquo;&nbsp;';
}
echo '</span>
</td>
<td align="left" valign="middle" width="380">'
;
// Show the total time logged in?
if ($context['user']['is_logged'])
{
echo'<table><tr>';
if (!empty($context['user']['avatar']))
echo '

<td>'
$context['user']['avatar']['image'], '</td>';
echo '
<td><ul class="reset">
<li class="greeting" style="color: '
.$color.';">'$txt['hello_member_ndt'], ' <span>'$context['user']['name'], '</span></li>
<li><a href="'
$scripturl'?action=unread" style="color: '.$color.';">'$txt['unread_since_visit'], '</a></li>
<li><a href="'
$scripturl'?action=unreadreplies" style="color: '.$color.';">'$txt['show_unread_replies'], '</a></li>';

echo'
</ul></td>'
;

echo'</tr></table>';
}
else{
echo '
<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'] . '\');"' '''>
<div class="info">'
$txt['login_or_register'], '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">'
$txt['one_hour'], '</option>
<option value="1440">'
$txt['one_day'], '</option>
<option value="10080">'
$txt['one_week'], '</option>
<option value="43200">'
$txt['one_month'], '</option>
<option value="-1" selected="selected">'
$txt['forever'], '</option>
</select>
<input type="submit" value="'
$txt['login'], '" class="button_submit" /><br />
<div class="info">'
$txt['quick_login_dec'], '</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="" />
</form>'
;
}

echo '
</td>
</tr>

</table><br />
'
;


echo'

<br />'
;

}

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


echo'
<div id="navigation">
<ul>'
;

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

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

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$strip_options = array())
{
global $settings$context$txt$scripturl;

if (!is_array($strip_options))
$strip_options = array();

// 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) ? ' align_' $direction '''"', (empty($buttons) ? ' style="display: none;"' ''), (!empty($strip_options['id']) ? ' id="' $strip_options['id'] . '"'''), '>
<ul>'
,
implode(''$buttons), '
</ul>
</div>'
;
}

?>
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 06:36:21 AM

When posting a reply, you can add an attachment to it. What you did is copy/paste the file, that is not what I asked.
Below the text box, click the collapse image ((http://www.simplemachines.org/community/Themes/default/images/expand.gif)) and upload the same file.
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 06:41:12 AM
here but i cant see no diffrence betwen that i copy what inside it or u see what inside it.. but ok..
Title: Re: please guys help me :)
Post by: CapadY on May 22, 2011, 06:48:46 AM
Quote from: drogbaamir on May 22, 2011, 06:41:12 AM
here but i cant see no diffrence betwen that i copy what inside it or u see what inside it.. but ok..
To remove the lower black thing the best thing you can do is rightclick in it, select properties and then enable "Auto Hide".
Title: Re: please guys help me :)
Post by: CapadY on May 22, 2011, 06:49:55 AM
Quote from: drogbaamir on May 22, 2011, 06:41:12 AM
here but i cant see no diffrence betwen that i copy what inside it or u see what inside it.. but ok..

The difference is, as an attachement it is more easy to upload the file and use it in a compare programm or debugger.

There are also files with 5000 lines or more code.
And believe me, you don't want to have then shown in a forum. Especialy not when they are posted a few times.
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 06:57:43 AM
QuoteTo remove the lower black thing the best thing you can do is rightclick in it, select properties and then enable "Auto Hide"."

i cant understund you :S!! please tell me how to remove it..? i have to remove codes or something , more help..
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 06:59:06 AM
Quote from: drogbaamir on May 22, 2011, 06:41:12 AM
here but i cant see no diffrence betwen that i copy what inside it or u see what inside it.. but ok..

You don't neccessarily have to see the differences as CapadY already explained. Also, you posted the code in clear text, which means that some code got parsed as BBC, causing it can't be copied by someone else.

Try this one. If my edit is buggy, you can also re-upload the original file which you have uploaded to this forum ;)
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 07:01:46 AM
thanks hunter , i got another quis, if i wanna put a Facebook, Twitter, Rss Pictures in the top beside puting this "personal messege and avatr thing" how can i? like i need to put them and when they click on it they see my facebook page and my twitter and rss :) , please..
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 07:10:02 AM
to be more specific , look i need this 3 pictures to be on the top beside "personal and avatr thing" cause it looks awful when it some kind blank so i wanna replace it with the pictures on it, like this..
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 07:10:58 AM
I see you got it working. The 'container' is still very high, that is due to the background image.
You can use the attached one instead.
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 07:20:20 AM
look at he pictures.. i need it to be right tthere.. :D

if u need css file i will give u + plus the pictures + href links when they click on the picture they will go to my fb/twiiter pages..
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 07:37:56 AM
Quote from: drogbaamir on May 22, 2011, 07:01:46 AM
if i wanna put a Facebook, Twitter, Rss Pictures in the top beside puting this "personal messege and avatr thing" how can i? like i need to put them and when they click on it they see my facebook page and my twitter and rss :) , please..

Try this file. You will need to edit your accounts yourself, find :

<td align="left" valign="middle" width="380">
<a target="_blank" href="http://www.facebook.com/"><img align="middle" title="Facebook" alt="*" src="' . $settings['images_url'] . 'facebook.png"></a><br />
<a target="_blank" href="http://twitter.com/"><img align="middle" title="Twitter" alt="*" src="' . $settings['images_url'] . 'twitter.png"></a>
</td>


And put the accountname behind the last / in the URL. Also, you will need to add facebook and twitter PNG images yourself. If you can't find them, I can offer you (20x20 pixels).
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 07:48:54 AM
facebook = http://i52.tinypic.com/4io9ow.png
twittter= http://i53.tinypic.com/jiz2v4.png

give me now the right code... to put so it can appear..
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 07:54:06 AM
Quote from: drogbaamir on May 22, 2011, 07:48:54 AM
facebook = http://i52.tinypic.com/4io9ow.png
twittter= http://i53.tinypic.com/jiz2v4.png

give me now the right code... to put so it can appear..

Are these permanent links? It is recommended to put them on your own server...
What are the account names of your facebook and twitter?
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 07:57:35 AM
my server is www.at-world.co.cc
and i got the pictures of the "facebook. twitter" where to put them in which diroctry? in themes? in where like i have themes/XXX"my them name"/images/Facebook.png/Twitter.Png. i putted them there but nothing works they does not appear


twitter is
www.twitter.com/amirizme
FACEBOOK http://www.facebook.com/pages/At-WorlD-iT-iS-Just-Perfect/196945990342426
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 08:05:11 AM

Yes they should be in :

yourtheme/images/twitter.png
yourtheme/images/facebook.png

Sorry, I made a typo, they are placed correctly.

Try this file, the typo is fixed and your accountnames are included.

One small issue, your images are bigger than I thought, meaning that you will probably have to use the old background image again, but first let's see what this file does.
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 08:23:55 AM
the pictures appear but its not what i want i need to be in the center under the menu not on the mneu or touching the menu i need it to be exactly in the center
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 09:17:44 AM
Quote from: drogbaamir on May 22, 2011, 08:23:55 AM
the pictures appear but its not what i want i need to be in the center under the menu not on the mneu or touching the menu i need it to be exactly in the center

The first part was easy, but now it's becoming more difficult. The way this table is coded, it has the same width as the personal menu to the main menu, so it can't be centered below the menu. It can be moved, but that can cause issues with the background image. Also, the current images are very big, is that really what you want?
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 09:18:55 AM
ok can u give me the 20x20 pictures with the right code so i can be able to do it without any prblomes, thanks :)
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 09:30:51 AM
look at my website i did it.. i puted the width thing "550" it is ok now but the thing is there is something not good this "Welcome To AT-WorlD Website, iT iS Just Perfect ยป Forum " u cant see it clearly
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 09:32:12 AM

First, can you put the original background image back?
Title: Re: please guys help me :)
Post by: HunterP on May 22, 2011, 09:37:29 AM
Quote from: drogbaamir on May 22, 2011, 09:18:55 AM
ok can u give me the 20x20 pictures with the right code so i can be able to do it without any prblomes, thanks :)

I use these on my own forum :

http://www.hulpverleningsforum.nl/images/facebook.png
http://www.hulpverleningsforum.nl/images/twitter.png
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 09:43:22 AM
i dont need 20X20 i fixed it :)
----
ok it now perfect another quis, about the menu it is lil more going to left.. how can i put it in the center exactly in the center and how can i put icons next to it.. thanks :)
Title: Re: please guys help me :)
Post by: drogbaamir on May 22, 2011, 11:54:07 AM
any one can tell me how to move lil bit the menu = home, profile ,fourm ?
and how can i put pics next to them... thanks :)
Title: Re: please guys help me :)
Post by: drogbaamir on May 23, 2011, 01:20:28 AM
anybody :S?
Title: Re: please guys help me :)
Post by: Illori on May 23, 2011, 05:40:45 AM
you are best to create a separate thread for your new issue/question as your old question was resolved. also by posting multiple questions in the same thread it will become difficult to follow.