| 
 
	| 
     | Page 1 of 2 
 
 |  
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   FAP CUSTOMIZATION - Insert Link "all Images Of .." In Message Profiles 
			Hi,
 
I have another request for you...
 
My users asked me a new option in the message profiles: a link to "all images of", the same link is available in membersist profile....I try to explain you with images below:
    
Thanks in advantage
					  
			
 
 
   |  
	| #1  Sun 11 Mar, 2007 00:34 |  | 
	| Sponsors 
  
   | 
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
  |  |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			Hi, 
 
I have a similar function already on my board.
 
There is already one that links to the personal gallery.
http://www.icyphoenix.com/viewtopic.php?p=6561#p6561 
I will post the code when i have some time to put it in format..
					  
			
 
 
   |  
	| #2  Sun 11 Mar, 2007 17:52 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof 
			ok lefty, thank you..
   
			
 
 
   |  
	| #3  Sun 11 Mar, 2007 20:37 |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			sorry took a while, this should work, based on galaxy21's mod
 #
#-----[ OPEN ]------------------------------------------------
 #
 viewtopic.php
 #
 #-----[ FIND ]------------------------------------------------
 #
 $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
 #
 #-----[ AFTER, ADD ]------------------------------------------
 #
 $sql = "SELECT COUNT(pic_user_id) AS total_pics
 FROM " . ALBUM_TABLE . "
 WHERE pic_user_id = " . $poster_id . "
 AND pic_approval = 1";
 
 if( !($result = $db->sql_query($sql)) )
 {
 message_die(GENERAL_ERROR, 'Could not query total pics information', '', __LINE__, __FILE__, $sql);
 }
 
 $overalltotalpicrow = ($row = $db->sql_fetchrow($result) ) ? intval($row['total_pics']) : 0;
 
 if (  $overalltotalpicrow != 0 )
 {
 $temp_url = append_sid("album.$phpEx?user_id=" . $poster_id . "&mode=" . ALBUM_VIEW_LIST);
 $album_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_album'] . '" alt="' . $lang['Show_Pictures_by_user'] . '" title="' . $lang['Show_Pictures_by_user'] . '" border="0" /></a>';
 $album = '<a href="' . $temp_url . '">' . $lang['Show_Pictures_by_user'] . '</a>';
 
 }
 else
 {
 $album_img = '';
 $album = '';
 }
 #
 #-----[ FIND ]------------------------------------------------
 #
 #
 'PROFILE' => $profile,
 #
 #-----[ AFTER, ADD ]-----------------------------------------
 #
 'ALBUM_IMG' => $album_img,
 'ALBUM' => $album,
 #
 #-----[ OPEN ]------------------------------------------------
 #
 language/lang_english/lang_main.php
 #
 #-----[ FIND ]------------------------------------------------
 #
 #
 // That's all Folks!
 #
 #-----[ AFTER, ADD ]----------------------------------
 #
 
 $lang['Show_Pictures_by_user'] = 'Show pictures by user';
 #
 #-----[ OPEN ]------------------------------------------------
 #
 templates/subSilver/viewtopic_body.tpl
 #
 #-----[ FIND ]------------------------------------------------
 #
 #
 <td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
 #
 #-----[ IN-LINE FIND ]----------------------------------------
 #
 {postrow.PROFILE_IMG}
 #
 #-----[ IN-LINE AFTER, ADD ]----------------------------------
 #
 {postrow.ALBUM_IMG}
 #
 #-----[ SAVE/CLOSE ALL FILES ]--------------------------------
 
  
			
 
 
   |  
	| #4  Sun 08 Apr, 2007 12:40 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof 
			sorry took a while, this should work, based on galaxy21's mod
 
 
On my board (phpbb 2.0.21) with FAP  1.4.1 doesn't work ...      
			
 
 
   |  
	| #5  Sun 08 Apr, 2007 16:43 |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			sorry took a while, this should work, based on galaxy21's mod
 
 
On my board (phpbb 2.0.21) with FAP  1.4.1 doesn't work ...  
 
On my test board (phpbb 2.0.22) with FAP  1.4.1. it did. 
 
Sorry, description of what doesnt work is a bit vague...
					   
			
 
 
   |  
	| #6  Sun 08 Apr, 2007 16:54 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof 
			
On my test board (phpbb 2.0.22) with FAP  1.4.1. it did. 
 
Sorry, description of what doesnt work is a bit vague...
 
