Clicking either the dark area around the iframe or the x at the top right corner closes the lightbox. The same way it works for default image lightboxes.
Settings
There’s only one setting. You add the domains that you want to have this functionality on there.
Correct, this component will not mess with any whitelisting settings at all.
In order for any iframe to show up in the cooked content of a post - expandable or not - it has to be on the list of allowed_iframes setting like you pointed out.
@Johani is this component still functional? If so, any thoughts on why I am not getting the pop-out diagonal-arrows in the upper-right, but rather a blank/dead box?
Here is what I’ve tried:
Updated themes/components.
Made sure src links were white-listed in the component and the Discourse settings.
Tried a few different links, including Google Maps.
Tried several scenarios with the Media Overlay on/off + Lightbox alone on/off.
thank you very much for conceiving and maintaining this theme component.
After installing it on https://community.hiveeyes.org/ the other day, some users recently started to complain that the overall appearance of the head of the page looked different for them. They finally found out the reason was that they blocked cloudflare altogether, so all requests to https://cdnjs.cloudflare.com/ajax/libs/featherlight/1.7.13/featherlight.min.js would fail.
So, we are humbly asking if there would be a way for you to provide this component in a self-contained variant?
لست على علم بأي مكونات موجودة تقوم بذلك، لذا سيتعين عليك إنشاء واحدة أو تكليف بهذا العمل في فئة Marketplace.
يقوم مكون السمة هذا بالتحقق من iFrame في منشور ويقارن سمة src الخاصة به بـ قائمة المصادر المؤهلة التي يوفرها المسؤول في إعدادات المكون. إذا تطابق نطاق المصدر، فإنه يضيف زر الإضاءة الخفيفة. تتم معالجة عرض الإضاءة الخفيفة بواسطة featherlight.js. يستمع Featherlight إلى النقرات على العناصر التي تحتوي على السمة data-featherlight. إذا تم النقر على أحد هذه العناصر، فإنه يفتح الإضاءة الخفيفة بمحتويات هذا الـ iFrame.
يمكنك فعل الشيء نفسه مع علامات <a> في مكون مختلف مع القليل من الجهد. إذا تطابق href الرابط مع نطاق مدرج في إعدادات المكون، فقم بإضاءته في إطار iFrame. وإلا، اتركه كرابط عادي. لا تريد أن تفتح جميع الروابط في إطار iFrame مضاء.
تمت معالجة معظم العمل المطلوب بالفعل بواسطة هذا المكون، لذا يمكنك فقط نسخه وتعديله والبدء من هناك. لا توجد خطط لإضافة هذه الميزة إلى هذا المكون لأنه مخصص فقط للتعامل مع علامات iFrame في المنشورات.
هل لا يزال هذا المكون يعمل؟ لقد كان يعمل لدي في الماضي ولكنه توقف عن العمل لسبب ما.
يبدو أن آخر تحديث كان قبل 3 سنوات: hnb-ku/discourse-iframe-lightboxes (github.com) لذا من المنطقي افتراض أن شيئًا ما قد تعطل؟
كلا الـ TCs يستخدمان نفس الـ API لتزيين منشور، لذا سيكون ترتيب تثبيتهما ضروريًا. أيضًا، يتم تعيين مصدر الـ iframe ديناميكيًا بمجرد تنزيل الـ PDF وقد لا يكون متاحًا على الفور في هذا الـ TC الخاص بـ IFrame Lighboxes.
التغييرات التي أجريتها هي بشكل أساسي:
البحث عن عناصر iframe في حلقة التشغيل التالية، لذلك يضمن توفر iframe
الانتظار حتى يتم تحميل iframe حتى تتمكن من استرداد عنوان URL للمصدر