News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

add a new input box to the profile

Started by johnsonbobby, September 24, 2009, 06:25:33 PM

Previous topic - Next topic

johnsonbobby

i would like to add a second "personal text" option to the profile and also have it display within the post . ( under the avatar )

i attempted to duplicate the code for the "personal text" but that only makes the information show twice .

// Personal text...
echo '
<tr>
<td width="40%"><b>', $txt[228], ': </b></td>
<td><input type="text" name="personalText" size="50" maxlength="50" value="', $context['member']['blurb'], '" /></td>
</tr>
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';


so what do i need to do to get this to work and just not show the same thing twice ?

smp420

"Things turn out best for those who make the best of the way things turn out." -Jack Buck

johnsonbobby


smp420

"Things turn out best for those who make the best of the way things turn out." -Jack Buck

Arantor

It will work just fine on 1.1.10 without any work whatsoever. Just the author hasn't updated the main mod page to say it works in 1.1.10 (since the mod author has to do that)
Holder of controversial views, all of which my own.


johnsonbobby

ok , i downloaded the file and uploaded it to the site .

here is the only error i got . im waiting on the good word from you guys before i do anything else ...

   Execute Modification     ./Sources/ModSettings.php     Test failed

Arantor

Did you put the above code back to how it should be?
Holder of controversial views, all of which my own.


johnsonbobby


Arantor

Please attach that file to your next post.
Holder of controversial views, all of which my own.


johnsonbobby

here is the MODSETTING.PHP file that the error reports for .

Arantor

Remove my Share This Topic mod, install that one, then reinstall Share This Topic.
Holder of controversial views, all of which my own.


johnsonbobby

that worked great !!!!!

thanks a bunch ,

can i ask you one more thing .

the additional fields are right above the post count , i would like it to have a <Br> between them .
where should i place the break ? i keep getting a parse error if i try to do it myself .


johnsonbobby

i should make this alittle more clear .

i would like a break between the post count and custom fields within the posts .

Arantor

Where in Display.template.php are you trying to add them? If you could just post the relevant bit of the file in a [code] tag with where you were trying to add the <br /> tags, we'll show you where they should go.
Holder of controversial views, all of which my own.


johnsonbobby

i would like a break (space) between the end of the custom profile code / before the // show how many posts they have .


// Show the Awards they have.
echo $txt['awards'], ':<br />';
foreach($message['member']['awards'] as $award)
{
echo '<img src="', $boardurl, '/awards/', stripslashes($award['fileName']), '" alt="', stripslashes($award['title']), '" title="', stripslashes($award['title']), '"/>';
}
echo '<br />';
}
global $sourcedir, $messagevars;
$messagevars = $message;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldPosts();

// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';

Arantor

Try replacing: DisplayFieldPosts();

// Show how many posts they have made.


With simply: DisplayFieldPosts();

echo '<br />';
// Show how many posts they have made.
Holder of controversial views, all of which my own.


johnsonbobby

worked like a charm !!

thanks a ton man !

Arantor

Good to know it's all sorted; I'll mark this solved for now but any further concerns please do mark unsolved and reply with what needs fixing.
Holder of controversial views, all of which my own.


Advertisement: