BLUDIT more than 1 cover img.

Post Reply
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

Fri Dec 21, 2018 3:04 pm

Hello guys, i am working on a little project where i need to have access to more than 1 cover img, need to be able to upload them by the interface, and have access to them by $page->firstCoverImg(); $page->secondCoverImg(); and so on, any one can help please?
User avatar
Edi
Site Admin
Posts: 1405
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Dec 21, 2018 5:07 pm

I presume that no one is willing to make such a modification for free. Even more so as it makes no sense for other users. If you cannot code it by yourself you have to search for a freelancer.

But be careful. It's not clever to modify the code of the core, because you have to do it again with every update.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

Fri Dec 21, 2018 5:10 pm

Thanks Edi, i am already half way, and welling to take the risk of updates, i have to follow me requirements for now.
I was able to have the second img to be uploaded and have thumbnail, but the issue i have is persisting it on the db, i keep trying to figure it out, `secondImg:"" `.
Hopefully someone will provide some insights.
User avatar
Edi
Site Admin
Posts: 1405
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Dec 21, 2018 5:49 pm

Which images are shown depends mostly of the theme. Why not use something like cover-image-1.jpg and cover-image-2.jpg, and a small script that gives the file name cover-image-2.jpg using the file name cover-image-1.jpg?
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

Fri Dec 21, 2018 5:56 pm

I am trying to understand your post, you mean upload the images to an img/ directory and call them by php? my whole point of having multiple images, is being able to control them from the dashboard where i can easily change them if that is the case.
steps i have done:
*created a db entry for second image.
*modified new-content.php / edit-content.php. created new jquey id's for the second img.
*modified the media.php file to upload the second img.
Result:
second img with thumbnail get uploaded to directory of the post, and shown in the dashboard at first time only, the db file of the post have the second img entry empty, `secondimg:""`.
User avatar
Edi
Site Admin
Posts: 1405
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Dec 21, 2018 6:07 pm

Things can easily be done... But I'm not interested to give some advice how to modify the core, and redesign the dashboard. ;-)
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

Fri Dec 21, 2018 6:29 pm

I understand, That is the thing i love about bludit. can you at least help me understand what could be the problem `with my steps` ?
User avatar
Edi
Site Admin
Posts: 1405
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Dec 21, 2018 6:48 pm

As I wrote: It makes no sense to modify the core, because it gets lost when update the installation. It dosn't matter if it's Bludit or any other Content Managment System.

It's your responsibility what you try to do. But it's not everybody's business.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
Post Reply