BLUDIT more than 1 cover img.

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

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

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.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

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?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Things can easily be done... But I'm not interested to give some advice how to modify the core, and redesign the dashboard. ;-)
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
s0u
Jr. Bludit
Posts: 8
Joined: Fri Oct 26, 2018 10:56 am

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

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.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply