Re: Links for images

  • toneskok
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 5 months ago #9860 by toneskok
Links for images was created by toneskok
Hi, thanks for great module, but I have some problems with displaying right links with right image.
Example: images are showing with this order: img1, img2, img3, img3
For first, I have url: http://url1
Second does not have url, so I put $$ in second line
Third has url: http://url3
Fourth has url: http://url3

This is definition
http://url1
$$
http://url2
http://url3

On page, links under images are:
img1: http://url1/$$
img2: http://url3
..

So quick description. If I put $$, this is attached to prior line definition and next line is skipped.

Any suggestions?

Regards, Tone

Please Log in to join the conversation.

More
13 years 5 months ago #9871 by ivan.milic
Replied by ivan.milic on topic Re: Links for images
That is strange, are you sure you have newline after each link definition. We sometimes have problems on some servers with first line so users insert $$ in first line.

Anyway this workaround may help:

open:

modules\mod_hot_joomla_carousel_pro\tmpl\default.php

find this:

$linksList = explode("\n", $imageLinks);


and change it like :

$linksList = explode("|", $imageLinks);

then in user input instead of new line use |, so you would have all input in one line.

Please Log in to join the conversation.

  • toneskok
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 5 months ago #9879 by toneskok
Replied by toneskok on topic Re: Links for images
Hi, I know it's strange. I looked params definition in database, there is \n after each line (\r\n) to be precise. I already looked default.php files and I discovered one thing (workaround this problem is to insert dummy first row) that I think you should correct. Where is block where you split links (by \n) and after that you search images dir to get filnames. You concat filenames with ||. Fieldnames variable is the explode to array. In that array is also extra empty array value (because of last ||), you then sort array and get blank string to first place. So all links are shifted by one.
Are my assumptions correct? And if it's ok with you I will try do solve this problem.

Regards, TOne

Please Log in to join the conversation.

  • toneskok
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 5 months ago #9881 by toneskok
Replied by toneskok on topic Re: Links for images
Hi Ivan,

I changed code in default.php to get it to work as it should. If you would like please provide me your email so I can send file with changes to you.

Regards, Tone

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
13 years 5 months ago #9885 by milos
Replied by milos on topic Re: Links for images
Hi Tone,

Please send default.php to milos.stankovic@gmail.com. I'd like to review your changes.

Thanks,
Milos

Please Log in to join the conversation.

More
12 years 7 months ago #18526 by markus1
Replied by markus1 on topic Re: Links for images
I am experienced this exact same problem occurring that has been described in several other separate topic postings. I am using version 2.5.4.1 and thought the necessary changes to default.php were already included. But the behavior I'm experiencing is exactly the same:

* first image has no link assigned
* second image has the link meant for the first image
* N image has the link meant for the N-1 image
* final image has no link assigned

Contents of "Links For Images" field:
www.alliancedata.com
www.atmosenergy.com
www.bankozarks.com
www.planotx.org
www.denbury.com
www.encana.com
www.ge-energy.com
www.visitdowntownplano.com
www.legacytexasbank.com
www.planorotary.com
www.ti.com/education
www.txu.com

The default.php file header doesn't have an individual version but the file is dated April 17, 2012 1:00pm so I would think it would have the updates that is referred to earlier in this thread.

My development URL is www.assistancecenter.org/joomla . The Carousel is located near the bottom of the home page, just above the footer.

Please advise. Thanks!

Please Log in to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum