[plugin request] blog post cover

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
vodka
Posts: 15
Joined: Tue Mar 12, 2019 8:53 pm

[plugin request] blog post cover

Post by vodka » Tue Mar 12, 2019 9:09 pm

Hi, I would discuss this feature inspired by "Featured Images & Post Thumbnails" from wordpress.
This plugin allow a theme designer to make a nicer home page and/or blog page.

For exemple you can make a home page like this: Image

and your blog entry can look like this:

Image

You can use the cover like a background, or like a big header, or like a small thumbnail, and so on...

User avatar
Arvid
FlatPress Coder
Posts: 558
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: [plugin request] blog post cover

Post by Arvid » Wed Mar 13, 2019 6:42 pm

Could be done with a dedicated Front Page plugin - please see the topic [feature request] frontpage enhancement.

vodka
Posts: 15
Joined: Tue Mar 12, 2019 8:53 pm

Re: [plugin request] blog post cover

Post by vodka » Wed Mar 13, 2019 8:40 pm

Arvid wrote: ↑Wed Mar 13, 2019 6:42 pm Could be done with a dedicated Front Page plugin - please see the topic [feature request] frontpage enhancement.
Not exactly... it can be alive without the front page, the main goal of this plugin is provide a tool (flatpress api or so on) to customize a blogpost

The second example can be done with this code:

Code: Select all

{if ($cover)} <div style=background-image:"{$cover}" ><h2>{$subject|tag:the_title}</h2></div>{/if}
...
{$content|tag:the_content}
...

vodka
Posts: 15
Joined: Tue Mar 12, 2019 8:53 pm

Re: [plugin request] blog post cover

Post by vodka » Tue May 07, 2019 8:22 am

I have made a first attempt to write this plugin... and it's seem to work! But I need help to write the configuration panel, I do not know how pass a value from smarty to php, someone ca help me?

User avatar
Arvid
FlatPress Coder
Posts: 558
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: [plugin request] blog post cover

Post by Arvid » Tue Aug 27, 2019 6:06 am

We'll get this running :) Can you please post your current plugin code?

vodka
Posts: 15
Joined: Tue Mar 12, 2019 8:53 pm

Re: [plugin request] blog post cover

Post by vodka » Sun May 17, 2020 7:19 pm

It's very simple, the first part it's already inside the FP code... :mrgreen: for the second part of the code I need a little bit of rework, I'm writing a new theme from scratch to show how it works.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests