Jump to content


NewsListingTumbs


  • You cannot reply to this topic
7 replies to this topic

#1 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 09 June 2006 - 01:20 PM

Hi,

Since i can't post it in the library, here goes: I've attached the file.
Based on ralphs newslisting-snippet. Basicaly it separates found images inside the content, and returns a random image found as a tumbnail, aside the stripped content.

IMPORTANT:
- It doesn't generate tumbnails, it just rescales a random image
- Yes, it does use tables, for some an issue... css simply fails on some browsers (images over tekst etc...)

in the config. above in the snippet, you can specify the tumbnail-size, image format (jpg, gif... but best to leave this on jpg) and scale-direction (depending on usage one might need an equal vertical or horizontal allignement).

I made the layout as flat as possible, i strongly advise to replace <hr>'s by bg's and make it look a bit nicer(hardcoded or via your stylesheet). Nest this complete table inside the middle cell of a 3 col/row table and give it fancy borders....

Previeuw url My Webpage
(hit the refresh and you 'll see the random-part)
Below each blog, there is a row with info regarding the image used, total images found... you can turn this off (as done in the example) in the config of the snippet once you are satisfied, but at least while testing it you can see if sth. is actual going on or not B)

Thanx to mikef for helping me out with regular expression stuff.

Hope you like it
Koen

Attached Files


Edited by koeniman, 11 June 2006 - 09:03 AM.


#2 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 11 June 2006 - 09:06 AM

I've updated the snippet.

I noticed the defined patern-search was case sensitve. So if your $patern = jpg, JPG wasn't valid. Changed this in the query (i = PCRE_CASELESS) so now you no longer need to worry about this.

#3 MbyteZ

    Etomite Forum Newbie

  • Member
  • 4 posts

Posted 31 March 2008 - 11:35 AM

Nice :)

#4 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 398 posts
  • Gender:Male

Posted 01 April 2008 - 10:29 PM

I couldn't work out why I would want a random image at first, but I can think of some good uses now. Cool site btw, really like it. May I say in my humble opinion that it shouldn't work, but it does and is quite unique.

Cool content too! Love Carlos TV

Look forward to trying your snippet.

Paul.

#5 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 02 April 2008 - 10:25 PM

View PostPaulD, on Apr 1 2008, 11:29 PM, said:

I couldn't work out why I would want a random image at first, but I can think of some good uses now. Cool site btw, really like it. May I say in my humble opinion that it shouldn't work, but it does and is quite unique.

Cool content too! Love Carlos TV

Look forward to trying your snippet.

Paul.
Thanx a million for the compliments. Hope you like the snippet to. It's been a while i did this snippet (with help from others to off corse). Why random... was the most simple solution and it would change (looks like it changed) the content of the site. Unf. the carlos site will not last much longer. Our guitar player moved to Africa & bassplayer to France... ok, you can do a lot over the internet, maybe even play some tunes, but we will never be able to pass it around ;-)))))

greets
koen

#6 sayad111

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 04 April 2008 - 12:50 AM

thanks for the update :)




----------
Sexy Lingerie
Hoodia


#7 espersen

    Etomite Forum Fan

  • Member
  • Pip
  • 144 posts

Posted 17 August 2009 - 08:50 AM

seems like it shows unpublished and deleted documents ...

Anyone who has fixed this ?

EDIT:

easy - just replace "getALLChildren" with "getactiveChildren" in the following line:
$resource = $etomite->getactiveChildren($resourceparent

Edited by espersen, 17 August 2009 - 09:02 AM.


#8 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 19 August 2009 - 08:23 PM

indeed, glad you helped yourself out :)

View Postespersen, on 17 August 2009 - 08:50 AM, said:

seems like it shows unpublished and deleted documents ...

Anyone who has fixed this ?

EDIT:

easy - just replace "getALLChildren" with "getactiveChildren" in the following line:
$resource = $etomite->getactiveChildren($resourceparent






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users