Topic Closed
feniweb
297 Posts

hello Josh

Thanks for the further development.
Publish Time is very good.
However, still missing a way to display an image.
If in the configuration "Entries Abbreviation Length" a value is written (for example 100) the image disappears wich was selected in the WYSIWYG editor.

It would be great if it is possible to select with a checkbox if the picture is shown or not.

 

My wish would be

Edited: 3 years ago#8200

a2exfr
240 Posts
21K Downloads
2 Themes
10 Plugins

For images in blog  I use:

in SimpleBlog.php   in line 192 insert :

if($this->post_id <= 0) {
        $this->GetImageFromPost($post['content']);
         }

right before :

echo '<div class="blog_post post_list_item'.$class.'" '.$id.'>';

and this  in line 289:

    function GetImageFromPost($item){
        
           $img_pos = strpos($item,'<img');
        if( $img_pos === false ){
            return;
        }
        $src_pos = strpos($item,'src=',$img_pos);
        if( $src_pos === false ){
            return;
        }
        $src = substr($item,$src_pos+4);
        $quote = $src[0];
        if( $quote != '"' && $quote != "'" ){
            return;
        }
        $src_pos = strpos($src,$quote,1);
        $src = substr($src,1,$src_pos-1);

        // check for resized image, get original source if img is resized
        if( strpos($src,'image.php') !== false && strpos($src,'img=') !== false ){
            $src = $dirPrefix . '/data/_uploaded/' . urldecode(substr($src,strpos($src,'img=')+4));
        }

        $thumb_path = common::ThumbnailPath($src);


        $img_pos2 = strpos($item,'>',$img_pos);
        $img = substr($item,$img_pos,$img_pos2-$img_pos+1);

     
      
        echo '<img class=" img-thumbnail" src="'.$thumb_path.'"/>';
  
    
    
    }

 

 

Edited: 3 years ago#8204

Josh S.
2K Posts
251K Downloads
16 Themes
18 Plugins
I like it. Here's 3.0b2
3 years ago#8215

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

Communics Online Agency

Online agency based in the Netherlands. We create websites that focus on purpose and conversion. We follow UX & web standards so your visitors get the best website experience.

Find out more about our Provider Spotlight

Log In

  Register