[Solved]: changing left side menu for one horizontal on he top of the albums [Solved]: changing left side menu for one horizontal on he top of the albums
 

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]

Main Menu

[Solved]: changing left side menu for one horizontal on he top of the albums

Started by GH, September 26, 2008, 04:16:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GH

Hello, for some reasons I changed fom the cos-template to the color-style, but the color-style is not so white und has borders and even in white it is not so neutral and fine as the cos.

I ask myself if it wold not be better to go back to "cos", but I'd like to have the menu part on the top and horizontal and this also for the language and theme-windows, and the site description and the logo, to free the left side .

All this to have more place for albums.


Is that possible to do?  A big change or can it be done with some lines of codes to change??  (I tried but for me it is not possible in the way of trial and error without a good knowledge.
Thank you for any idea.

Gizmo

Here are the changes you need to make. I will only give you the hints and you have to make it work. Deal???

Compare this code to what you have in your themplate.html. Make your changes to look like this.

      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="5" id="CENTER">
          <tr>
            <td colspan="2" align="right">{SYS_MENU}</td>
          </tr>
          <tr>
            <td colspan="2">
<div align="center">{LANGUAGE_SELECT_LIST}{THEME_SELECT_LIST}</div>
<div align="center">{SUB_MENU}</div>
<div align="center">{ADMIN_MENU}</div>
</td>
          </tr>
          <tr>
            <td align="center">{GALLERY}</td>
          </tr>
        </table>


Now you need to change some items in your theme.php. Compare this code to what's in your theme.php for these sections.

// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

  <ul class="admin">
<!-- BEGIN admin_approval -->
<li class="syslvl"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></li>
<!-- END admin_approval -->
    <li class="syslvl"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></li>
    <li class="syslvl"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></li>
    <li class="syslvl"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></li>
    <li class="syslvl"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></li>
    <li class="syslvl"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></li>
    <li class="syslvl"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></li>
    <li class="syslvl"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></li>
<!-- BEGIN log_ecards -->
    <li class="syslvl"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></li>
<!-- END log_ecards -->
    <li class="syslvl"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></li>
    <li class="syslvl"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></li>
    <li class="syslvl"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></li>
    <li class="syslvl"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></li>
<!-- BEGIN documentation -->
    <li class="syslvl"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></li>
<!-- END documentation -->
  </ul>
EOT;

// HTML template for user admin menu
$template_user_admin_menu = <<<EOT

<ul>
  <li class="syslvl"><a href="albmgr.php" title="{ALBMGR_TITLE}" class="navmenu">{ALBMGR_LNK}</a></li>
  <li class="syslvl"><a href="modifyalb.php" title="{MODIFYALB_TITLE}" class="navmenu">{MODIFYALB_LNK}</a></li>
  <li class="syslvl"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}" class="navmenu">{MY_PROF_LNK}</a></li>
  <li class="syslvl"><a href="picmgr.php" title="{PICTURES_TITLE}" class="navmenu">{PICTURES_LNK}</a></li>
</ul>

EOT;

Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

GH

Thanks for this too, let me ask one thing: how did you learn all these things  ??..... I'm no be able to learn html and no doubt that I can't learn php, because I bought a book to learn it ...... no chance, I gave it to my son, but this is not his business, even when he is in the software industrie. (40 years ago I learned "assembler" and "cobol" but this was not my strength, so I went to the sales forces dep.)

Gizmo

I wasn't much into html and php until I found Coppermine a few years ago. I'm a novice photographer and was taking pictures at my sons youth lacrosse and hockey games and people asked if I could take some pics of their kids and that they would buy them. So I needed a why to show my photographs and Coppermine seemed like a good solution and even had a photoshop plugin so I could take orders online (my first year I made enough to pay for my hosting plan and my camera equipment!). I needed to make some changes to the theme and core to suit my needs so I started dissecting the code to see what it did. Make a change, view the results, repeat. Before long I was creating themes and modifying the core files to do all sorts of things. Then I started with WordPress and learned it's very similar. Basically I taught myself. I bought a book or two for references but actually tearing a piece of code apart is the best way. You have to put it into practice or you won't learn anything. To be honest, I'm 50 and want to learn more and I'm thinking of taking some design courses this winter. Don't get me wrong, I still have to ask for help on complicated software changes but I really like figuring things out on my own. It also doesn't hurt that I only sleep 3-4 hours a night so I have plenty of time to play! ;) Come on... join the party!
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

phill104

I'm in the same boat as Gizmo but a little behind him in terms of skill. Although I work in IT it is more on the server hardware/software side of things. I also do quite a bit of photography for both work and play and coppermine was the perfect product to show off my pictures. Since then I have learnt the basics of php/mysql and quite a bit of html and built quite a few successful web sites (though most are windsurfing related, my other passion). I struggle with the asthetics as my art/design skills are sadly lacking so I too am thinking of doing a design course.

The code really isn't as hard as it first looks. My first project was an interactive google map. Users can add details of webcams, windsurfing locations, shops and weather stations etc and these details are added to a database for display on the map. Quite simple and looking back at my forms it is a bit of a mess code wise. But a simple database like this is a great way to learn the basics. You have user input and store and retrieve information from the database. Once you can do that the world is your oyster.

So give the theme a go and when you get stuck ask for help and if you are at least trying you will get all the help you need.
It is a mistake to think you can solve any major problems just with potatoes.

GH

thanks to you all, I made a step, but now I loose confidence (and to learn really php is not only the language, but too all the conventions on coppermine  :o   )

In fact, I have the design cos without left menu, and whit a new definition of the rest of the page, but the submenu is displaying on the top, but vertically and each item too large.

A  little problem I thougt:  but when i tried to take from the sample theme the file theme.php and to take over all what are chapters dealing with sys and sub menus,
there come the error:

Template error
Failed to find block 'login'(#(<!-- BEGIN login -->)(.*?)(<!-- END login -->)#s) in :

          {BUTTONS}

I did not find these buttons.

Also I tried to find a way to display horizontally what was vertically looking into the theme "color-style" 
But it uses  a nav bar ??  Not here in the theme cos present, and too much difficult for me to mix it .


I join my template.php file so far modified and also the theme.php.

I come not over with these, if you could help me ??


GH

it's solved, I did some modifications "syslvl" a second time and it works.

phill104

Can you zip a copy of your theme and a pic so we can all see how you did it.
It is a mistake to think you can solve any major problems just with potatoes.

GH