News:

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

Main Menu

[Theme] Amber (SMF v1.1RC1 - v1.1RC2)

Started by bloc, November 16, 2005, 07:35:47 PM

Previous topic - Next topic

shireling

Prettiest theme. :D I ganked it.  Thank you very much for designing what I would design if I knew how to do themes.

lovesall

Will the psd file allow the new amber11rc2 to work with TP?

bloc

#102
Yes. The header is the same in all versions.

edit: ehm, you will need the 1.1RC2 version of TP-enabled Amber.Sorry for misunderstanding. I will convert all TP themes shortly too.

DW

Yea I actually have a question... Ive tried viewing this in Opera, Firefox, and IE, but for some reason the avatars have a scroll button underneath (the whole avatar doesnt show unless we scroll).. is there anyway to fix that? Yes ive tried doing the image resize but it doesnt work (And i have gdmodule installed on server).

bloc

If the avatar is beyond a certain size it will get a scrollbar as to not destroy the layout of the post.

Open Display.template of Amber and find:
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';


Just remove the overflow: auto; bit and you get no scrollbars.

chadness

Still may be my favorite theme ever.  I really need to use this somewhere. :)

Bloc, did you add the inline editing to the RC2 version?

bloc

Yes..but it had an error. Uploading new version now.

ramapoughnative

I am a humble newbie and I wanted to say this is a great theme! If I may, my question is, can I get the news section to scroll or fade x number of news items from the news list?

Thank you

Steven 

bloc

Uhm..you would need some sort of scroller javascript code for that I guess.

ramapoughnative

Thanks.. One more question. What file loads the background image? In the .psd file it was called backdrop. Thanks!

bloc

Background-image is set in the style.css..look for body tag and this:

background-image: url(images/img/back.jpg);


It should be in the PSD file as well..as one "slice" there on the left I think. Its made such that it repeats itself for the width, but not for the height. I also applied a background-color matching the last pixel on that "slice"..to make it seamless.


- danny

Bloc, as usual, your themes rock! Thank you.

I'm wondering if you had figured out what causes the newsbox and searchbox width to be off on IE though? I've read this thread quite a few times now and don't think I saw anything that said there was a fix. Everything seems to work great with FF.

Can you help?

- danny

Forgot to add:

I have tried adding google ads in the sidebar that we can add content to (via admin panel), but it creates a scrollable box instead of actually expanding. Is there a way to correct this or is not possible to add ads?

bloc

I think its the form elements with fixed widths that cause trouble. I will see if I can just remove that or set it to percent values instead.

For the scroll to be off, find this code:
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['my_sidebar_title']) && !empty($settings['my_sidebar']))
echo '<br /><div style="padding: 2px 5px 2px 20px;" class="titlebg0"><b>'.$settings['my_sidebar_title'].'</b></div>
<div class="windowbg02" style="padding: 10px;">
<div style="width: 170px; height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $settings['my_sidebar'] , '</div></div>';


and remove the "overflow: auto;" stuff.

- danny


Mtex

Congratulations Bloc.

It's a very beautifull theme.

Regards, MTex

- danny

Hey bloc, I wanted to make another inquiry from you.

Still using the Amber theme, and SMF 1.1 RC2, I want to know if the following is possible and if you by chance knew, how to do this...

I'm interested in adding a feature to the search function.

I want to enable a member to start a topic from the search feature if they haven't found what they were looking for.

Something that says along the lines of: "Couldn't find what you're looking for? Click here to start your own topic."

...My board's currently seperated into several categories though, would it be possible to have that link in the search bar (to create a new post), direct those users to a particular category - to start that topic? I guess before that could be answered, is it at all possible to do what I'm referring to? And if so, would you be able to tell me what I need to do?

bloc

uhm..that was quite a bit of change. :)

How about this then...it will only add the question if the search return no results though:

- copy over a duplicate of Search.template from default theme to Amber theme.
- Open it and find the follwing:
else
echo '
<td width="100%" colspan="5">', $txt['search_no_results'], '</td>';
echo '
</tr>';

