Log in

View Full Version : Adding another Profile box


Thug
10-28-2008, 05:30 PM
hi..how do i add a extra profile box to profiles...
example: Additional Information

how to add another box liek this to profiles

Lynne
10-29-2008, 01:57 AM
You mean the blocks on the right? I know there is an article on how to add Tabs, but I have no seen anything written up on how to add a box. But, I think you just make a new template - copy one of the memberinfo_block_xxx ones and modify for your needs (say, call it memberinfo_block_new) and then make a plugin to call it (the "member_build_blocks_start" hook location should work). This would put it at the template_hook 'profile_right_first' location):
eval('$template_hook[profile_right_first] .= "' . fetch_template('memberinfo_block_new') . '";');

Thug
10-29-2008, 10:26 AM
cheers...i tryed this but to no luck :S

Lynne
10-29-2008, 02:30 PM
Maybe if you posted exactly what you did we would be able to help. Simple saying you tried and had no luck doesn't tell us a thing.

Thug
10-29-2008, 02:50 PM
1. i created the new template called
memberinfo_block_test
i added the plugin

Called "member_build_blocks_start"
eval('$template_hook[profile_right_first] .= "' . fetch_template('memberinfo_block_test') . '";');

i then opened MEMBERINFO
added the block like below
<div id="sidebar_container">
<!-- sidebar -->
$template_hook[profile_right_first]
$blocks[test]
$blocks[stats_mini]
$blocks[test]
$template_hook[profile_right_mini]
$blocks[friends_mini]
$blocks[albums]
$template_hook[profile_right_album]
$blocks[groups]
$blocks[visitors]

$template_hook[profile_right_last]
<!-- / sidebar -->
</div>

Lynne
10-29-2008, 02:55 PM
Do not put anything in MEMBERINFO. We used the plugin to add your template in the 'profile_right_first' location. Post the contents of your template. And, if your template is using variables, we need to see the code for that and let us know which hook you are using for that plugin.

Thug
10-29-2008, 03:05 PM
all i have in my memberinfo_block_test template us the followign code

<td class="tcat" align="center" nowrap="nowrap" width="20%">Test box</td>

see attachment for the "hook"

Lynne
10-29-2008, 03:35 PM
And do you have a link to your profile page?

Also, I think your code will screw things up (or end up in some unknown space). They use divs to put those boxes on that page, not td tags. That's why I recommended copying an existing template.

Thug
10-29-2008, 03:54 PM
<a href="http://77.102.26.22/forum/member.php?u=1" target="_blank">http://77.102.26.22/forum/member.php?u=1</a>

im using the mod Profile Update 0.1 Update profile to look more like facebook/myspace