News:

On Deck: Next is "Bluemoon" For SMF 2.1.4! ;)

 

Recent Topics

Members
  • Total Members: 155
  • Latest: TMXXX
Stats
  • Total Posts: 10,782
  • Total Topics: 1,380
  • Online today: 163
  • Online ever: 879
  • (Jan 21, 20, 05:49:15 PM)
Users Online
Users: 0
Guests: 72
Total: 72

Almost afraid to ask...

Started by Druwish, Jul 01, 10, 10:37:34 AM

Previous topic - Next topic

0 Members and 7 Guests are viewing this topic.

Druwish

Do you have a link to, or can you tell me how to add an arcade button to the original Black Rain theme?  I already have the .gif button for it. The button .gif is a little animated space invaders guy.

I'm using smf version 1.1.11

ZarPrime

Druwish,

Welcome to Cripzone.

You say you have the original Black Rain theme but this is somewhat problematic as there have been several versions of that theme.  Can you give us a link from where you downloaded the theme from so that we know for sure which version you are using.  Also, when Crip logs in here, he might need to see your site so could you provide a link to your site.  Finally, when you talk about an arcade button, are you talking about the top menu?  The reason I ask is that I had thought that all versions of Black Rain used a tab rather than a button but I could be wrong.  Crip will know the answer to that better than I will.

ZarPrime

Druwish

#2
I call top menu tabs "buttons".  Its a bad habit of mine that sometimes confuses people when I say it.

Here's the link to the theme I have loaded on my message board: 

http://custom.simplemachines.org/themes/index.php?lemma=118

Here's the link to my site: 

*Removed*

Crip

Quote from: Druwish on Jul 01, 10, 02:26:42 PM
I call top menu tabs "buttons".  Its a bad habit of mine that sometimes confuses people when I say it.
Here's the link to the theme I have loaded on my message board: 
http://custom.simplemachines.org/themes/index.php?lemma=118
Here's the link to my site: 
http://evilbastages.net/forum/index.php


Hi ,
this small bit of code should work , if not , we can try another way:
Index.template.php Add Like:

// 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', 'arcade', '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';
   }

The above is just for the "$current_action"



The below is how your Arcade button_tab _ link is added >>>>


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

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

// Show the [arcade] button.
    echo '<li', $current_action == 'arcade' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=arcade"><span>Arcade</span>< / a ></li>';


I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

Druwish

I'll give it a shot.  It's been quit a while since I've worked with code.  I'll take it nice and slow. :)

ZarPrime

Druwish,

Quote from: Druwish on Jul 01, 10, 02:26:42 PM
I call top menu tabs "buttons".  Its a bad habit of mine that sometimes confuses people when I say it.

It's an honest mistake.  Most older themes did indeed use buttons but, these days, most themes use tabs.  Let us know if you need any additional help.

ZarPrime

Druwish

THANK YOU!!!  I had to close 2 spaces that were in the code, but other than that it worked like a charm!  You da man!  Thanks again, it's very much appreciated! O0 :)