What I want to make is some extra fields for pictures, and for alt tags by the pictures.
I have the following code in my item.php:
I have the following code in my item.php:
13 years 6 months ago #112966
Hello Dick,
I can give you a new approach, one more complex and one much simpler.
You can have two fields, one for the path of the image and one for the alt title.
Both of them have to be text fields and you have to directly output them using their alias.
An example code is here: and here .
This will however result in somehow bloated (but functional and optimal) code.
On the other hand you can strip the elements using the preg_replace or the str_replace function and then output them using the same way mentioned above.
Same code pretty much but you get to use the image uploader and manager in the backend and avoid manually typing paths.
I can give you a new approach, one more complex and one much simpler.
You can have two fields, one for the path of the image and one for the alt title.
Both of them have to be text fields and you have to directly output them using their alias.
An example code is here: and here .
This will however result in somehow bloated (but functional and optimal) code.
On the other hand you can strip the elements using the preg_replace or the str_replace function and then output them using the same way mentioned above.
Same code pretty much but you get to use the image uploader and manager in the backend and avoid manually typing paths.
Topic Author
13 years 6 months ago #112967
Hello Krikor, thanks for the quick reply!!
I prefer the second method, to avoid typos. I think that could be going wrong with my client.
I am not sure that I understand that method. How should the code look like?
Thats because my php skills aren't that good enough.
Thanks in advance!
Dick
I prefer the second method, to avoid typos. I think that could be going wrong with my client.
I am not sure that I understand that method. How should the code look like?
Thats because my php skills aren't that good enough.
Thanks in advance!
Dick