[Solved]: Can someone help me with this layout dilemma? [Solved]: Can someone help me with this layout dilemma?
 

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

[Solved]: Can someone help me with this layout dilemma?

Started by armstead, July 01, 2008, 06:19:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

armstead

I have a problem that should be simple, but it's driving me up a tree.

I would like to highlight the image, with a minimal header, so that the viewer can see as much of the image without having to scroll down, or get jumped around whenever he changes the page. I also want to require the minimum of clicks-- i.e. being able to go directly into an album from the front page.

I have found a few themes with a small header that do that, such as Oxygen. However, by some quirk, none of the themes with a small header seem to list the album thumbnails on the index page. Instead it is a category name, but you have to go into the cat to see the albums.

So my question is this. Can I somehow have my cake and eat it too? Is there a straightforward way to make a theme like Oxygen show the album thumbnails on the front?

Or, working the otehr way, is there a way to remove or reduce the header on a theme without bunging up the layout.

I have tried a variety of things, such as working with the sample template, or other coding changes. But so far all I've succeeded in doing is breaking the themes.

Does anyone have some suggestions on how to make a simple fic to eitehr reduce a header, OR force a theme to show album thumbs on the index page?

Any answers would be much appreciated.


Nibbler

If a theme does not display album thumbs then it's the theme that's overriding the default behaviour. You should be able to find the code that does that in its theme.php.

armstead

Thanks for the quick reply.

I've looked for that in the template's codes, but I can't find the command that forces a album thumbnail.

On Oxygen, for example, from my (admittedly newbie) observations, there is a couple of places on the template that seems to want to show the thumbnail, but it doesn't. I went over a comparison with the Classic theme (which it resembles) but I could not find any parallels.


Joachim Müller


Nibbler

This is explained in the thread Joachim posted. Just remove the $template_cat_list template and it'll drop back to the default.

armstead

Sorry to be a dunderhead, but I tried deleting that as you suggested in that thread and this is what I get:

Parse error: parse error, unexpected $ in /home/content/P/t/n/Ptnson/html/coppermine/themes/oxygen/theme.php on line 171

I tried deleting those lines by commenting out and by actiully deleting them, and I got the same in both.

Here's what I did in the code:

<!-- }


$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b><!-- {CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>

<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

<!-- EOT;

--------------------

You had also mentioned the possibility of adding an instruction. Might that work better?


armstead

PS: That loose line at the beginning of my code snippet was on the same line as the comment out in the code.

Joachim Müller

The first <!-- in your above posted code doesn't reside in the original, that's why you get a parse error. Use this code:<?php

define
('THEME_IS_XHTML10_TRANSITIONAL',1);


$template_sys_menu_spacer ="&nbsp; ";


// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT

<!-- BEGIN breadcrumb -->

        <tr>

                <td colspan="3" align="left"><span class="breadcrumb"><b>{BREADCRUMB}</b></span></td>

        </tr>

<!-- END breadcrumb -->

<!-- BEGIN breadcrumb_user_gal -->

        <tr>

                <td colspan="3">

                <table width="100%" cellpadding="0" cellspacing="0" border="0">

                <tr>

                        <td align="left"><span class="breadcrumb"><b>{BREADCRUMB}</b></span></td>

                        <td align="right"><span class="statlink"><b>{STATISTICS}</b></span></td>

                </tr>

                </table>

                </td>

        </tr>

<!-- END breadcrumb_user_gal -->



EOT;

function 
starttable_neta($width '-1'$title ''$title_colspan '1')

{

    global 
$CONFIG;



    if (
$width == '-1'$width $CONFIG['picture_table_width'];

    if (
$width == '100%'$width $CONFIG['main_table_width'];

    echo <<<EOT



<!-- Start standard table -->

<table align="center" width="
$width" cellspacing="0" cellpadding="0">



EOT;

    if (
$title) {

        echo <<<EOT

        <tr>

                <td class="tableh1" colspan="
$title_colspan">$title</td>

        </tr>



EOT;

    }}

function 
theme_display_breadcrumb($breadcrumb, &$cat_data)

{

    
/**

     * ** added breadcrumb as a seperate element

     */

    
global $template_breadcrumb$lang_breadcrumb;



    
starttable_neta('100%');

    if (
$breadcrumb) {

        
$template template_extract_block($template_breadcrumb'breadcrumb');

        
$params = array('{BREADCRUMB}' => $breadcrumb

            
);

        echo 
template_eval($template$params);

    }

        
endtable();

}



?>



armstead

That did it. Worked like a charm (though I'm not sure I understand why).

Many thanks.

One other quick question....If I do the same code into otehr themes, will it have the same effect, or does it have to be tailored to the specific theme?