Wrapp each meta album in his own div ( Layout of meta albums) Wrapp each meta album in his own div ( Layout of meta albums)
 

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

Wrapp each meta album in his own div ( Layout of meta albums)

Started by allvip, February 28, 2014, 12:16:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allvip

1.I want to wrapp each meta album on the index page and the categories pages in this own div(random to be wrapped in div classs=random,lastup in div class=lastup etc)

2.I want to wrapp each meta album from thumbnails.php in his own div: thumbnails.php?album=toprated in div class=topRated,thumbnails.php?album=lastup in div class=topRated

Αndré

Do you want to use the same classes for the same meta albums on index.php and thumbnails.php?

allvip

No.

I made a mistake:class=lastup,class=random etc on index and cats and class=MetaLastUp,class=MetaTopN for the actual meta album from thumbnils.php.

Αndré

Copy the function theme_display_thumbnails from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist.

Find
CPGPluginAPI::action('theme_thumbnails_wrapper_start', null);
and below, add
    if (!is_numeric($aid)) {
        global $CPG_PHP_SELF;
        echo '<div class="'.($CPG_PHP_SELF == 'thumbnails.php' ? 'meta'.$aid : $aid).'">';
    }


find
CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);
and above, add
    if (!is_numeric($aid)) {
        echo '</div>';
    }

allvip


allvip

Can I also wrapp the all the meta albumbs from index and cats (not the actual meta albums from thumbnails.php) in a div?

<div class="metaWrapp"><div class="lastup"</div><div class="random"</div><div class="lasthits"</div><div>

Αndré

<div class="metaWrapp">
  <div class="lastup"></div>
  <div class="random"></div>
  <div class="lasthits"></div>
</div>

would require some extra code in index.php. It's also possible to use something like
random/breadcrumb/lastup/catlist/lasthits/alblist
for the content of the main page, which will result in multiple "metaWrapp" div blocks.

If something like
<div class="metaWrapp">
  <div class="lastup"></div>
</div>
<div class="metaWrapp">
  <div class="random"></div>
</div>
<div class="metaWrapp">
  <div class="lasthits"></div>
</div>

would also work for you, you simply can add it to the existing mod in theme_display_thumbnails.

allvip

Quote from: Αndré on March 05, 2014, 01:58:13 PM


If something like
<div class="metaWrapp">
  <div class="lastup"></div>
</div>
<div class="metaWrapp">
  <div class="random"></div>
</div>
<div class="metaWrapp">
  <div class="lasthits"></div>
</div>

would also work for you, you simply can add it to the existing mod in theme_display_thumbnails.

I already did that:

http://forum.coppermine-gallery.net/index.php/topic,77013.0.html

random/breadcrumb/lastup/catlist/lasthits/alblist
for the content of the main page, which will result in multiple "metaWrapp" div blocks.

No,I want just on metaWrapp for all and the default content order.

I will try to edit index.php.

Αndré

In theme_display_thumbnails, find
CPGPluginAPI::action('theme_thumbnails_wrapper_start', null);
and below, add
    if ($aid == 'lastup') {
        echo '<div class="metaWrapp">';
    }

(this code needs to be inserted before the above added code block)

find
CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);
and above, add
    if ($aid == 'lastalb') {
        echo '</div>';
    }

(this code needs to be inserted after the above added code block).

You probably need to adjust the code so it matches your first and last meta album.