Hi,

I got the Random images block installed from this great module.
I would very much like to have the images shown horizontal instead of vertical.
Is this possible please?
See www.aguilas.me for current usage.

Thanks in advance for your reply!
greetings,
Martijn

CommentFileSizeAuthor
#5 addCss2.patch1.78 KBFogg
#4 addCss.patch1.19 KBFogg

Comments

summit’s picture

Hi,

I succeeded and got rid of the disc with using the following in my theme:

.item-list ul li {
  float: left;
  list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:0 0 0.25em 1.5em;
padding:0;
}

Could I make this .item-list ul li only work for this block-photos please? I do not know how to get this done.
Thanks for your reply!
See www.aguilas.me for the result.

greetings,
Martijn

MiraKimura’s picture

i need an answer for this too...

Fogg’s picture

Hi folks,

I wanted the same thing... here is my way for it :)

Go to photos.module and search 'function _photos_block_image'. In here I changed

  if($image[0]['fid']){
    $content = theme('photos_block', $image, 'image');
                if($url && count($image) >= $limit){
                        $content .=theme('more_link', url($url), t('View more'));
                }

to

  if($image[0]['fid']){
    $content = "<div class=\"photos_block\">";
    $content .= theme('photos_block', $image, 'image');
                if($url && count($image) >= $limit){
                        $content .=theme('more_link', url($url), t('View more'));
                }
    $content .= "</div>";

Repeat the same thing at 'function _photos_block_album' for this part:

  if($i){
    $content = theme('photos_block', $album, 'album');
                if($url && $i >= $limit){
                        $content .=theme('more_link', url($url), t('View more'));
                }

This way I add a new CSS class that I can use in the photos.css. This is the new part there:

.Post .photos_block li{
  background-image: none;
  float: left;
}

Don't know if this is the best way to do it, but it works. It also removed the bullet images in front of the images.

Hope that helps - and if it is totally screwing things up, let me know how to do it better.##

Cheers

Fogg

Fogg’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

Learned that I should post patches rather than code. Here we go :)

Fogg’s picture

StatusFileSize
new1.78 KB

Update, combined the code-update with the CSS update.

eastcn’s picture

Use css to achieve, rather than modify the code:

copy to themes/mytheme/style.css

#block-photos-3 .item-list ul li{
float: left;
/* more */
}

Fogg’s picture

I could not figure out with CSS would only modify the photo-block, that is why I added this to the code.
I will check again with your suggestion. If it works - great ;)

causalloop’s picture

this may seem like a stupid question, but how do you use the patch?

madhusudan’s picture

@Fogg

I applied the patch but don't know why its no working.. but somehow fixed by adding a new class under "ul" tag

here how i did.
edit photos.module file

search for "function theme_photos_block($images = array(), $type){"
then at the end of this function you will find
return theme('item_list', $item);
replace this with
return theme('item_list', $item,$title = NULL, $type = 'ul', $attributes =array('class'=>'grid-image'));

edit photos.css file which is inside css folder

and add this


.grid-image li{
background-image: none;
float: left;
}

@causalloop

typical patching in linux
patch -p0 < filemanager-private.patch

check here for more info..

http://drupal.org/patch

madhusudan’s picture

repost truncated.....

nathaniel’s picture

Status: Needs review » Closed (fixed)