forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip 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
-
Do you want to use the same classes for the same meta albums on index.php and thumbnails.php?
-
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.
-
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>';
}
-
Thanks a loooooooooooooot.
It worked.
-
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>
-
<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.
-
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 (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.
-
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.
-
thanks a lot.it worked.