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: Wrapp each meta album in his own div ( Layout of meta albums)  (Read 5444 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Wrapp each meta album in his own div ( Layout of meta albums)
« on: February 28, 2014, 12:16:02 am »

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
« Last Edit: February 28, 2014, 01:47:41 pm by allvip »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Wrapp each meta album in his own div
« Reply #1 on: February 28, 2014, 12:44:58 pm »

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

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Wrapp each meta album in his own div
« Reply #2 on: February 28, 2014, 12:48:39 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Wrapp each meta album in his own div
« Reply #3 on: February 28, 2014, 01:39:56 pm »

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

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

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

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Wrapp each meta album in his own div
« Reply #4 on: February 28, 2014, 01:43:58 pm »

Thanks a loooooooooooooot.
It worked.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Wrapp each meta album in his own div ( Layout of meta albums)
« Reply #5 on: March 01, 2014, 08:36:15 am »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Wrapp each meta album in his own div ( Layout of meta albums)
« Reply #6 on: March 05, 2014, 01:58:13 pm »

Code: [Select]
<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
Code: [Select]
random/breadcrumb/lastup/catlist/lasthits/alblistfor the content of the main page, which will result in multiple "metaWrapp" div blocks.

If something like
Code: [Select]
<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.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Re: Wrapp each meta album in his own div ( Layout of meta albums)
« Reply #7 on: March 05, 2014, 09:58:38 pm »



If something like
Code: [Select]
<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

Code: [Select]
random/breadcrumb/lastup/catlist/lasthits/alblistfor 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.
« Last Edit: March 05, 2014, 10:12:18 pm by allvip »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Wrapp each meta album in his own div ( Layout of meta albums)
« Reply #8 on: March 14, 2014, 11:48:55 am »

In theme_display_thumbnails, find
Code: [Select]
CPGPluginAPI::action('theme_thumbnails_wrapper_start', null);and below, add
Code: [Select]
    if ($aid == 'lastup') {
        echo '<div class="metaWrapp">';
    }
(this code needs to be inserted before the above added code block)

find
Code: [Select]
CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);and above, add
Code: [Select]
    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.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Wrapp each meta album in his own div ( Layout of meta albums)
« Reply #9 on: March 19, 2014, 04:40:45 pm »

thanks a lot.it worked.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.