Lefty, with your mod when I go in a topic (viewtopic.php), the page is http://www.mysite/forum/viewtopic.php?p=1537#1537, 
but there is only the banner and menu (from the portal), and below link to administration. Not other.
 
I have to say my board is integrated in mkportal 1.1.1
					   
			
 
 
   |  
	| #7  Sun 08 Apr, 2007 17:02 |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			hmm, strange, its not much code to put in. i dont know anything about the mkportal but would have thought that viewtopic is rather similar...
 if u link ur viewtopic.php to here i can have a look
 
   
			
 
 
   |  
	| #8  Sun 08 Apr, 2007 17:25 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof 
			hmm, strange, its not much code to put in. i dont know anything about the mkportal but would have thought that viewtopic is rather similar...
 if u link ur viewtopic.php to here i can have a look
 
Yes, of course...
 
My site is www.oltrelafoto.com 
this is the viewtopic.php page with the mod:
    
and here  are my modified files.
					   
			
 
 
   |  
	| #9  Sun 08 Apr, 2007 18:10 |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			felix, the viewtopic.php works fine on my board (non-portal) after taking some lines out...
 its the viewtopic_body.tpl file that is causing this, can u put one in the link before you did the editing, i.e. one that definitely worked on your board.
 
 thanks
 
   
			
 
 
   |  
	| #10  Sun 08 Apr, 2007 21:57 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof 
			felix, the viewtopic.php works fine on my board (non-portal) after taking some lines out...
 its the viewtopic_body.tpl file that is causing this, can u put one in the link before you did the editing, i.e. one that definitely worked on your board.
 
 thanks
 
Thank a lot Lefty, you're right: is the viewtopic_body.tpl that causing that....I've not problem remiving it from your MOD.
 
The code before editing is:
 
