November 21, 2024, 07:52:47 PM

1,531,352 Posts in 46,734 Topics by 1,523 Members
› View the most recent posts on the forum.


Y/N

Started by Daddy, May 04, 2008, 11:08:49 AM

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

Go Down

Daddy

I'm trying to modify a theme. It's my first one. n_u  I got a few things set up.



I need to figure out how to remove the "METROPOLIS" and the broken image at the top, which I believe may have something to do with.
Code Select
<table width="100%" cellpadding="0" cellspacing="0" border="0"  align="center">
<tr>
<td align="center" class="header_bg">
<img src="', $settings['images_url'], '/hederbg.gif" alt="" />';
if (empty($settings['header_logo_url']))
echo '
<span style="float:right;width:40%;"><a href="', $scripturl, '"><img src="', $settings['images_url'], '/mtlogo.gif" alt="" /></a></span>
</td>
</tr>
</table>';



Also, if I try to set a banner in the admin cp I get a weird set up.  I need to edit the CSS file to say
Code Select
.header_bg
{
height: 100px;
background: #000000 url(http://boyah.net/forums/banner/banner.php) repeat-x;
}
, which becomes a pain in the ass to change the banner

This is what happens if I try to do it via admin cp.  :(





this is what i started with and also notice how buttons don't work and i need to fix that


RICKY WHAT DO I DO

wawi

That theme looks cool
y

FullmetalGanon

y
i would use it

ncba93ivyase

If you can ever fix it, make the star trek image the sole banner.

Quote from: ncba93ivyase on June 18, 2014, 07:58:34 PMthis isa great post i will use it in my sig

Daddy

Quote from: Lawlz on May 04, 2008, 11:27:36 AM
If you can ever fix it, make the star trek image the sole banner.
meaty cocks.

Can you help me to get this done faster?



I just have to:
-Make it so additional buttons work
-Remove the "Metropolis" logo
-Remove the broken image
-Make banners work properly

Ricky

What's the URL to the broken image?

Also, post the toplinks section of Index.Template.php.

Daddy

Quote from: STINKYLINKY401 on May 04, 2008, 11:30:21 AM
What's the URL to the broken image?
Code Select

<img src="', $settings['images_url'], '/hederbg.gif" alt="" />';
So, http://localhost:8888/topsecret/Themes/Metropolis/images/hederbg.gif
It's not even needed though

QuoteAlso, post the toplinks section of Index.Template.php.
Code Select
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

  echo '<div id="tab">

<ul>';

// Show the [home] button.
echo '<li', $current_action == 'home' ? ' class="active"' : '', '><a href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';

// Show the [help] button.
echo '<li', $current_action == 'help' ? ' class="active"' : '', '><a href="', $scripturl, '?action=help"><span>' , $txt[119] , '</span></a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo '<li', $current_action == 'search' ? ' class="active"' : '', '><a href="', $scripturl, '?action=search"><span>Search</span></a></li>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li', $current_action == 'admin' ? ' class="active"' : '', '><a href="', $scripturl, '?action=admin"><span>' , $txt[2] , '</span></a></li>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li', $current_action == 'profile' ? ' class="active"' : '', '><a href="', $scripturl, '?action=profile"><span>' , $txt[79] , '</span></a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li', $current_action == 'pm' ? ' class="active"' : '', '><a href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';

// The [calendar]!
if ($context['allow_calendar'])
echo '<li', $current_action == 'calendar' ? ' class="active"' : '', '><a href="', $scripturl, '?action=calendar"><span>' , $txt['calendar24'] , '</span></a></li>';

// The [member] list button.
if ($context['allow_memberlist'])
echo '<li', $current_action == 'mlist' ? ' class="active"' : '', '><a href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';

// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li', $current_action == 'login' ? ' class="active"' : '', '><a href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';

  // If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li', $current_action == 'register' ? ' class="active"' : '', '><a href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';

// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li', $current_action == 'logout' ? ' class="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';
echo '</ul></div>';

}

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

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

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

Ricky

So you got the broken image removed? Also I don't see the shop button in template_menu().

Daddy

Quote from: STINKYLINKY401 on May 04, 2008, 11:38:09 AM
So you got the broken image removed?
No, but the image never existed so I don't know why theme maker tried to include it
QuoteAlso I don't see the shop button in template_menu().
I removed it since it didn't work

Code Select
if ($context['user']['is_logged'])
    echo '<li', $current_action == 'mlist' ? ' class="active"' : '', '>' , 'Shop' , '</li>';



Yes, I know that goes to the memberlist.

[hedy]Zidone

This may be irrelevant, but HOLY FUCK the code tag is broken in Windows. doodthing;

Ricky

Quote from: JMV on May 04, 2008, 11:41:12 AM
No, but the image never existed so I don't know why theme maker tried to include itI removed it since it didn't work

Code Select
if ($context['user']['is_logged'])
    echo '<li', $current_action == 'mlist' ? ' class="active"' : '', '>' , 'Shop' , '</li>';



Yes, I know that goes to the memberlist.


The button isn't linking to anything. My guess is that it needs to link to something to apply to the CSS.

Also don't forget to add it to the actions array.

Daddy

Quote from: STINKYLINKY401 on May 04, 2008, 11:44:23 AM
The button isn't linking to anything.
how do ido that bassir dind't tell me

QuoteMy guess is that it needs to link to something to apply to the CSS.
Damn arab was right.

QuoteAlso don't forget to add it to the actions array.
D:

Ricky

Quote from: JMV on May 04, 2008, 11:45:16 AM
how do ido that bassir dind't tell me

Code Select

<a href="$scripturl?action=shop">Shop</a>


Or just copy from one of the other buttons, because SMF might have some variable problems with what I posted.

ncba93ivyase

I think you should put that code in a spoiler, because it's spilling everywhere.

Quote from: ncba93ivyase on June 18, 2014, 07:58:34 PMthis isa great post i will use it in my sig

Ricky

Quote from: Lawlz on May 04, 2008, 11:49:21 AM
I think you should put that code in a spoiler, because it's spilling everywhere.
THATS THE POINT HELLO

Go Up