News:

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

Main Menu

Sitra Theme for 1.0.x and 1.1

Started by Mystica, April 08, 2005, 05:21:42 AM

Previous topic - Next topic

Mystica

Try this:


// The logo and the three info boxes
echo '
<div class="box">
<div class="windowbg2" style="margin-bottom: 2px;">
<table width="100%" cellpadding="5" cellspacing="0" border="0"><tr>';

if (!empty($context['user']['avatar']))
echo '<td valign="middle" class="windowbg" width="1">', $context['user']['avatar']['image'], '</td>';

echo '<td valign="top">';

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

// 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 '.<br />';

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

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


echo '<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '<br /><br />

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this);"' : '', '>
<div style="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'], '
<input type="hidden" name="hash_passwrd" value="" />
</div>
</form>';
}

echo '
</td>

<td align="center">
<img src="', $settings['images_url'], '/logo.gif" alt="" />
</td>
<td valign="top" align="right">
', $context['current_time'], '<br /><br />
', $txt['change_color'], ':
<form action="', $scripturl, '" method="post" style="margin: 0px; padding: 0px;"><select name="options[theme_color]" onchange="this.form.submit();">
<option selected="selected" value="', $options['theme_color'], '">Current</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
<option value="yellow">Yellow</option>
<option value="purple">Purple</option>
<option value="brown">Brown</option>
</select><noscript><input type="submit" value="Go!" /></noscript></form>
</td>
</tr>
</table>
</div>

<table width="100%" cellpadding="5" cellspacing="0" border="0" class="windowbg"><tr>';

if (!empty($settings['enable_news']))
echo '
<td class="largetext">
<b>', $txt[102], ':</b> ', $context['random_news_line'], '
</td>';
echo '
<td align="right">
<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: 8ex;" />&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>
</tr>
</table>';

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

echo '
</div>
</div>
<div style="text-align:center;"><img src="', $settings['images_url'], '/logo.gif" alt="" /></div>';
~ there's nothing wrong with me, this is how I'm supposed to be ~

Menni

Thanks M. Learned something new again. :D
Where can I find RGB numbers for theme colours(maincolor;green,red,blue etc.) ? Is it even possible? ::)

Mystica

~ there's nothing wrong with me, this is how I'm supposed to be ~

pieterj

Really nice theme!

I just wanted to let you know many people are very satisfied using it! I started with this theme, because my old template was not functioning right anymore after upgrading from SMF 1.0.5 to SMF 1.1. RC1....

There's only one point that quite a lot of my forummembers experience: The background color in which the text/title of the postings will appear are slightly too dark, or the text would better do in black, instead of the templatecolor. Also, the letterype is al littlebit smaller than in the default template, right? I guess that I can change these things in the CSS file? (Never done it before, I can try off course!)

Thanks for your explanation for putting the forumbanner in top of the page! I made 6 of them in my Dutch fora, everyone in another color!

www.hulpverleningsforum.nl (Dutch)
www.ziekenhuisforum.nl (Dutch)
www.international-ems.com (English)

Mystica

Thanks, glad you and your users like the theme :)

To change the background or text colors in posts, just change the .windowbg classes in the css file. The most important font size settings are in the body, smalltext, normaltext and largetext classes in the css files. If you need help with this, just let me know.
~ there's nothing wrong with me, this is how I'm supposed to be ~

Menni

I'm Trying to add karma description mod to my forum.
->http://mods.simplemachines.org/index.php?mod=192
Tried 10 times allready in my test forum. Can't get it work :(.
Can you tell me what files and where should I modify to make mod work in sitra theme?
And How should I modify it more to make it show only for admins?

Mystica

Have a look at the .xml file of the mod, it tells you which files it modifies and what exactly it does there. Questions about changing the way a mod works should be directed to the mod author, can't help with that.
~ there's nothing wrong with me, this is how I'm supposed to be ~

pieterj

