Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post
Post FAP CUSTOMIZATION - Full Image In A Forum Thread 
 
Full Image In A Forum Thread

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:
Code: [Download] [Hide]
  1. $bbcode_tpl['fullalbumimg'] = str_replace('{IMG_NUM}', '1', $bbcode_tpl['fullalbumimg']); 


after, add:
Code: [Download] [Hide]
  1. $bbcode_tpl['medalbumimg'] = str_replace('{IMG_NUM}', '1', $bbcode_tpl['medalbumimg']); 



find:
Code: [Download] [Hide]
  1.       
  2.     // [fullalbumimg]image number here[/fullalbumimg]  
  3.     $album_img_patterns[5] = "#[fullalbumimg:$uid]([0-9]+)[/fullalbumimg:$uid]#si";  
  4.     $album_img_replacements[5] = $bbcode_tpl['fullalbumimg'];  
  5.  


after, add:
Code: [Download] [Hide]
  1.     // [medalbumimg]image number here[/fullalbumimg]  
  2.     $album_img_patterns[6] = "#[medalbumimg:$uid]([0-9]+)[/medalbumimg:$uid]#si";  
  3.     $album_img_replacements[6] = $bbcode_tpl['medalbumimg'];  
  4.  



find:
Code: [Download] [Hide]
  1.     $text = preg_replace("#[fullalbumimg]([0-9]+)[/fullalbumimg]#sie", "'[fullalbumimg:$uid]1[/fullalbumimg:$uid]'", $text);  
  2.  


after, add:
Code: [Download] [Hide]
  1.     $text = preg_replace("#[medalbumimg]([0-9]+)[/medalbumimg]#sie", "'[medalbumimg:$uid]1[/medalbumimg:$uid]'", $text);  
  2.  



Open Templates/XXXXXX/bbcode.tpl

find:
Code: [Download] [Hide]
  1. <!-- 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:
Code: [Download] [Hide]
  1. <!-- 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:
Code: [Download] [Hide]
  1. <!-- BEGIN medalbumimg --><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 medalbumimg --> 

 



 
ArtieSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron