Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: {SYS_MENU} works.. but not in all places...  (Read 9821 times)

0 Members and 1 Guest are viewing this topic.

n1^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
{SYS_MENU} works.. but not in all places...
« on: January 08, 2006, 02:22:02 am »

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

Code: [Select]
$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
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: {SYS_MENU} works.. but not in all places...
« Reply #1 on: January 08, 2006, 04:27:41 am »

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!
Logged
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^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #2 on: January 08, 2006, 08:38:27 am »

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?
« Last Edit: January 08, 2006, 10:59:27 am by n1^ »
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: {SYS_MENU} works.. but not in all places...
« Reply #3 on: January 08, 2006, 06:55:15 pm »

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.







Logged
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^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #4 on: January 08, 2006, 07:48:13 pm »

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 :)
« Last Edit: January 08, 2006, 07:56:11 pm by n1^ »
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: {SYS_MENU} works.. but not in all places...
« Reply #5 on: January 08, 2006, 07:52:38 pm »

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.
Logged
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^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #6 on: January 08, 2006, 07:57:09 pm »

Awesome!

Thanks so much :)
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: {SYS_MENU} works.. but not in all places...
« Reply #7 on: January 08, 2006, 09:29:58 pm »

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.
« Last Edit: January 08, 2006, 10:08:32 pm by Blueiris »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: {SYS_MENU} works.. but not in all places...
« Reply #8 on: January 09, 2006, 08:40:31 am »

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.
Logged

n1^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #9 on: January 09, 2006, 04:06:31 pm »

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?
Logged

n1^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #10 on: January 09, 2006, 05:02:15 pm »

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 :)
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: {SYS_MENU} works.. but not in all places...
« Reply #11 on: January 09, 2006, 06:46:41 pm »

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.

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!
Logged
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^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #12 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   ::)
Logged

Blueiris

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 170
  • Horse poor!
    • Saddlebred World Gallery
Re: {SYS_MENU} works.. but not in all places...
« Reply #13 on: January 10, 2006, 08:26:54 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!
Logged
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^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #14 on: January 10, 2006, 08:35:30 am »

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

Thanks again!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: {SYS_MENU} works.. but not in all places...
« Reply #15 on: January 10, 2006, 08:42:17 am »

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

n1^

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: {SYS_MENU} works.. but not in all places...
« Reply #16 on: January 10, 2006, 08:48:43 am »

i was trying to figure out the code to be pasted in the theme.php to override the themes.inc.php
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.