Icy Phoenix
Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - Insert Link "all Images Of .." In Message Profiles
felix968 [ Sun 11 Mar, 2007 00:34 ]
Post subject: 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
lefty74 [ Sun 11 Mar, 2007 17:52 ]
Post subject: 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..
felix968 [ Sun 11 Mar, 2007 20:37 ]
Post subject: Re: Insert Link "all Images Of .." In Message Prof
ok lefty, thank you..
lefty74 [ Sun 08 Apr, 2007 12:40 ]
Post subject: 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 ]--------------------------------
felix968 [ Sun 08 Apr, 2007 16:43 ]
Post subject: 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 ...

lefty74 [ Sun 08 Apr, 2007 16:54 ]
Post subject: 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...
felix968 [ Sun 08 Apr, 2007 17:02 ]
Post subject: 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
lefty74 [ Sun 08 Apr, 2007 17:25 ]
Post subject: 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
felix968 [ Sun 08 Apr, 2007 18:10 ]
Post subject: 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.
lefty74 [ Sun 08 Apr, 2007 21:57 ]
Post subject: 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
felix968 [ Sun 08 Apr, 2007 23:04 ]
Post subject: 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>
lefty74 [ Mon 09 Apr, 2007 04:03 ]
Post subject: 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.
felix968 [ Mon 09 Apr, 2007 08:39 ]
Post subject: 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...
felix968 [ Mon 09 Apr, 2007 08:47 ]
Post subject: Re: Insert Link "all Images Of .." In Message Prof
lefty74 [ Mon 09 Apr, 2007 21:36 ]
Post subject: 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
felix968 [ Mon 09 Apr, 2007 23:44 ]
Post subject: Re: Insert Link "all Images Of .." In Message Prof
the language variables should work from the previous edit, if not, add them to lang_album_main.php
please, help me again...how can i add language variables to lang_album_main.php?
lefty74 [ Tue 10 Apr, 2007 00:32 ]
Post subject: Re: Insert Link "all Images Of .." In Message Prof
are you serious?
all you need to do is basically copy what was done in lang_main and apply it to lang_album_main
anyway here it is
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_album_main.php
#
#-----[ FIND ]------------------------------------------------
#
#
?>
#
#-----[ BEFORE, ADD ]----------------------------------
#
$lang['Show_Pictures_by_user'] = 'Show pictures by user';
Mighty Gorgon [ Tue 10 Apr, 2007 00:37 ]
Post subject: Re: Insert Link "all Images Of .." In Message Prof
Thanks Lefty for your patience.
felix968, please try to put some effort in what you are doing, you cannot ask everything without even trying.
If you need 24 hours support 7 days a week you should consider using some package which can offer this.
We are doing everything for free, and like every open source project users should cooperate in the development.
Please try to think twice before doing requests like this... and make some tests before.