- add on the next line (feel free to change the question):
if (empty($context['topics']))
{
             // no results..perhaps let them start a new topic?
          echo '<tr class="windowbg"><td colspan="5"><br />
          Couldn\'t find what you\'re looking for? Post in one of the following boards instead:<ul>';

//check if we have a board ID set in field 1
if(!empty($settings['ask_board1_id']))
echo '<li><a href="' , $scripturl , '?action=post;board=' , $settings['ask_board1_id'] , '.0">' , $settings['ask_board1_name'] , '</a></li>';

//check if we have a board ID set in field 2!
if(!empty($settings['ask_board2_id']))
echo '<li><a href="' , $scripturl , '?action=post;board=' , $settings['ask_board2_id'] , '.0">' , $settings['ask_board2_name'] , '</a></li>';

//check if we have a board ID set in field 3!!
if(!empty($settings['ask_board3_id']))
echo '<li><a href="' , $scripturl , '?action=post;board=' , $settings['ask_board3_id'] , '.0">' , $settings['ask_board3_name'] , '</a></li>';

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


- then search for:
if (empty($context['topics']))
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td>
<table border="0" width="100%" cellpadding="2" cellspacing="1" class="bordercolor"><tr class="windowbg2"><td><br />
<b>(', $txt['search_no_results'], ')</b><br /><br />
</td></tr></table>
</td></tr></table>';

- and replace that with:
if (empty($context['topics'])){
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td>
<table border="0" width="100%" cellpadding="2" cellspacing="1" class="bordercolor"><tr class="windowbg2"><td><br />
<b>(', $txt['search_no_results'], ')</b><br /><br />';

             // no results..perhaps let them start a new topic?
          echo 'Couldn\t find what you\'re looking for? Post in one of the following boards instead:<ul>';

//check if we have a board ID set in field 1
if(!empty($settings['ask_board1_id']))
echo '<li><a href="' , $scripturl , '?action=post;board=' , $settings['ask_board1_id'] , '.0">' , $settings['ask_board1_name'] , '</a></li>';

//check if we have a board ID set in field 2!
if(!empty($settings['ask_board2_id']))
echo '<li><a href="' , $scripturl , '?action=post;board=' , $settings['ask_board2_id'] , '.0">' , $settings['ask_board2_name'] , '</a></li>';

//check if we have a board ID set in field 3!!
if(!empty($settings['ask_board3_id']))
echo '<li><a href="' , $scripturl , '?action=post;board=' , $settings['ask_board3_id'] , '.0">' , $settings['ask_board3_name'] , '</a></li>';

echo '</ul></td></tr></table>
</td></tr></table>';
}


- ok, half there. :) Open up Settings.template from Amber and find:
array(
'id' => 'number_recent_posts',
'label' => $txt['number_recent_posts'],
'description' => $txt['number_recent_posts_desc'],
'type' => 'number',
),

- and add on the next line(be sure to find the exact code above):
array(
'id' => 'ask_board1_id',
'label' => 'ID of board 1',
'description' => '',
'type' => 'number',
),
array(
'id' => 'ask_board1_name',
'label' => 'Name of board 1',
'description' => '',
'type' => 'text',
),
array(
'id' => 'ask_board2_id',
'label' => 'ID of board 2',
'description' => '',
'type' => 'number',
),
array(
'id' => 'ask_board2_name',
'label' => 'Name of board 2',
'description' => '',
'type' => 'text',
),
array(
'id' => 'ask_board3_id',
'label' => 'ID of board 3',
'description' => '',
'type' => 'number',
),
array(
'id' => 'ask_board3_name',
'label' => 'Name of board 3',
'description' => '',
'type' => 'text',
),


- Done.

Now all you do is go into current theme settings and add the board ID you want people to post in, and a name ( just the board name if you like). The code checks if board ID field is empty, so if you don't set anything, it won't show.

I just added 3 of those ID/name fields, but you see the logic, so you can add more if you like. Below is a screenshot of how it looks.

ramapoughnative1

Bloc..
I have a question about adding buttons to your theme RC2. I need to add a button at the top where login is for a gallery button. I have read what you wrote earlier and made the changes to index.template.php but the button doesn't show when displayed. I have just integrated coppermine and need this. See below...

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

   $ca = 'home';

   // find the action
   if(isset($_GET['action']))
   {
      if (in_array($_GET['action'],array('search','admin','calendar','profile','mlist','register','login','gallery')))
         $ca = $_GET['action'];
      else
         $ca = '';

      // admin section....
      if (in_array($_GET['action'],array('admin','modifyModSettings','modsettings','maintain','reports','viewErrorLog')))
         $ca = 'admin';
   }
   // messageindex/display then?
//   if(isset($_GET['topic']) || isset($_GET['board']))
//      $ca = '';

   echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="'.$settings['images_url'].'/img/tab_first' , $ca=='home' ? '_active' : '' , '.jpg" alt="" style="margin: 0;" /></td>';

   $tab1 = '<td class="tab';


   // Show the [home] and [help] buttons.
   echo $tab1, $ca== 'home' ? '1' : '2' , '"><a href="', $scripturl, '">'.$txt[103]. '</a></td>';
   echo $tab1, $ca== 'help' ? '1' : '2' , '"><a href="', $scripturl, '?action=help" >'.$txt[119]. '</a></td>';
   echo $tab1, $ca== 'gallery' ? '1' : '2' , '"><a href="', $scripturl, '\gallery\index.php" >'.$txt['gallery']. '</a></td>';

   // How about the [search] button?

What am I doing wrong? Thanks

Steven
"Blast that Felix and his magic bag!" - Master Cylinder

Advertisement: