[MOD] Profile link on Avatar and Username

MODs, Hacks, tips and tricks for memberlist, profiles, group members, and team members.
Custom Profile fields Hacks and MODs are also included

How would you rate this mod?

Excellent!
5
71%
Very Good
0
No votes
Good
2
28%
Fair
0
No votes
Poor
0
No votes
Is that the best you can do? Wink
0
No votes
 
Total votes : 7

[MOD] Profile link on Avatar and Username

Postby Handyman on 09 Dec 2006, 12:52

Classification: Add-on
phpBB Part: Forum

MOD Name: Profile link on Avatar and Username
MOD Version: 1.0.0
Author: Handyman
MOD Description: Add Profile link to Avatar and Username in ViewTopic

Works with:
  • phpBB 3.0 BETA 1-4 ALL *

Features:
  • Avatar is now a Link to Profile
  • Username is now a link to Profile

Language: English

Licence: GNU General Public License v2

Screenshots:

Installation Level: Easy
Installation Time: 1/4 Minute
Format: Spoilers
Download File: (Spoilers below].

Profile Link on Avatar
Spoiler:
Code: Select all
#
#-----[ OPEN ]------------------------
#
/styles/*/template/viewtopic_body.html
#
#
#-----[ FIND ]-------------------------
#
{postrow.POSTER_AVATAR}
#
#-----[ REPLACE WITH ]-----------------
#
<a href="{postrow.U_PROFILE}">{postrow.POSTER_AVATAR}</a>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Profile Link on Username
Spoiler:
Code: Select all
#
#-----[ OPEN ]------------------------
#
/styles/*/template/viewtopic_body.html
#
#-----[ FIND ]------------------------
#
{postrow.POSTER_NAME}
#
#-----[ REPLACE WITH ]------------------------
#
<a href="{postrow.U_PROFILE}">{postrow.POSTER_NAME}</a>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Search Engine Friendly (SEO) URLs, AJAX Chat, Display Posts Anywhere, Cash MOD, AJAX Quick Reply, Photo Gallery, MOD Version Check
Image
User avatar
Handyman    
STG Jedi Master
STG Jedi Master
 
Posts: 6608
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Blog: View Blog (1)
Favorite Team: Seattle Seahawks
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby Dace on 18 Jan 2007, 02:20

Hi Handyman,

thanks for your mod... I have a litlle problem.. i use a recent CVS 16 January and i can't find {postrow.POSTER_NAME} in viewtopic_body.htm

Spoiler:
<!-- BEGIN postrow -->
<table class="tablebg" width="100%" cellspacing="1">
<!-- IF postrow.S_FIRST_ROW -->
<tr>
<th>{L_AUTHOR}</th>
<th>{L_MESSAGE}</th>
</tr>
<!-- ENDIF -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

<!-- IF postrow.S_IGNORE_POST -->
<td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
<!-- ELSE -->

<td align="center" valign="middle">
<!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>
<b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b>
</td>
<td width="100%" height="25">
<table width="100%" cellspacing="0">
<tr>
<!-- IF postrow.POST_ICON_IMG -->
<td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
<!-- ENDIF -->
<td class="gensmall" width="100%"><div style="float:left">&nbsp;<b>{L_POST_SUBJECT}:</b> {postrow.POST_SUBJECT}</div><div style="float:right"><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
</tr>
</table>
</td>
</tr>

<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

<td valign="top">
<table cellspacing="4" align="center" width="150">
<!-- IF postrow.ONLINE_IMG -->
<tr>
<td>{postrow.ONLINE_IMG}</td>
</tr>
<!-- ENDIF -->
<!-- IF postrow.RANK_TITLE -->
<tr>
<td class="postdetails">{postrow.RANK_TITLE}</td>
</tr>
<!-- ENDIF -->
<!-- IF postrow.RANK_IMG -->
<tr>
<td>{postrow.RANK_IMG}</td>
</tr>
<!-- ENDIF -->
<!-- IF postrow.POSTER_AVATAR -->
<tr>
<td><a href="{postrow.U_PROFILE}">{postrow.POSTER_AVATAR}</a></td>
</tr>
<!-- ENDIF -->
</table>

<span class="postdetails">
<!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
<!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->


