{SYS_MENU} works.. but not in all places... {SYS_MENU} works.. but not in all places...
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

{SYS_MENU} works.. but not in all places...

Started by n1^, January 08, 2006, 02:22:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

n1^

Hey all,

I'm making a theme and having some problems ;)

Here is the URL http://yourmods.com/index.php (use firefox, IE just doesn't work, yet :) )

Well i need to get the {SYS_MENU} to work on the menu to the top right where you see {SYS_MENU}.

theme.php


$template_sys_menu = <<<EOT

<!-- BEGIN custom_link -->

<!-- BEGIN my_gallery -->
                                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}"><span>{MY_GAL_LNK}</span></a>
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
<a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}"><span>{MEMBERLIST_LNK}</span></a>
.
.
.
.
.
<!-- END login -->
<!-- BEGIN logout -->

                                                <a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}"><span>{LOGOUT_LNK}</span></a>
<!-- END logout -->
<!-- END custom_link -->
EOT;



One thing i have noticed.. is there a format on the placing? like the order..


thx

Blueiris

I could be wrong,  ;) but I don't think you're gonna do what you want to do by the way you're trying to do it.

Rather than get right into a lot of explanation, why don't you download the Giallo* theme, and take a look at how the SYS_MENU is handled in that one? Granted, that menu's on the left, but the principle is the same, and you already know how to get it on the right side.

That said, I like your design so far. Going to be a nice theme when it's finished!
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

n1^

#2
Thanks for the that theme i looked at it but, it didnt help :(

i must be missing some thing.

for the side menu HTML code is

    <div id="sideBar">
   
      <h1><span>Submenu</span></h1>
    
      <div class="sideMenu">
      
       {SYS_MENU}
      {SUB_MENU}
       <a href="http://got lan.net" title="visit got Lan"><span>got Lan?</span></a>
        <a href="http://csszengarden.com" title="visit CSS Zen Garden"><span>CSS Zen Garden</span></a>
        <a href="http://deviantart.com" title="visit DeviantART"><span>DeviantART</span></a>     
      
      </div>

       <h1><span>Comments</span></h1>
.
.
.
</div>

i was trying to play around with where the code on the temlate.html and its still a no go.

any ideas whats up?

Blueiris

I don't think your problem is in template.html, but in theme.php - unless you've altered any of the files outside of the folder for this theme. Compare the Giallo* theme.php with yours. If you still have the code you posted above in theme.php, clean it out, and model your theme.php for the SYS_MENU part on the Giallo* file. You'll note that file is quite simple - and it works. And, it does exactly what you want, except on the opposite side.

In template.html for your theme, try nesting the divs from the Giallo* template.html inside your div for the Side Menu, like this:

Quote<div class="sideMenu">

<div class="sideMenu">{SYS_MENU}</div>
<div class="sideMenu">{SUB_MENU}</div>
(put your other menu links here)
</div>

If you just can't get it, you may zip the folder for this theme and attach it to a post. I have a test-bed install of Coppermine on my system, and I can put the theme up and find out just where things are going wrong.

You are also going to need to validate your code. Right now it comes in with a lot of errors.







You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

n1^

#4
Thank you for the offer :)

Yea i gutted out the theme.php and still a no go.

As for the errors when i made it there was none, i still have to take out the tables and such from coppermine.

For helping ill for sure have a link to your page :)

Blueiris

OK, I've downloaded the zip. If you'd prefer not to have others download it, you can edit your post and take the attachment off.

Will play with this a little later today, and get back to you sometime tonight.
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

n1^


Blueiris

#7
Ah! Here we go! The problem is is the template.html. Apparently you can't put  {SYS_MENU} and {SUB_MENU} below {GALLERY} in your coding. I was able to duplicate the problem in the Giallo theme by changing the code in template.html from

Quote<tr>
    <td bgcolor="#F0F0F0" valign="top" nowrap="nowrap"><div class="topmenu">{SYS_MENU}</div><div class="topmenu">{SUB_MENU}</div></td>
    <td width="10" height="100%" style="background-image:url(themes/giallo/images/button_bar_shadow4.gif)"></td>
    <td valign="top" bgcolor="#FFFFFF" height="100%" width="100%">
     {GALLERY}</td>
  </tr>

