Dotclear

Vous n'êtes pas identifié(e).

Annonce

13 février 2024 Sortie de Dotclear 2.29

#1 2014-10-10 04:14:28

jarekb
Membre
Inscription : 2014-09-06

tpl:EntryFirstImage shows second image instead of first one

Hello Friends,

It's me again... My website is up and running now (some work to do later this year).

When the testing is over I've moved DC from /test folder to root folder - after this moving, Tpl:EntryFirstImage started to show the second image from post instead of first one on home page (strange thing, isn't it?).

I would like to go back to first image to be shown, because every first image on my website is the same width and height, so they look good in a row. The second image is always different size.

Any suggestions? Any help appreciated. Thank you in advance.

Dernière modification par jarekb (2014-11-07 09:04:04)

Hors ligne

#2 2014-10-10 05:12:04

Jean-Michel
Modérateur à ailes d'ange
Lieu : Paris
Inscription : 2006-08-22
Site Web

Re : tpl:EntryFirstImage shows second image instead of first one

Hello,

It´s online? URL?

Hors ligne

#3 2014-10-10 07:28:52

jarekb
Membre
Inscription : 2014-09-06

Re : tpl:EntryFirstImage shows second image instead of first one

Hello Jean-Michel,

yes, it is, home page: http://rockhard.ct8.pl/
example problem posts:
http://rockhard.ct8.pl/index.php?post/jacekpolakwyw
http://rockhard.ct8.pl/index.php?post/l … ubowiczwyw

Dont be scared with language, it's Polish ;)

Template: heavy modified Chestnut

Dernière modification par jarekb (2014-10-10 07:29:07)

Hors ligne

#4 2014-10-18 11:19:43

ben_griffith
Membre
Lieu : Wiltshire
Inscription : 2009-09-28

Re : tpl:EntryFirstImage shows second image instead of first one

Hi Jarek

The first thing what I can think of is to test if the same problem appears with the default template. If it doesn't then you can be sure that the problem is caused by your template.


I Dotclear.

Hors ligne

#5 2014-10-18 11:25:29

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : tpl:EntryFirstImage shows second image instead of first one

Hello

One very googd plugin to get post images is listImages. It allows to get any number (first 3, number 3 to 6, etc.) of images from posts. Once you get to know it, you will never use tpl:EntryFirstImage anymore ;)

Hors ligne

#6 2014-10-23 21:19:21

jarekb
Membre
Inscription : 2014-09-06

Re : tpl:EntryFirstImage shows second image instead of first one

Hello,

@ben_griffith
Unfortunately the problem exist in any template

@Philippe
listImages is very interesting, however it shows in side panel, not in category listing as i would like it.

Temporary solution at the moment is changing the pictures, the second one instead of first one.

Hors ligne

#7 2014-10-24 04:42:11

ben_griffith
Membre
Lieu : Wiltshire
Inscription : 2009-09-28

Re : tpl:EntryFirstImage shows second image instead of first one

Hi jarekb

Good, then it's the code inside DC.

I had a look at your website and noticed that both affected articles have got a different structure compare to the ones that work.
For the others, the first pictures is on the top right side. The non-working are
a.)  in the middle of a text
b.) on the right side
c.) The first working one is on the left.
This means the DCcode has to work through different personal code in your particular page code.
Just for testing, you could change the position of both (first one the left and second picture on the right). Does it show the first one?
That could mean that in the script is some kind of "take the first on the left under certain circumstances" and contains exceptions which don't apply for the working articles. I believe to remember that I noticed the same years ago, when I tried the text.

Dernière modification par ben_griffith (2014-10-25 01:12:12)


I Dotclear.

Hors ligne

#8 2014-10-24 05:28:47

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : tpl:EntryFirstImage shows second image instead of first one

jarekb a écrit :

@Philippe
listImages is very interesting, however it shows in side panel, not in category listing as i would like it.

The plugin has a widget for the sidebar, but also a template tag that you may use anywhere, check its readme.txt file for examples

Hors ligne

#9 2014-10-25 12:28:49

jarekb
Membre
Inscription : 2014-09-06

Re : tpl:EntryFirstImage shows second image instead of first one

Hi ben_griffith

Just for testing, you could change the position of both (first one the left and second picture on the right). Does it show the first one?

I've changed positions for all pictures for testing purposes and it doesn't do a trick, unfortunately.

New posts are also affected.

I need to check the DC code in templates when getting more free time, perhaps i've removed something by mistake.

Thanks a lot for all suggestions!

Dernière modification par jarekb (2014-10-25 12:29:23)

Hors ligne

#10 2014-11-07 09:02:14

jarekb
Membre
Inscription : 2014-09-06

Re : tpl:EntryFirstImage shows second image instead of first one

Problem solved!

First image in affected entries had "src=public" while other images had "src=/public".

I've added missing slash sign and now it works like a charm :)

Dernière modification par jarekb (2014-11-07 09:02:43)

Hors ligne

#11 2014-11-09 05:31:12

ben_griffith
Membre
Lieu : Wiltshire
Inscription : 2009-09-28

Re : tpl:EntryFirstImage shows second image instead of first one

Hi jarekb

Great that you solved it and special thank for telling us the cause of the problem :-)


I Dotclear.

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map