Giter Club home page Giter Club logo

inlin-craft's People

Contributors

aelvan avatar brandonkelly avatar davist11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

inlin-craft's Issues

Error property inlin

I run craft on an ngnix server.

When using inlin I get this error:

Neither the property "inlin" nor one of the methods "inlin()", "getinlin()"/"isinlin()" or "__call()" exist and have public access in class "Craft\CraftVariable

I aded the public path via 'inlinPublicRoot' => 'path', but this doesn't help. Is this a ngnx issue? Or what coul be the problem?

FR: Add alias support

It's be nice instead of using $_SERVER['DOCUMENT_ROOT'] it'd be nice if it defaulted to @webroot -- and it'd also be nice if aliases could be used in the config setting inlinPublicRoot

Documentation update required

Hi – thanks for your work on this plugin.

I think the documented usage in the README needs to be updated match the plugin behaviour. The example script usage given:

<script src="{{ craft.inlin.er('/build/svg/my.svg') | raw }}"></script>

... should actually read as follows:

<script>{{ craft.inlin.er('/build/js/script.js') | raw }}</script>

... since the plugin will just dump the contents of that file right there, it should be placed between the script tags and not inside the src attribute.

Thanks again.

Adding assets url from backend, not from template

I’m wondering if this is possible. I have a teaser block and when SVGs are added instead of bitmap images, I want them to be inlined instead of output as an image element. Inlin only offers an output tag. Is there a way to insert a field as an argument, or is that not possible with Twig?

file_exists($filePath) returns false

My example $filePath ends up being 'http://localhost:8888/carbon/public/re/icons/money.svg', 'http://localhost:8888/carbon/public/' coming from 'inlinPublicRoot' and the rest being passed by $fileName. Checking file_exists($fileName) does work.

if ($fileName !== '' && file_exists($fileName)) {

I don't think file_exists() should be getting a full url. From the docs:

file_exists — Checks whether a file or directory exists

Thanks for writing the plugin! Let me know what you think.

Inlin not showing up on the plugins page

In my local dev environment the plugin shows up and works. But when I move it to my server it doesn't even show up, but other plugins do.

Any ideas?

Thanks for the great plugin by the way.

returning array in inline.php didn't work

The example you provided to put in the config/inline.php file didn't work for me cause I figured you had to return it as an array? It error'ed in "Call to a member function setAttributes() on null"

So I declared it as a variable and then it worked out fine :) Is there something I missed or do you need to update the readme file with a variable declaration of $publicRoot instead of 'publicRoot' => 'xxx'?

Add a license?

I'd like to use Inlin on a client project, but the client is hesitant because the plugin has no licensing info. Would it be possible to add a license to your project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.