forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: stan85in on November 26, 2010, 07:56:05 am

Title: How do i Move the Sys Menu items onto the same line as Sub Menu Items
Post by: stan85in on November 26, 2010, 07:56:05 am
I am using Rainy_day Theme version 1.5 and i need to move the sys menu items (Home, Register, Login) onto the same row line as Sub Menu (Albums, Last Uploads, Last Comments, Search). Also, i would like to add some more buttons onto the sub menu line (Besides the Search buttons). I read the coppermine documentation but no answer so far. The Minicms plugin available works for version 1.4 only and not for version 1.5. Any help would be appreciated.

My Theme.php looks this:

<?php

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                           //
// ------------------------------------------------------------------------- //

define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_PROGRESS_GRAPHICS', 1);

// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
  <td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
          <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;

?>
Title: Re: How do i Move the Sys Menu items onto the same line as Sub Menu Items
Post by: Αndré on November 26, 2010, 09:25:53 am
You have to edit the template.html file. Search for {SYS_MENU} and {SUB_MENU}.
Title: Re: How do i Move the Sys Menu items onto the same line as Sub Menu Items
Post by: stan85in on November 27, 2010, 12:17:20 am
I placed {SYS MENU} and {SUB MENU} beside each other in template.html but they are both appearing on a different line. Is there a way to put them in the same line besides each other?

Also, is there a way i can modify the sys_menu items (Home, Register, Login) and the sub_menu items (Albums, Last uploads, Last viewed, Search), there seem to be no way to change it for this rainy_day theme. What file should i need to edit. Any help is appreciated.
Title: Re: How do i Move the Sys Menu items onto the same line as Sub Menu Items
Post by: Jeff Bailey on November 27, 2010, 02:29:47 am
Please post a link and attach your theme to your next post as a zip.
Title: Re: How do i Move the Sys Menu items onto the same line as Sub Menu Items
Post by: stan85in on November 29, 2010, 03:39:51 am
I finally found a way to edit the themes settings for rainy day theme for the {Sys_menu} and {Sub_Menu}. As you will notice that when you open http://yourwebsite/themes/rainy_day/theme.php, it consist only of several few lines as below:

define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_PROGRESS_GRAPHICS', 1);

// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
  <td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
          <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This theme.php doesn't have the rest of the information to modify for {Sys_menu} and {sub_menu}, so instead the solution is to go to http://yourwebsite/include/themes.inc.php and you will see all the codes contained. Look for{sys_menu} and {sub_menu} settings and change accordingly. But remember to make a backup of your Themes.inc.php first before modifying the file.
Title: Re: How do i Move the Sys Menu items onto the same line as Sub Menu Items
Post by: Αndré on November 29, 2010, 01:51:55 pm
instead the solution is to go to http://yourwebsite/include/themes.inc.php and you will see all the codes contained. Look for{sys_menu} and {sub_menu} settings and change accordingly.
Quote from: http://documentation.coppermine-gallery.net/en/theme.htm#theme_engine
you mustn't edit includes/themes.inc.php, under no circumstances, as all your changes will be lost when upgrading in the future. Everything that possibly could be accomplished by editing include/themes.inc.php can be accomplished by editing themes/yourtheme/theme.php as well - stuff defined in your custom theme will take precedence over the core theme functions.