So, I am using channel images module currently and I really like it. Especially support from Brad and such support is something people want when they buy a module. Same thing with EE itself.
So, I have idea and I am stuck with it on one problem. If anyone have solution for it, I would like to hear it.
So, when I have text in entry, I can upload images to text with channel images and have them automatically re-sized to given values. That is great. But, what if my client wants to have images IN text using this module.
I have carefully approached to this idea and I have solution for it but cannot make it work.
If I use plugin called low_replace (freeware) and channel images module, I can find replace images in text with images from channel images. That is idea. How?
When someone is writing text, he needs only to put some “imagetags” inside text. Like this:
“Unless you’ve just arrived in 2009 on a time machine, you know that smoking isn’t good for you. Did you know, that smoking isn’t good for your computer, either? It’s true, at least according to Apple. Two readers in different parts of the country claim that their Applecare warranties were voided due to secondhand smoke. Both readers appealed their cases up to the office of God Steve Jobs himself. Both lost.
[herecomesimage1]
Back in April, Derek copied us on his e-mail to Jobs:
“
I took my mid 2007 apple macbook (black) into the Jordan Creek Apple Store in West Des Moines, Iowa, on Saturday, April 25th, because I had been experiencing some issues with it overheating, and figured the fan was bad. After some initial testing, they took the computer in for work under my Applecare plan, which has over a year remaining on it.
[herecomesimage2]
Today, April, 28, 2008, the Apple store called and informed me that due to the computer having been used in a house where there was smoking, that has voided the warranty and they refuse to work on the machine, due to “health risks of second hand smoke”.[herecomesimage3]
Not only is this faulty science, attributing non smoking residue to second hand smoke, on Chad’s part, no where in your applecare terms of service can I find anything mentioning being used in a smoking environment as voiding the warranty.
”
[herecomesimage4]
Jobs’ office did not help Derek, but he resolved some of the problems himself by disassembling his Macbook and cleaning it out with a can of compressed air.A few months later, reader Ruth wrote to us with an identical complaint after trying to have her son’s iMac repaired at a local authorized repair center.”
So I have this text and I have put placeholders for images in it.
I use plugin for find replace and say that I want to replace [herecomesimage] with image URL from channel images.
I do following
{exp:channel:entries limit=“1” dynamic=“no” entry_id=“113” }
{exp:low_replace find=”{count_images}” replace=”{number_images}” multiple=“yes”}
{text}
{/exp:low_replace}
{/exp:channel:entries}where {count_images} is equal to
{exp:channel_images:images entry_id=“113”}
[herecomesimage{image:count}]|
{/exp:channel_images:images}which results in
[herecomesimage1]|[herecomesimage2]|[herecomesimage3]|[herecomesimage4]|
and {number_images} is equal to
{exp:channel_images:images entry_id=“113”}
{image:url:xl}|
{/exp:channel_images:images}which results in
image1.jpg|image2.jpg|image3.jpg|image4.jpg|
(let/s say number of images uploaded is same as images holders in text)
What is problem!?!?
if I do it like this
{exp:channel:entries limit=“1” dynamic=“no” entry_id=“113” }
{exp:low_replace find=”[herecomesimage1]|[herecomesimage2]|[herecomesimage3]|[herecomesimage4]|” replace=“image1.jpg|image2.jpg|image3.jpg|image4.jpg|” multiple=“yes”}
{text}
{/exp:low_replace}
{/exp:channel:entries}it works. If I create values dynamically it doesn’t work. Why? How to solve problem? Any idea?
If it could work as that, that could mean that whole image handling in all entries could be done exclusively with channel images. Not only to create galleries, but to have those images used in text also. And we all know how clients like pictures and don’t know how to optimize them.
To me this could be better solution than using upload images one by one and optimizing them manually.
Do not tell me this is plugin or module problem. It is problem of “variables” or whatever in EE. I tried using embed, snippets and so on, and I cannot get it to work.
Hope this is not too long :D and that I have wrote it understandable.