Asset Manager - How do I use it?

Dear Sir,

I have got a Asset Library from Github ColdTric url https://github.com/ColdTrick/asset_library.

The plug is installed as illustrated in the following 1, and 2 Images

Image 1

 

 

 

 

 

 

 

 

 

 

 

 

Image 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now as it suggests "Upload assets that are (publically) available for use on your site. Copy the link to the file and use it everywhere."

And as you can see from the following image, I have uploaded a mp3 audio file, a mp4 video file, a png image, and lastly uploaded a notepad.txt file which contains emoji conversion link  - ALL AS A TEST TO UNDERSTAND IT's Utilization and How to Implement.

 

 

 

 

 

 

 

 

 

That it.... I have no idea how to use it as it suggests | "Upload assets that are (publically) available for use on your site. Copy the link to the file and use it everywhere."

Can someone please give me a practical example?

If you need administrative access, please let me know and I will inbox.

Looking forward to a kind and generous answer.

 

  • The term "Assets" refers to static page elements (e.g. image files, audio/video files, text/html files etc.) that you want to display on one or several pages on your site. The "Asset Library" plugin provides the functionality necessary to upload files and the provides a permanent, cached url for the uploaded items. What you do with these assets is not part of the plugin. It just provides the urls that you can then make use of for displaying the corresponding files whereever you want to. But this part is what you have to do yourself. You could use an url of an asset for example in a FreeHTML widget to display an image within the widget. Or you could use the assets to customize your theme or just a single page view where you would use the url directly in the code.

    The "Asset Library" plugin is not meant for uploading regular content that users could comment on or to allow any normal user to upload any content. That's what other plugins like the bundled Files plugin, Tidypics, iZAP Videos or other plugins for other type of content are for.

  • Dear @iionly 

    Thanks for your reply. 

     

    The term "Assets" refers to static page elements (e.g. image files, audio/video files, text/html files etc.) that you want to display on one or several pages on your site. 

     


    I understand what you are saying. This plugin is a performance plug which caches contents as static and re-usable throughout the site. But I am gona bring up something here first and you will understand why? 
    I am already using static assets uploaded in <DATA> folder for use with CKEDITOR and this method is well integrated with the Editor as you can see from the following image.

     

    The "Asset Library" plugin provides the functionality necessary to upload files and the provides a permanent, cached url for the uploaded items. What you do with these assets is not part of the plugin. It just provides the urls that you can then make use of for displaying the corresponding files whereever you want to. But this part is what you have to do yourself. 

    I humbly and respectfully disagree and I say this again I really respectfully disagree. I have a lot of respect for knowledge full person like  you and other who are always trying to help others. Without you guys we would be lost in a sea. You guys are our compass. I mean it.

    Now the disagreement part. The Asset Manager Plug exists for uploading contents and serving the content cached as static, but the plug should have an easy integration on the front end side for calling or using the asset. The scope of how you can use these assets are not clear nor are the methods or functions that can be used to call these assets in the front end. As you said the plugin generates links against each uploaded assets for use where ever, but output format of the link may not necessarily help in calling a mp3 or video file as we normally do. Yes, the img works, and it will work with or without the plug and will even work without the editor as long as you can call the file using simple html.
     

    The "Asset Library" plugin is not meant for uploading regular content that users could comment on or to allow any normal user to upload any content. That's what other plugins like the bundled Files plugin, Tidypics, iZAP Videos or other plugins for other type of content are for.

    Exactly, I also think there is a good purpose for this special plugin, and I am wondering if this is at all possible. Let's say that I am gona write a code or copy a code that requires CCS support specific to the code that I would like to use, so I am thinking may be the CCS file can be uploaded and called in using the link for use with the code; but the problem is where do you use the code? In a News, Blogs, Page, About, Terms, Privacy ? You can't cuz all these are using Elgg View, and if you try to code it, it will break the Core CCS.  Only possibility that I can think of using static pages outside the view using plugin like AnyPage.

    Am I correct? BTW, a ccs can also be called inline with the code will that work? 

    Also, I find that scripts not requiring CCS are also not possible lile the followings: It breaks the site! I tried it in a page using the page plug.
     

    <html>
    <head>
    <style>
    div {
      width: 100px;
      height: 100px;
      border: 1px solid black;
      margin: 10px;
      float: left;
      padding: 30px;
      text-align: center;
      background-color: lightgray;
    }
    
    p {
      background-color: white;
    }
    </style>
    </head>
    <body>
    
    <h3>This example demonstrates the difference between onmousemove, onmouseenter and onmouseover.</h3>
    
    <p>The onmousemove event occurs every time the mouse pointer is moved over the div element.</p>
    <p>The mouseenter event only occurs when the mouse pointer enters the div element. </p>
    <p>The onmouseover event occurs when the mouse pointer enters the div element, and its child elements (p and span).</p>
    
    <div onmousemove="myMoveFunction()">
      <p>onmousemove: <br> <span id="demo">Mouse over me!</span></p>
    </div>
    
    <div onmouseenter="myEnterFunction()">
      <p>onmouseenter: <br> <span id="demo2">Mouse over me!</span></p>
    </div>
    
    <div onmouseover="myOverFunction()">
      <p>onmouseover: <br> <span id="demo3">Mouse over me!</span></p>
    </div>
    
    <script>
    var x = 0;
    var y = 0;
    var z = 0;
    
    function myMoveFunction() {
      document.getElementById("demo").innerHTML = z+=1;
    }
    
    function myEnterFunction() {
      document.getElementById("demo2").innerHTML = x+=1;
    }
    
    function myOverFunction() {
      document.getElementById("demo3").innerHTML = y+=1;
    }
    </script>
    
    </body>
    </html>

    Again now back to the Asset Manager Plugin, I have tried calling it using various method in the following blog links that I would request you to look at  - https://www.myhotfb.com/blog/view/6205/test-blog-managing-assets

    It's really not that much, so the question remain with the consideration that we have a Plugin that is Asset Manager, but the method of using the links generated against each of the uploaded assets  remains a mystery. 

    So, I would request you and the original author to tell us how best this plug can be utilized. Give us some practical examples.

     

     

     

  • You cannot add code or a script within a text or richtext input. It won't get executed. There's simply no way that's possible. And for security reasons any JS code (that might be executed on client-side) is filtered out by the htmlawed plugin. If this wouldn't be done is would be absolutely unsafe! I believe CSS files can also not be added as an asset.

    If the CKeditor Addon plugin (I guess this provides the assets tab, right?) provides the functionality you want, why do you need another plugin?

    As I see it the "static" assets are meant for static page elements first of all. And making use of them numerous times or having many static assets is not the original intention. Also including them in blogs or pages or other site content - which is all "dynamic content" is not the original purpose either. The only likely target for making use on the frontend is probably a freehtml widget where you might mostly need only image files as static assets (video might already be too heavy to display all the time and audio is probably just annoying). Within a html widget you can also embed video or audio files using html5 video/audio tag and if you restrict "unsafe" html tags to admins only (when using Widget Manager plugin to provide freethml widgets) it would be okay.

    For most use cases I don't see much sense in uploading static assets with a plugin and then make use of them. For example any images used by the theme could also be directly provided by the theme and referred to in the code of this plugin.