Open attached images in popup window
This is a really simple template edit. When you click on an attached images, it opens in a popup window.

Open template postbit_attachments_thumbnails_thumbnail.

<a href="attachment.php?aid={$attachment['aid']}" target="_blank">

Replace with:
<a href="attachment.php?aid={$attachment['aid']}" target="_blank" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/attachment.php?aid={$attachment['aid']}', 'attachment', 800, 600); return false;">

You can adjust the width (800) and height (600) to your needs. Users without Javascript enabled will use the default open method (new window/tab) instead.

Demo: (short URL based on this tutorial: Wink)

Forum Jump:

Users browsing this thread: 1 Guest(s)