6 years ago
6
Topic




Objective: Save the same image (fulltext) in two fields (fulltext and Intro)

Explanation: I am making a form that allows the user to send articles. I use seblod because I want it to have fewer fields than the joomla form. 

In this form I want to request the user a single image that serves both for viewing the introduction (intro) and for the image we see once we start reading the article (fulltext) when we see the articles in blog format.

In the joomla form the 2 images are requested, I just want to ask for one and to resize for both.

Maybe there is some way to save the same image in the database, or one of the thumbnails.

In this attached picture I indicate where it may be that I have to touch.

Thank you very much.
Get a Book for SEBLOD
1283 Posts
Bucklash
6 years ago
5
Level 1

I tried this for my site.

Using before store i saved value from img1 to img2 ie intro to full, however, in db I ended up with JSON data repeated....

img_fulltext:””,img_fultext:”some_image”

It might depend on field you want to use etc

 

6 years ago
4
Level 2

Yes, but I need it save:

{"image_intro":"X.jpg", "image_fulltext":"X.jpg"} Same X.jpg in image_intro and image_fulltext


Another way could be editing the blog template viewver and linking the tumbmail that is generated by article image fulltext

1283 Posts
Bucklash
6 years ago
3
Level 3

Hi

Yes, I was just saying I found it created odd behaviour so I did something different in the end.

What did you do to save one image in intro and full?

6 years ago
2
Level 4

I have not succeeded, the thread is as resolved but it was a mistake.

4229 Posts
Kadministrator
6 years ago
1
Level 5

You should add jformmedia field with no storage, than manually save the JSON string value using beforestore. If you have a field with storage it will overwrite what you stored in beforestore as before store happens - well.. before store, so actual storage comes after it :)

4229 Posts
Kadministrator
6 years ago
0
Level 6

Or just forget about joomla and simply add the same field to the intro and view - using image typography you can format it to different dimensions.

Get a Book for SEBLOD