From: 1 Nov, 2006
actionplant wrote:I'd like to figure out how to post a full image from the album in a forum thread. [albumimg] just posts a thumbnail, and because I'm having some server issues the mid-thumbs aren't working. The lightbox will resize other pictures posted remotely with the [img] tag. I'd like to see the same thing happen with pictures from the album, but am not sure how to get images to post full-size in a forum thread.
Help?
Artie wrote:I don't know if this will work exactly as you want but you could try...
OPEN
templates/YOUR_TEMPLATE/bbcode.tpl
FIND
<!-- BEGIN fullalbumimg --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_picm.php?pic_id={IMG_NUM}" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" border="0" /></a><!-- END fullalbumimg -->
REPLACE WITH
<!-- BEGIN fullalbumimg --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_pic.php?pic_id={IMG_NUM}" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" border="0" /></a><!-- END fullalbumimg -->
If you don't want it to link back to the album you can remove the <a> reference.
actionplant wrote:Thanks, I'll give it a shot.
EDIT - Worked like a charm. Thanks!
krisbfunk wrote:I did notice that in FAP 1.4.0a release the fullalbumimg tag was actually displaying a mid thumbnail as apposed to the actual full size..
I "corrected" this by editing bbcode.tpl.. and changing album_picm.php to album_pic.php in the fullalbumimg switch.
in doing so I also discovered the tags: albumimgl, albumimgr, albumimgc (left, right and center)
I did also see a use for the medium thumbnail view, so I duplicated the code and created a medalbumimg tag.. here's everything I did in order to create a medalbumimg tag and a working fullalbumimg tag.. might be of some use? it was fun to do regardless!
Open includes/bbcode.php
find:
- $bbcode_tpl['fullalbumimg'] = str_replace('{IMG_NUM}', '1', $bbcode_tpl['fullalbumimg']);
after, add:
- $bbcode_tpl['medalbumimg'] = str_replace('{IMG_NUM}', '1', $bbcode_tpl['medalbumimg']);
find:
- // [fullalbumimg]image number here[/fullalbumimg]
- $album_img_patterns[5] = "#[fullalbumimg:$uid]([0-9]+)[/fullalbumimg:$uid]#si";
- $album_img_replacements[5] = $bbcode_tpl['fullalbumimg'];
after, add:
- // [medalbumimg]image number here[/fullalbumimg]
- $album_img_patterns[6] = "#[medalbumimg:$uid]([0-9]+)[/medalbumimg:$uid]#si";
- $album_img_replacements[6] = $bbcode_tpl['medalbumimg'];
find:
- $text = preg_replace("#[fullalbumimg]([0-9]+)[/fullalbumimg]#sie", "'[fullalbumimg:$uid]1[/fullalbumimg:$uid]'", $text);
after, add:
- $text = preg_replace("#[medalbumimg]([0-9]+)[/medalbumimg]#sie", "'[medalbumimg:$uid]1[/medalbumimg:$uid]'", $text);
Open Templates/XXXXXX/bbcode.tpl
find:
- <!-- BEGIN fullalbumimg --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_picm.php?pic_id={IMG_NUM}" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" border="0" /></a><!-- END fullalbumimg -->
replace with:
- <!-- BEGIN fullalbumimg --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_pic.php?pic_id={IMG_NUM}" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" border="0" /></a><!-- END fullalbumimg -->
after, add: