[nodebb-plugin-iframely] IFramely Embeds
-
Something I've noticed in Iframely is that the number of API hits has been steadily increasing over time. I reached out to Iframely, and they noted that NodeBB appears to be making the majority of the API calls.
I've taken a look at your hits, and as I see the more from API calls than from iFrames. It means your NodeBB is making the most hits.
The way NodeBB folks have it implemented is that they keep the cache for 1 day in server's memory. If you restart the servers, for example, - the cache will be reset. Also, if your RAM is limited, some of the records can be evicted from cache prematurely.
We did helped NodeBB team develop the plugin - but from the point where the link is already extracted and till the point before it needs to be stored. So, basically - connecting to API and UI is our part. However, if you have a pull-request for longer cache times or eliminating the older links - my team should be able to review, merge and push it to NPM.I am far from a developer, so I'll ask if you guys can take a look at the plugin and try and add some method of lowering API hits. Perhaps if a post is older than x days, don't attempt to cache the Iframely hit until someone loads that post. Maybe going a step further and removing the embed if the post is over a certain age.
-
@teh_g sounds like a good idea to me, too. Maybe allow for customizing the time it takes for embeds to expire in the settings.
-
@PitaJ said in [nodebb-plugin-iframely] IFramely Embeds:
@teh_g sounds like a good idea to me, too. Maybe allow for customizing the time it takes for embeds to expire in the settings.
I have no dev talent, or I'd offer to help. I absolutely would love this. My costs for Iframely have slowly been going up...
-
@teh_g said in [nodebb-plugin-iframely] IFramely Embeds:
@PitaJ said in [nodebb-plugin-iframely] IFramely Embeds:
@teh_g sounds like a good idea to me, too. Maybe allow for customizing the time it takes for embeds to expire in the settings.
I have no dev talent, or I'd offer to help. I absolutely would love this. My costs for Iframely have slowly been going up...
Why don't you just self host it?
-
@torn2 said in [nodebb-plugin-iframely] IFramely Embeds:
Why don't you just self host it?
Mostly laziness. I can't find a good document for setting up Camo with Iframely, and I don't have the time to fuddle with getting it working. The cost of the cloud hosting is also relatively cheap compared to the cost of spinning up a server to host the services myself.
-
Hello,
I am self hosting Iframely. It works as expected except the way some embedded media are displayed. You can find an example (on my testing server) here : https://forum.zqsd.fr:6664/topic/166/les-bon-plans-pc/161
To be more specific, here is what I obtain with no custom CSS (nodebb v1.1.1):
As you can see from the picture, the
max-width: 21px !important
is not applied because of themax-width: 100% !important
. If I deactivate this later rule, I obtain what I would expect to see normally.
I am not a CSS guru, and since both rules are using
!important
, I have hard time finding how to get ride of them with custom CSS. Last thing in case it helps, these rules are coming from the iframely plugin :
https://github.com/NodeBB/nodebb-plugin-iframely/blob/master/static/style.lessAny help would be greatly appreciated.
Edit :
Same post here :https://community.nodebb.org/topic/9856/iframely-test/2 -
@hukadan you should be able to do something like
.iframely-link .iframely-container img.thumb { max-width: 21px; }
CSS follows specificity. More specific rules are given precedence.
-
@PitaJ said in [nodebb-plugin-iframely] IFramely Embeds:
@hukadan you should be able to do something like
.iframely-link .iframely-container img.thumb { max-width: 21px; }
Thank you for your answer but it did not work.
CSS follows specificity. More specific rules are given precedence.
My understanding of the
!important
parameter is that it breaks the cascading behaviour and that it is precisely why I can't find a way to modify this using custom CSS. Is this interpretation of the!important
parameter wrong ? Why does it work properly here and not on my test forum ? -
@hukadan sorry about that, looks like I forgot an important:
.iframely-link .iframely-container img.thumb { max-width: 21px !important; }
Important is just another layer of specificity. It can override all lower layers, but if two things are both important, the specificity takes hold again. Is your site public? I'm in a helpful mood, and I'd be glad to make it work for you.
-
I would have bet my house (if I had one) that I already tried what you just wrote. Apparently I did not. It works just fine now ! Thank you !
Now, have you got any idea why the look is still different between my forum and here ? Does it use specific CSS settings for Iframely ?
-
@hukadan I honestly have no idea. I could compare the CSS for you if you want.
-
In my case the only CSS (on the test server) is the one you just wrote.
-
By the way, here is the link : https://forum.zqsd.fr:6664/topic/166/les-bon-plans-pc/161
-
@PitaJ , reading again the thread, I think I find the answer.
@torn2 said in [nodebb-plugin-iframely] IFramely Embeds:
@boomzilla You have options on how the card may look when you use their hosting.
So my guess is that NodeBB forum uses the Iframely service while I am self hosting.
Thank you again, your help was appreciated.
-
@hukadan said in [nodebb-plugin-iframely] IFramely Embeds:
So my guess is that NodeBB forum uses the Iframely service while I am self hosting.
If they are using the service, I'd be curious about their usage stats. Maybe it would get them to implement some of the options I proposed to hide old embeds