News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

OutlineOmega (multi for 115,116,117 & TP)

Started by Antechinus, September 09, 2008, 03:00:13 PM

Previous topic - Next topic

Antechinus

All the array stuff that is in your default theme also needs to be in your custom themes for the mods to work properly. The mods edit in new array code as well as new button code.

If you can't see the donations button as an ordinary member then you probably haven't set the permissions in admin. That's a mod support question. Ask the person who wrote the mod if you need to know about admin settings for it.

genieuk

Rite ok have looked but cant see a option to show to users but will look further into that.

What you mean array?

This is what i done for the profile button:

Replaced this code:

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo'
<li>
<a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
<span class="menu-left"></span>
<span class="menu-mid">' , $txt[79] , '</span>
<span class="menu-right"></span>
</a>
<div class="sub">
<ul>
<li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>
<li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
         <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
     </ul>
<div class="btm-bg"></div>
</div>
</li>';


With this code:

// the [usercp] button
                if ($context['current_action'] == 'usercp')
                echo'
                   <li>
                   <a ' , $current_action=='usercp' ? ' class="current"' : '' , 'href="', $scripturl, '?action=usercp">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[usercp] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';


I dont know what i got to add to it and where that array bit got me baffeled.

From what i gave you could you give me  the code to replace the original profile button code?

That if you dont mind of course,

thank you
mathew


Antechinus

Ok, see all this stuff?

// 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('usercp','treasury','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'usercp')
      $current_action = 'profile';
      if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';


The same section in Omega has to contain all of that code. That's what I meant when I said mods edit array code as well as button code. The section between "// Work out where we currently are." and "// Show the start of the tab section." has to be the same as in the default theme.

Copy that section from default and use it to replace the same section in Omega (or any other custom theme).

genieuk

Hi i just did and button still not showing, I copied the code you give and pasted it over the code that was in the custom index.template had no luck so to make sure i got default index.template.php and copied it from there to the custom index.template.php and button not showing.

dont understand why it not showing,

Definately enabled the UserCP via admin as i just checked.

Mat

Antechinus

Weird. Give me a link to that mod and I'll throw it on my local for a look.

genieuk

Thanks for taking the time to help

Link: http://custom.simplemachines.org/mods/index.php?mod=698

the one you want is the first one: UserCPV2.0_Install.zip
This is the current situation:

Theres no Usercp button showing and because i replaced the profile button code there no button at all to access profiles.

Antechinus

Well as a temporary measure you can replace the original Profile button code. That will keep things operational.

I'll grab that mod and test it but I don't have the time to do it immediately, so you'll have to wait until tonight (my time).

genieuk

Ok thanks i will leave everything as it is at the moment until you have a look,

It is 1:05AM in morning here, what time is it where you are as i will stay up?

Antechinus

 :D Go to sleep. It's 11am here. I wont get a chance to look at this for another seven hours or so.

genieuk

Quote from: antechinus on October 06, 2008, 08:07:19 PM
:D Go to sleep. It's 11am here. I wont get a chance to look at this for another seven hours or so.

Oh rite, ok i will go to sleep and do it in moring, i have put it back to default profile button for now.

Thank you,
Mathew

genieuk

#50
Quote from: genieuk on October 06, 2008, 08:12:36 PM
Quote from: antechinus on October 06, 2008, 08:07:19 PM
:D Go to sleep. It's 11am here. I wont get a chance to look at this for another seven hours or so.

Oh rite, ok i will go to sleep and do it in moring, i have put it back to default profile button for now.

Thank you,
Mathew

Hi antechinus,

any update yet? I mean have you had a look to see how i add it to the Home menu button tab list? also sent you a PM on which file and where to change .jpg to .png for my logo as .jpg no good as my logo has transparency to blend in nicely.

Thank you,
Mathew

Antechinus

Yes I know you sent me another  PM after I told you I was watching this thread anyway and questions about the theme belonged in this thread. This was also after I added an extra line to my sig just for your benefit. Congratulations mate, you're the first person to hit my ignore list here.

I don't mind answering your posts here but you are now blocked from sending any PM's.  :P

This is the reason I've been a bit slow in the update. Anyway, when I gave you the codes earlier I said to use the same context setting as was used for the UserCp button in the default theme. You used this:

if ($context['current_action'] == 'usercp')

which is not correct. You should have used:

if ($context['allow_edit_profile'] && $modSettings['usercp_enable'])

This mod also requires several other things I wouldn't have expected. This is why you should ask mod questions in the mod thread. The guys that write the mods know them backwards. The guys that write themes only know their themes (usually). The guys that write mods generally don't do themes. That's how it works. You can't expect a theme author to be familiar with every SMF mod in existence.

I'm just telling you this to save you dramas in future. I've been busy but I'll install the mod on my local now and give you the code for the button in the next hour or so.

Cheers.

genieuk

First of all, sorry.

Ok thanks look forward to the code.

Also what file(s) do i have to edit so i can use my logo.png? as .jpg is no good. i need to change the .jpg in whichever file/files so it looks for logo.png not logo.jpg.

Thanks for all your help and am sorry to annoyed you.

No hard feelings I hope. ;)

Mathew

Antechinus

No dramas. I didn't bother getting annoyed. Got the code sorted and it looks like an interesting mod anyway. I may end up installing it at my place. Will check it out some more. Anyway code is:

// Edit Profile... [profile] if usercp is enabled
if ($context['allow_edit_profile'] && $modSettings['usercp_enable'])
echo'
<li>
<a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=usercp;u=',$ID_MEMBER,'">
<span class="menu-left"></span>
<span class="menu-mid">' , $txt['usercp'] , '</span>
<span class="menu-right"></span>
</a>
     </li>';

//Edit Profile... [profile] if usercp is disabled
                     if ($context['allow_edit_profile'] && !$modSettings['usercp_enable'])
echo'
<li>
<a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
<span class="menu-left"></span>
<span class="menu-mid">' , $txt[79] , '</span>
<span class="menu-right"></span>
</a>
<div class="sub">
<ul>
<li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>
<li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
         <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
     </ul>
<div class="btm-bg"></div>
</div>
</li>';


That's for the buttons. You also need the following section to look like this:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $ID_MEMBER, $modSettings, $settings, $options, $scripturl, $txt;


You've already sorted the array codes (I think) so this should get you sorted.

Jpg's should be fine for all variations except Azure Silk, Mircalla and Skyline as these use transparencies, but if you want to use png's on the other variations just edit the relevant named css file.

For style_Clearlight.css you change the file suffix here:

#logo {
background: url(images/Clearlight/logo.jpg) no-repeat;
}


Same with the others. ;)

genieuk

#54
IT ok found it now. lol

Cheers! cant thank you enough. :)

Antechinus

That one is just called Outline, if you mean the one with the red banner and white background. The style css file for it is style_Outline.css

It's just in with all the other theme files. 

genieuk

#56
Have the logo got to be certain size?

as look at image i attached it nothing showing, it clicable like a link of corse but no image?

Thanks
Mat

cant upload anymore but basically no logo just read now.

Antechinus

The logo can be anything up to 120px high and 825px wide without any code editing being necessary. If you want it bigger than that you'll need to do some edits.

What code did you use? Just copy paste the logo section you edited.

genieuk

hi, just resized logo to much smaller than size you specified to try it and still nothing showing?


Antechinus

Do a hard refresh ( Ctrl+F5 ). If that doesn't fix it post the section of code you edited.

Advertisement: