Advertisement:

Author Topic: Teeman muokkausta  (Read 6511 times)

Offline Villesa

  • Full Member
  • ***
  • Posts: 494
  • Gender: Male
  • Yes it's me indeed
    • Finnish erotic forum -- no porn --
Teeman muokkausta
« on: March 15, 2004, 04:41:09 AM »
Kuinka saa muokattua teemaa siten että ylhäällä olevat "user info" news box" ja "key stat" alueet olisi foorumin alalaidassa ?

Tai miten niitä saa pois käytöstä ?

Ja tuo "search" boxi pois.
« Last Edit: March 15, 2004, 04:48:10 AM by Villesa »
You'll get the idea

I'm all ok.

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: Teeman muokkausta
« Reply #1 on: March 15, 2004, 05:03:54 AM »
index template.php ssa on se mitä etsit. Näissä teematiedostoissa on tarkasti dokumentoitu mikä toiminto on missäkin. Se mitä etsit esim nyt on tämä

// The logo and the three info boxes

Eli tämä osa koodia on se mitä etsit

Code: [Select]
// The logo and the three info boxes
echo '
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="position: relative;">
<tr>
<td colspan="2" valign="bottom" style="padding: 5px; font-family: Georgia, serif; font-size: xx-large; white-space: nowrap;">
<img src="', $settings['images_url'], '/smflogo.gif" width="250" style="float: right;" alt="" />
', $context['forum_name'], '
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div style="border: 1px solid #6B8EAE; background-color: #6B8EAE; margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div style="border: 1px solid #7A7777; position: relative; margin-right: 5px; background: #EFEFEF url(', $settings['images_url'], '/box_bg.gif); background-repeat: repeat-x; background-position: bottom;">
<img src="', $settings['images_url'], '/' , $context['user']['language'] , '/userinfo.gif" style="position: absolute; left: -1px; top: -16px; clear: both;" alt="" />
<div class="smalltext" style="margin: 5px; font-family: verdana, arial, sans-serif;', !empty($context['user']['avatar']) ? ' background-image: url(' . $context['user']['avatar']['href'] . '); background-position: top right; background-repeat: no-repeat;' : '', '">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
', $txt[247], ' <b>', $context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>', $txt[616], '</b>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=regcenter">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'];

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
}

echo '<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
', $context['current_time'];
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt[248], ' <b>', $txt[28], '</b>. ', $txt[249], ' <a href="', $scripturl, '?action=login">', $txt[34], '</a> ', $txt[377], ' <a href="', $scripturl, '?action=register">', $txt[97], '</a>.<br />
', $context['current_time'], '<br />

<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
', $txt['smf52'], '
</form>';
}

echo '
</div>
</div>

<form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-top: 7px;">
<b>', $txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="width: 50px;" />&nbsp;
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<input type="hidden" name="advanced" value="0" />';

// If we're on a certain board, limit it to this board ;).
if (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>

</td>
<td width="262" style="padding-left: 5px;" valign="top">';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div style="width: 260px; border: 1px solid #6B8EAE; background-color: #6B8EAE;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div style="width: 260px; border: 1px solid #7A7777; position: relative; background: #EFEFEF url(', $settings['images_url'], '/box_bg.gif); background-repeat: repeat-x; background-position: bottom; margin-bottom: 8px;">
<img src="', $settings['images_url'], '/' , $context['user']['language'] , '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $context['random_news_line'], '</div>
</div>';

echo '
<div style="width: 260px; border: 1px solid #6B8EAE; background-color: #6B8EAE;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div style="width: 260px; border: 1px solid #7A7777; position: relative; background: #EFEFEF url(', $settings['images_url'], '/box_bg.gif); background-repeat: repeat-x; background-position: bottom;">
<img src="', $settings['images_url'], '/' , $context['user']['language'] , '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ',  $txt[19], '<br />
', $txt[656], ': <b> <a href="', $scripturl , '?action=profile;u=' , $modSettings['latestMember'] , '">' , $modSettings['latestRealName'] , '</a></b>
</div>
</div>
</td>
</tr>
</table>

<a href="javascript:void(0);" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />';
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: Teeman muokkausta
« Reply #2 on: March 15, 2004, 06:18:59 AM »
Niinpä...kyllä tietoa on paljon, mutta kun vielä pitäisi tietää miten se thdään? Mitä pitäisi poistaa ja mitä kyseisen poistaminen tekee? Jos poistat tietämättä mitä pitää poistaa, saatikka mihin muotoon muuttaa niin kaatuu koko ohjelma. Toivoisin aina esimerkkejä ja tarkaa tietoa siitä mitä osia koodeista poistetaan tai muutetaan mihinkä muotoon jne.  ::)

Kun deletoit tuon koodin, se yläpalkki häviää. Kannattaa aina ottaa varmuuskopio tiedostosta ennen muokkausta ja kokeilla. Niin minäkin olen oppinut. Kantapään kautta ;)
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0