Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: 1 [2]

Author Topic: [MOD] Automatically resize image 2 (sNews 1.4)  (Read 8274 times)

Lucian

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
    • http://www.editiaspeciala.com
[MOD] Automatically resize image 2 (sNews 1.4)
« Reply #15 on: November 03, 2006, 04:51:42 pm »

ok Fotrane thanks for the update in this :). I will wait for it too , 1.5 stable :D
Logged

fallback

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
[MOD] Automatically resize image 2 (sNews 1.4)
« Reply #16 on: April 21, 2007, 07:17:27 pm »

Quote from: Fotrane
I re-coded it for snews 1.5 -- however, in order for it wto work in the same manner, it also requires some database structure changes, etc.

I am currently waiting for 1.5 Stable before posting thisw just to prevent any unexpected changes.
Could you please post this mod for 1.5? ...please
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
[MOD] Automatically resize image 2 (sNews 1.4)
« Reply #17 on: April 22, 2007, 08:35:35 am »

Hello
If it can help :
I've done it using Javascript and CSS
as you can see on this page

It use only 1 image which is being reduced to fit your layout.

The CSS code add a little caption too
Code: [Select]
img.scaled {
  width: 100%;
}
.pic_left{
width: 25%;
border : 1px solid #508fd2;
padding : 2px;
background-color : #d7dfd7;
margin : 6px 18px 6px 5px;
float : left;
}
.pic_centre {
width: 25%;
border : 1px solid #508fd2;
padding : 2px;
background-color : #d7dfd7;
margin : 12px;
clear: none;
float: left;
}
.pic_right {
width: 25%;
border : 1px solid #508fd2;
padding : 2px;
background-color : #d7dfd7;
margin : 6px 5px 6px 18px;
float : right;
}
.pic_left,
.pic_centre,
.pic_right p {
text-align: left;
font-style: normal;
font-size: smaller;
text-indent: 0;
color: #333333;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
The corresponding HTML code :
Code: [Select]

Cliquer sur l'image pour l'agrandir

And the Javascript code can be found  here
Pages: 1 [2]