[nodebb-plugin-iframely] IFramely Embeds
-
@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
-
I hope I'm not posting this in the wrong location. I'm trying to run the self hosted iframely to use with my forum. It seems to work fine when I go to the end point of my server in a browser however, when the call is made from Nodebb using the plugin, I see this error in bash. The link is displayed as a normal url in the forum. I'm sure it's just me doing something dumb and not seeing the obvious.
uri.match is not a function
TypeError: res.sendJsonCached is not a function
at respondWithError (/home/user/misc/iframely/app.js:97:9)
at Object.errorHandler [as handle] (/home/user/misc/iframely/app.js:128:7)
at next (/home/user/misc/iframely/node_modules/connect/lib/proto.js:185:17)
at Object.logErrors [as handle] (/home/user/misc/iframely/app.js:58:3)
at next (/home/user/misc/iframely/node_modules/connect/lib/proto.js:185:17)
at next (/home/user/misc/iframely/node_modules/connect/lib/proto.js:187:11)
at next (/home/user/misc/iframely/node_modules/connect/lib/proto.js:195:7)
at Object.handle (/home/user/misc/iframely/app.js:37:3)
at next (/home/user/misc/iframely/node_modules/connect/lib/proto.js:190:15)
at multipart (/home/user/misc/iframely/node_modules/connect/lib/middleware/multipart.js:64:37)If this post belongs elsewhere feel free to shoo me along to the right spot.. Thanks for the help!
-
@teh_g said in [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.
Any way to get traction on this?
I actually go to a point where I tried (and failed terribly) to setup a camo proxy and iframely on a Digital Ocean droplet. I'd love to not have to stumble through trying that again and keep using the service from iFramely.
-
@teh_g Hmm... we didn't actually write the IFramely plugin. Most of the ongoing maintenance is handled by the iframely team themselves, so I'd raise the issue with them to see what the problem is.
It could just be that as you have more content, you have more embeds, and those get loaded by your visitors?
-
@julian said in [nodebb-plugin-iframely] IFramely Embeds:
@teh_g Hmm... we didn't actually write the IFramely plugin. Most of the ongoing maintenance is handled by the iframely team themselves, so I'd raise the issue with them to see what the problem is.
When I asked them about it, they said that most of the hits were from API calls than from iFrames being loaded. This indicated to them that NodeBB is making most of the hits. Here is what they said as well:
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.
@julian said in [nodebb-plugin-iframely] IFramely Embeds:
It could just be that as you have more content, you have more embeds, and those get loaded by your visitors?
That could be a part of it, but that would be a big reason for wanting to age out older embeds. The more we can control for that, the better too. Beyond just age based, maybe add additional parameters, like "any age for first post", "only age out certain content", etc.
-
nodebb-plugin-iframely/library.js at master ยท NodeBB-Community/nodebb-plugin-iframely
Iframely Embeds for NodeBB. Contribute to NodeBB-Community/nodebb-plugin-iframely development by creating an account on GitHub.
GitHub (github.com)
The cache is indeed one day, though it can be changed to be a week, perhaps, if that is better in your opinion.
However, if indeed your NodeBB is crashing often, then the cache is cleared, and it won't matter how far in the future the cache expiry is, since everything in it will be flushed and content pulled anew.
So I have to ask, is your forum crashing often?
-
@julian said in [nodebb-plugin-iframely] IFramely Embeds:
nodebb-plugin-iframely/library.js at master ยท NodeBB-Community/nodebb-plugin-iframely
Iframely Embeds for NodeBB. Contribute to NodeBB-Community/nodebb-plugin-iframely development by creating an account on GitHub.
GitHub (github.com)
The cache is indeed one day, though it can be changed to be a week, perhaps, if that is better in your opinion.
However, if indeed your NodeBB is crashing often, then the cache is cleared, and it won't matter how far in the future the cache expiry is, since everything in it will be flushed and content pulled anew.
So I have to ask, is your forum crashing often?
Luckily my forum doesn't crash . The only time it gets restarted is if there is a plugin update that needs a restart, or for new NodeBB versions.
I'd love to have the option to change the cache in the admin panel. Expanding it to a week would cut down on a lot of API calls. It would also be interesting to see the impact on not caching the expansions at all...
A bigger change / enhancement would be to be able to configure post age for expansion. Basically say if a post is older than x days, or hasn't been updated in x days, don't expand the link at all (even when caching).
Edit: And at least for now, I might manually change that plugin to cache for a week. Would that cause problems when I update the plugin again some day, or will the change just be overwritten?
-
@teh_g said in [nodebb-plugin-iframely] IFramely Embeds:
Edit: And at least for now, I might manually change that plugin to cache for a week. Would that cause problems when I update the plugin again some day, or will the change just be overwritten?
Go ahead, when the change is (eventually) made, it'll conflict, but I presume you know enough about git to realise what's going on and fix it
Alternatively, just
git checkout .
before pulling.... oh, but if you're not using git, but installing via npm, then installing a new version of the plugin will just clobber your changes, so that may be what you want anyway.
-
@julian said in [nodebb-plugin-iframely] IFramely Embeds:
Go ahead, when the change is (eventually) made, it'll conflict, but I presume you know enough about git to realise what's going on and fix it
Alternatively, just
git checkout .
before pulling.... oh, but if you're not using git, but installing via npm, then installing a new version of the plugin will just clobber your changes, so that may be what you want anyway.
I do use npm. Assuming the change I want goes in, I am totally fine with it being clobbered
I am going to work with the Iframely team to see if the cache change does lower API hits. Going from one day to seven could significantly lower my API hits, which would be amazing.
-
-
@torn2 said in [nodebb-plugin-iframely] IFramely Embeds:
@teh_g We self host though...
If Iframely is self-hosted, I suspect it would be something in the config file of Iframely. You would want to set it to force smart frames.
You might be able to open a support ticket with the Iframely folk, they may know better.