<table width="100%" cellspacing="2" cellpadding="2" border="0">
 
 <tr>
 
 <td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br />
 
 <span class="gensmall"><b>{PAGINATION}</b><br />
 
   </span></td>
 
 </tr>
 
 </table>
 
 
 
 <table width="100%" cellspacing="2" cellpadding="2" border="0">
 
 <tr>
 
 <td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" style="filter:alpha(opacity=65)" onMouseOver="this.filters.alpha.opacity=100" onMouseOut="this.filters.alpha.opacity=65" /></a>   <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" style="filter:alpha(opacity=65)" onMouseOver="this.filters.alpha.opacity=100" onMouseOut="this.filters.alpha.opacity=65" /></a></span></td>
 
 <td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
 
 -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
 
 </tr>
 
 </table>
 
 
 
 <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
 
 <tr align="right">
 
 <td class="catHead" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a>  </span></td>
 
 </tr>
 
 {POLL_DISPLAY}
 
 <tr>
 
 <th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
 
 <th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
 
 </tr>
 
 <!-- BEGIN postrow -->
 
 <tr>
 
 <td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_ONLINE}<br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
 
 <td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
 
 <tr>
 
 <td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span>   {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
 
 <td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
 
 </tr>
 
 <tr>
 
 <td colspan="2"><hr /></td>
 
 </tr>
 
 <tr>
 
 <td colspan="2"><span class="postbody">{postrow.MESSAGE}</span>{postrow.ATTACHMENTS}<span class="postbody">{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
 
 </tr>
 
 </table></td>
 
 </tr>
 
 <tr>
 
 <td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
 
 <td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
 
 <tr>
 
 <td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
 
 
 
 if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
 
 document.write(' {postrow.ICQ_IMG}');
 
 else
 
 document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
 
 
 
 //--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
 
 </tr>
 
 </table></td>
 
 </tr>
 
 <tr>
 
 <td class="spaceRow" colspan="2" height="1"><img src="../../originali/templates/subSilver/templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
 
 </tr>
 
 <!-- END postrow -->
 
 <tr align="center">
 
 <td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
 
 <tr><form method="post" action="{S_POST_DAYS_ACTION}">
 
 <td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
 
 </form></tr>
 
 </table></td>
 
 </tr>
 
 </table>
 
 
 
 <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
 
 <tr>
 
 <td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" style="filter:alpha(opacity=65)" onMouseOver="this.filters.alpha.opacity=100" onMouseOut="this.filters.alpha.opacity=65" /></a>   <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" style="filter:alpha(opacity=65)" onMouseOver="this.filters.alpha.opacity=100" onMouseOut="this.filters.alpha.opacity=65" /></a></span></td>
 
 <td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
 
 -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
 
 <td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
 
 </td>
 
 </tr>
 
 <tr>
 
 <td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
 
 </tr>
 
 </table>
 
 
 
 <table width="100%" cellspacing="2" border="0" align="center">
 
 <tr>
 
 <td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
 
  <br />
 
 {S_TOPIC_ADMIN}</td>
 
 <td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
 
 </tr>
 
 </table>
   
			
 
 
   |  
	| #11  Sun 08 Apr, 2007 23:04 |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			this is some weird file you have. when i paste it into my existing viewtopic_body and save it, it doesnt work, when I extract it and then move to the template folder it seems to work.
 
Anyway, the attached file just worked on my pc.
			 
|
 
	| Description: | very weird |  Download
 |  
	| Filename: | viewtopic_body.zip |  
	| Filesize: | 1.72 KB |  
	| Downloaded: | 282 Time(s) |   
			
 
 
   |  
	| #12  Mon 09 Apr, 2007 04:03 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof 
			this is some weird file you have. when i paste it into my existing viewtopic_body and save it, it doesnt work, when I extract it and then move to the template folder it seems to work.
 Anyway, the attached file just worked on my pc.
 
Yes! Now it work fine!
 
Thank Lefty, very much...
					   
			
 
 
   |  
	| #13  Mon 09 Apr, 2007 08:39 |  | 
	|  felix968  
   
									
			Joined: February 2007 
			Posts: 122 
									Location:     
 |   Re: Insert Link "all Images Of .." In Message Prof   
			
 
 
   |  
	| #14  Mon 09 Apr, 2007 08:47 |  | 
	|  lefty74  
   
									
			Joined: January 2007 
			Posts: 137
									
																		  
 |   Re: Insert Link "all Images Of .." In Message Prof 
			#-----[ OPEN ]------------------------------------------------
#
 #
 album_showpage.php
 #
 #-----[ FIND ]------------------------------------------------
 #
 $template->assign_block_vars('commentrow', array(
 #
 #-----[ BEFORE, ADD ]------------------------------------------
 #
 $sql = "SELECT COUNT(pic_user_id) AS total_pics
 FROM " . ALBUM_TABLE . "
 WHERE pic_user_id = " . $commentrow[$i]['user_id'] . "
 AND pic_approval = 1";
 
 if( !($result = $db->sql_query($sql)) )
 {
 message_die(GENERAL_ERROR, 'Could not query total pics information', '', __LINE__, __FILE__, $sql);
 }
 
 $overalltotalpicrow = ($row = $db->sql_fetchrow($result) ) ? intval($row['total_pics']) : 0;
 
 if (  $overalltotalpicrow != 0 )
 {
 $temp_url = append_sid("album.$phpEx?user_id=" . $commentrow[$i]['user_id'] . "&mode=" . ALBUM_VIEW_LIST);
 $album_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_album'] . '" alt="' . $lang['Show_Pictures_by_user'] . '" title="' . $lang['Show_Pictures_by_user'] . '" border="0" /></a>';
 $album = '<a href="' . $temp_url . '">' . $lang['Show_Pictures_by_user'] . '</a>';
 
 }
 else
 {
 $album_img = '';
 $album = '';
 }
 #
 #-----[ FIND ]------------------------------------------------
 #
 #
 'PROFILE_IMG' => ( $commentrow[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . $profile_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>' : '',
 #
 #-----[ AFTER, ADD ]-----------------------------------------
 #
 'ALBUM_IMG' => $album_img,
 'ALBUM' => $album,
 #
 #-----[ OPEN ]------------------------------------------------
 #
 templates/subSilver/album_showpage_body.tpl
 #
 #-----[ FIND ]------------------------------------------------
 #
 #
 {commentrow.PROFILE_IMG} 
 #
 #-----[ AFTER, ADD ]----------------------------------
 #
 {commentrow.ALBUM_IMG} 
 #
 #-----[ SAVE/CLOSE ALL FILES ]--------------------------------
 
the language variables should work from the previous edit, if not, add them to lang_album_main.php
					   
			
 
 
   |  
	| #15  Mon 09 Apr, 2007 21:36 |  | 
	|     | Page 1 of 2 
 |  
 
 
 
 Was this topic useful?
 
 Was this topic useful?
| Link this topic | 
|---|
 
	| URL |  |  
	| BBCode |  |  
	| HTML |  |  
	| 
			
			
				
			 | 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
 
 |  | 
 
 |  |