to

Quote<tr>
    <td width="10" height="100%" style="background-image:url(themes/giallo/images/button_bar_shadow4.gif)"></td>
    <td valign="top" bgcolor="#FFFFFF" height="100%" width="100%">
     {GALLERY}</td>
   <td bgcolor="#F0F0F0" valign="top" nowrap="nowrap"><div class="topmenu">{SYS_MENU}</div><div class="topmenu">{SUB_MENU}</div></td>
  </tr>

The changed code in that template.html causes {SYS_MENU} & {SUB_MENU} to show up on the right hand side just as it does in your theme.

No point in going into the reasons for this, because we aren't going to modify the scripts. What's needed is a workaround so that the script "reads" those tokens before it "reads" {GALLERY}, but still puts the menus in the right place. I have a couple of ideas on this, but I'm out of time right now, and won't get back to it until tonight. You seem to have some skill with layout, so see what you can come up with, and we'll get back together on this later this evening.

EDIT: Done! Ended up with another half-hour to play on the computer, and got this solved. What I have done is to switch the positions of the sidebar div and the text div, so the sidebar div is above the text div in the code, then align sidebar right and text left. See the attached zip for template.html.
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

Joachim Müller

Quote from: Blueiris on January 08, 2006, 09:29:58 PM
Apparently you can't put  {SYS_MENU} and {SUB_MENU} below {GALLERY} in your coding.
everything below {GALLERY} isn't controled by the header, but by the footer function, that's why.

n1^

Thank you Blueiris i really appreciate your time!

I'll have to figure out the format take alook at the right menu its should be rounded, top is rounds but not the lower section. Take alook at Test ^_^.

        <span>{SYS_MENU}</span>
        <span>{SUB_MENU}</span>

and

        <div class="sideMenu">{SYS_MENU}</div>
        <div class="sideMenu">{SUB_MENU}</div>

Turn out the same way.

Maybe if i edit the theme.php like i had it, it should work (i hope)!

GauGau -

Can you explain in a little more detail please?

n1^

I got that to work yay :) coppermine is bomb!

now off to fix the admin section it wishes to stay horizontal and really messes up everything. Well time to head home from work peace :)

Blueiris

Quote from: GauGau on January 09, 2006, 08:40:31 AM
everything below {GALLERY} isn't controled by the header, but by the footer function, that's why.

Yep, got that as soon as I played with this a bit, asked myself why the [hot place] it wouldn't work, and started reading code. Am I correct in assuming we could also have handled this by altering the pageheader and pagefooter functions in theme.php? I didn't experiment with that, since the div positioning seemed the simplest workaround given the way template.html was formatted.

Quote from: n1^ on January 09, 2006, 04:06:31 PM
Thank you Blueiris i really appreciate your time!

You're welcome! In my years on the Adobe LiveMotion boards I found that when you tackle a problem someone else is having, you often learn something yourself, and this was the case here!
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

n1^

Hey i got a quick question.

for {Gallery}

I'm looking at the themes.inc.php im trying to edit to edit out the tables, but i cant seen to find it well.

Is the start for the coding on line 1207?

I cant format for {Gallery} to over ride the themes.inc.php to be put in the theme.php   ::)

Blueiris

Quote from: n1^ on January 10, 2006, 06:21:41 AM
Hey i got a quick question.

for {Gallery}

I'm looking at the themes.inc.php im trying to edit to edit out the tables, but i cant seen to find it well.

Is the start for the coding on line 1207?

I cant format for {Gallery} to over ride the themes.inc.php to be put in the theme.php   ::)

Board rules say only one question per thread, so start a new thread, and we'll work on this question!
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

n1^

There happens to be a thread open about it, ill go bump that up :D

Thanks again!

Joachim Müller

don't edit themes.inc.php at all unless you really, really know what you're doing.

n1^

i was trying to figure out the code to be pasted in the theme.php to override the themes.inc.php