Topic Closed
feniweb
297 Posts

Recently you have customized the Simple Blog. What I miss is painful to the teaser specify an image in the preview. One can specify for example, 200 characters is a read more from the images disappear.


It would be interesting to be able to spend the individual blog posts by category on a suitable site.

4 years ago#7456

juergen
1.4K Posts
50.2K Downloads
16 Plugins
design, web development & visual effects

It would be interesting to be able to spend the individual blog posts by category on a suitable site.

You can add a Menu Item as External Link pointing to a specific Blog Category:


4 years ago#7459

a2exfr
242 Posts
23.8K Downloads
2 Themes
10 Plugins

specify an image in the preview

Agreed it's would be great!

For now, it's posiible to get image on preview blog page with multiple blog posts, to comment line 578 in SimpleBlog.php

//$content = strip_tags($content);

but you got to be carefull with unclosed tags

4 years ago#7462

juergen
1.4K Posts
50.2K Downloads
16 Plugins
design, web development & visual effects

You could take a look at the code of the Child Thumbnails plugin, how Josh fetches the first image (of a page in this case) and to gets the thumbnail of it.
maybe useful.

 

//get the image
        $content = section_content::Render($file_sections,$title,$file_stats);
        $img_pos = strpos($content,'<img');
        if( $img_pos === false ){
            return;
        }
        $src_pos = strpos($content,'src=',$img_pos);
        if( $src_pos === false ){
            return;
        }
        $src = substr($content,$src_pos+4);
        $quote = $src[0];
        if( $quote != '"' && $quote != "'" ){
            return;
        }
        $src_pos = strpos($src,$quote,1);
        $src = substr($src,1,$src_pos-1);

        $thumb_path = common::ThumbnailPath($src);
4 years ago#7464

a2exfr
242 Posts
23.8K Downloads
2 Themes
10 Plugins

Hello, Juergen.

Thanks, seems that only  that only you  indicate the direction on this forum. :)

Of couse, this way would be more safety.  Take image and than strip_tags.

And I allready use it in my plugin Easy Catalog

Comment line 578, it's just the fastest way to achive goal, not suitable for everyone.  But  it's give you possibiity to show preview image on different sides, and fullwidth.

4 years ago#7465

juergen
1.4K Posts
50.2K Downloads
16 Plugins
design, web development & visual effects

Easy Catalog

Yeah, nice one. I visited your demo site yesterday. Looks great.

4 years ago#7473

a2exfr
242 Posts
23.8K Downloads
2 Themes
10 Plugins

More ideas for simple blog:

-possibility to make multilingual posts(translation possibility);

-more SEO friendly (keywords to post, etc.);

-may be a possibility to choose beetwen- using preview  characters lenght of post, or using some preview tag {readmore} in post;

-gadget resent posts by category.

-made it a part of gpeasy by default?

 

4 years ago#7605

Topic Closed

 

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register