2017 © Pedro Peláez
 

phile-plugin inline-image

A plugin take an image name and generate a wrapped image tag.

image

phile/inline-image

A plugin take an image name and generate a wrapped image tag.

  • Thursday, June 19, 2014
  • by NeoBlack
  • Repository
  • 3 Watchers
  • 3 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

phileInlineImage

A plugin for Phile to take an image name and generate a wrapped image tag., (*1)

1.1 Installation (composer)

php composer.phar require phile/inline-image:*

1.2 Installation (Download)

  • Install the latest version of Phile
  • Clone this repo into plugins/phile/inlineImage

2. Activation

After you have installed the plugin. You need to add the following line to your config.php file:, (*2)

$config['plugins']['phile\\inlineImage'] = array('active' => true);

Usage

Some example markdown input:, (*3)

## This is a Sub Page

This is page.md in the "sub" folder.

icon.png

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

This is what will be output. You can see that icon.png was wrapped with some HTML:, (*4)

<h2>This is a Sub Page</h2>
<p>This is page.md in the "sub" folder.</p>
<p class="content-image">
  <img src="http://localhost:8888/phile/content/images/icon.png">
</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>

Config

This is the default config.php file. It explains what each key => value does., (*5)

return array(
  'images_dir' => 'content/images/', // the folder where your images exist
  'wrap_element' => 'p', // the element to wrap the img tag in
  'wrap_class' => 'content-image' // the class to apply to the wrap element
  );

You can see how the plugin applies the config data to the HTML output., (*6)

The images_dir should be relative to the root of the Phile installation (the constant ROOT_DIR will contain your root path)., (*7)

The Versions

19/06 2014

dev-master

9999999-dev http://philecms.com

A plugin take an image name and generate a wrapped image tag.

  Sources   Download

MIT

The Requires

 

cms content phile

19/06 2014

1.0.0

1.0.0.0 http://philecms.com

A plugin take an image name and generate a wrapped image tag.

  Sources   Download

MIT

The Requires

 

cms content phile