I have tried to put your sentence near {postrow.POST_AUTHOR} but i loose the colour of the member....
Dace
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 163
Joined: 12 Nov 2006, 03:23
Location: France
Favorite Team: Olympique Marseille
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby Handyman on 18 Jan 2007, 03:22

Hmm... as long as you only edit this: {postrow.POST_AUTHOR}, just put the "a" tag on either side of it and it should work fine... as long as you don't miss any open and closing tags, it won't mess up the color.

I don't remember what exactly the A tag had and I don't have time to pull it up... so I'll have to post more details later if that still doesn't work for you.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Search Engine Friendly (SEO) URLs, AJAX Chat, Display Posts Anywhere, Cash MOD, AJAX Quick Reply, Photo Gallery, MOD Version Check
Image
User avatar
Handyman    
STG Jedi Master
STG Jedi Master
 
Posts: 6608
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Blog: View Blog (1)
Favorite Team: Seattle Seahawks
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby Dace on 18 Jan 2007, 06:50

when i put

<a href="{postrow.U_PROFILE}">{postrow.POST_AUTHOR}</a></b>


the link is working but i lost the rank color.... as you say i think the problem is the A tag.. i'm going to search a solution...
Dace
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 163
Joined: 12 Nov 2006, 03:23
Location: France
Favorite Team: Olympique Marseille
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby Dace on 18 Jan 2007, 07:39

found the solution

Spoiler:
FIND

{postrow.POST_AUTHOR}


REPLACE BY

{postrow.POST_AUTHOR_FULL}
Dace
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 163
Joined: 12 Nov 2006, 03:23
Location: France
Favorite Team: Olympique Marseille
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby Highway of Life on 18 Jan 2007, 15:02

Dace, correct me if I'm wrong, but USERNAME_FULL, POST_AUTHOR_FULL (they added a bunch), contain both the colour AND the link to the profile... ?
I've done a bit of testing, and it appears that way on at least some of them.


cherokee red hard-codes Highway_of_Life into phpBB
<ToonArmy>: cherokeered, no more bloat please
User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 9401
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Blog: View Blog (6)
Gender: Male
phpBB Knowledge: 10

Re: [MOD] Profile link on Avatar and Username

Postby Dace on 18 Jan 2007, 15:21

yes you're correct Highway

"you're right" must be better in english lol
Last edited by Dace on 18 Jan 2007, 15:26, edited 1 time in total.
Dace
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 163
Joined: 12 Nov 2006, 03:23
Location: France
Favorite Team: Olympique Marseille
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby Highway of Life on 18 Jan 2007, 15:26

Cool... I thought so... it looked that way on the code, but I wasn't sure if it applied to ALL the username instances (who is online, profile, memberlist, viewtopic, viewforum etc)

Handyman, you might want to update your code with that info... no wait... it's default now, I believe, on the viewtopic template, so all you have to do is change it to ONLY apply to the avatar.


cherokee red hard-codes Highway_of_Life into phpBB
<ToonArmy>: cherokeered, no more bloat please
User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 9401
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Blog: View Blog (6)
Gender: Male
phpBB Knowledge: 10

Re: [MOD] Profile link on Avatar and Username

Postby Handyman on 18 Jan 2007, 17:12

oh... cool.
Thanks for the update Dace... I'll add it later... just doing some quick replies on here and I gotta run.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Search Engine Friendly (SEO) URLs, AJAX Chat, Display Posts Anywhere, Cash MOD, AJAX Quick Reply, Photo Gallery, MOD Version Check
Image
User avatar
Handyman    
STG Jedi Master
STG Jedi Master
 
Posts: 6608
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Blog: View Blog (1)
Favorite Team: Seattle Seahawks
Gender: Male

Re: [MOD] Profile link on Avatar and Username

Postby silencer0 on 12 Feb 2007, 01:36

cool thanks really usefull Grin
Proud to be working on : - Extended Warning Mod Grin
User avatar
silencer0
Ensign
Ensign
 
Posts: 86
Joined: 10 Feb 2007, 05:08
Gender: Male

Next

Return to Memberlist and Profiles

Who is online

Users browsing this forum: ccBot [Bot], X-QlusioN and 3 guests