Quote from: Mystica on November 10, 2005, 04:20:50 PM
Thanks, glad you and your users like the theme :)

To change the background or text colors in posts, just change the .windowbg classes in the css file. The most important font size settings are in the body, smalltext, normaltext and largetext classes in the css files. If you need help with this, just let me know.
It worked very well, I'm a satisfied webmaster now  ;)

Another thing I tried to change is the text "new" for new postings. Some members find it hard to see between the other colors. I guess it is difficult to change to another color, because it's a hyperlink? Or is there a simple way to change the color of the word "new", without changing the colors of the whole template? Or is there any possibility to put an icon there instead of text?

Mystica

You'll have to modify it in messageindex.template.php, profile.template.php and recent.template.php. Look for $txt[302] there.
~ there's nothing wrong with me, this is how I'm supposed to be ~

Reinno

Wow!!

Thanks a lot, Mystica, for this awesome template. Never seen anything so cool before like giving visitors the option of choosing between six different color themes just by installing one single template. Impressive!

Reinno

It seems like there´s an issue with remembering passwords. I have to type in the password manually each time after I´ve logged out, it doesn´t remember the password in the input field. I´m using RC 1.1. What could be the problem?

Mystica

As far as I know this is a browser-based feature and has not much to do with the websites you are using. Does the feature work with the default theme?
If you are the only one who is using your computer, you could just select "always stay logged in" and won't have to log out anymore.
~ there's nothing wrong with me, this is how I'm supposed to be ~

B

Very nice theme, Mystica. *thumbs up*

B


Conquer Club - Free Global Domination Game
Think the board game Risk on steroids!

Reinno

Quote from: Mystica on December 05, 2005, 12:49:23 PM
Does the feature work with the default theme?
Yes, the feature worked with the default theme, both with Firefox and IE. Am I the only one with this problem?  :-\

Reinno

Everything works fine now. I have absolutely no idea what happened with the cookie session, but it was probably my own fault to begin with anyway. :P

The Sitra theme rules!  :)

Jerry Jingles

I have added a logo at the top above everything. My question is can i add an ad banner above my logo? So the ad banner would be at the very top then my logo below that.
   

    

Mystica

Depends on the ad banner, but it should usually work ok, just add the code above your logo and try if it works.
~ there's nothing wrong with me, this is how I'm supposed to be ~

missmaggoo

Hey, I am very new to this but I wanted you to know that this theme is absolutely stunning.  :D
Maggie
~ Web Designer
Maggie's Web [nofollow]

Menni

#178
Hello again Mystica. :D

How should I modify this code to make it work with your theme? Mod is visualwarning.
<file name="$themedir/Display.template.php">
          <operation>
             <search position="before"><![CDATA[ if ($message['can_remove'])
echo '
<a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
]]></search>
             <add><![CDATA[ if ($context['can_warn'])
echo '
<a href="', $scripturl, '?action=warnadd;topic=', $context['current_topic'], ';start=', $context['start'], ';user=', $message['member']['id'], ';msg=', $message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_visualw.gif" alt="' . $txt['visual_raise'] . '" border="0" />' : $txt['visual_warn']), '</a>';

]]></add>
          </operation>
         
          <operation>
             <search position="before"><![CDATA[ if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';
]]></search>
             <add><![CDATA[ if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '')
echo'
', $message['member']['warning']['link'];
]]></add>
           </operation>
        </file>

       
Problem solved.
Found the answer by my self from here ;)
http://www.simplemachines.org/community/index.php?topic=32628.45

Menni

For this one, I havent found the answer. How should I modify this code to make to make |groups| show between profile and calendar?

// View Groups Interface... [groups]
if (allowedTo('view_groups'))
echo '
<a href="', $scripturl, '?action=groups">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/groups.gif" alt="' . $txt['elgm4'] . '" style="margin: 2px 0;" border="0" />' : $txt['elgm4']), '</a>', $context['menu_separator'];


Advertisement: