Nov 02, 2006, 11:49 PM
If you want your images to open in an ajax popup here is how:
1. Download attachment.
2. Upload the files to your server:
a. Upload the images to your root/image directory.
b. Upload the lightbox.js to your root/jscripts directory.
c. Upload lightbox.css to your root/ directory
3. In your admincp edit the template "headerinclude". You will add these 2 lines in your meta.
4. Edit the template " postbit > postbit_attachments_thumbnails_thumbnail" you will get rid of the target="_blank" and also add rel="lightbox" to the anchor.
Finished code should be this:
Now the only drawback of this is when you don't allow guests to view attachments. The ajax will popup indefinitely until clicked. I will work on a fix for that. For now you can go into your group and change it for "Unregistered / Not Logged In" to allow download of attachments.
You can see working demo here:
http://www.democracyforums.com/showthread.php?tid=2006
If you installed this please post here your site.
1. Download attachment.
2. Upload the files to your server:
a. Upload the images to your root/image directory.
b. Upload the lightbox.js to your root/jscripts directory.
c. Upload lightbox.css to your root/ directory
3. In your admincp edit the template "headerinclude". You will add these 2 lines in your meta.
Code:
<link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="jscripts/lightbox.js"></script>4. Edit the template " postbit > postbit_attachments_thumbnails_thumbnail" you will get rid of the target="_blank" and also add rel="lightbox" to the anchor.
Finished code should be this:
Code:
<a href="attachment.php?aid={$attachment['aid']}" rel="lightbox"><img src="attachment.php?thumbnail={$attachment['aid']}" class="attachment" alt="" /></a> Now the only drawback of this is when you don't allow guests to view attachments. The ajax will popup indefinitely until clicked. I will work on a fix for that. For now you can go into your group and change it for "Unregistered / Not Logged In" to allow download of attachments.
You can see working demo here:
http://www.democracyforums.com/showthread.php?tid=2006
If you installed this please post here your site.
