Hello everybody!
With the arrival of 4.5.1 I'm about to take a leap in my template-design. To start with I'm learning from the Solarflare template right now. Some aspects have been explained in the forums, which gave me great understanding of how to make module-positions disappear. There are some bits of code I don't really understand yet. Perhaps any of you could explain the function to me?
It's two things:
In the template sometimes it says:
Code:
<?php mosLoadModules ( 'user3', -1); ?>
I Understand the Load aspect, but what does -1 stand for? Does it also have something to do with show/hide?
The other thing is in the top of the Solarflare template:
Code:
<?php
if ( $my->id ) {
initEditor();
}
$collspan_offset = ( mosCountModules( 'right' ) + mosCountModules( 'user2' ) ) ? 2 : 1;
//script to determine which div setup for layout to use based on module configuration
$user1 = 0;
$user2 = 0;
$sandbox_area = 0;
// banner combos
//user1 combos
if ( mosCountModules( 'user1' ) + mosCountModules( 'user2' ) == 2) {
$user1 = 2;
$user2 = 2;
} elseif ( mosCountModules( 'user1' ) == 1 ) {
$user1 = 1;
} elseif ( mosCountModules( 'user2' ) == 1 ) {
$user2 = 1;
}
//right based combos
if ( mosCountModules( 'right' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
$sandbox_area = 2;
} else {
$sandbox_area = 1;
$user1 = $user1 == 1 ? 3 : 4;
$user2 = $user2 == 1 ? 3 : 4;
}
?> I'm assuming it has to do with how the layout would look like if only one, or both modules are shown in the sandbox?
Could somebody with more coding knowledge than poor little me break this down a bit for me?
Would appreciate any help on this.
greetzzzz, Frank
www.free-frank.net