Advertisement:

Author Topic: [Tip] Adding A Biography Section To A Users Profile  (Read 44956 times)

Offline badams

  • Semi-Newbie
  • *
  • Posts: 36
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #20 on: January 11, 2008, 02:27:37 PM »
In testing this I discovered that I only get the error on the member profiles where the biography is empty....they haven't entered anything.....I don't get the error when I view a profile where the member has entered a biography......

Offline Jalkson

  • Jr. Member
  • **
  • Posts: 173
  • Gender: Male
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #21 on: January 11, 2008, 02:37:27 PM »
Check your Who.english.php, and modifications.english.php.

Make sure this code appears.

Code: [Select]
$txt['bio'] = 'Biography';


I'm still really new to all this, but it could be your issue. :P

Offline badams

  • Semi-Newbie
  • *
  • Posts: 36
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #22 on: January 11, 2008, 03:04:54 PM »
When I tested earlier....I meant to state that I had added that line of code to Who.english.php and it took care of the error messages for those profiles that had entered text in the biography field.  However, I was still getting errors for those profiles that were not filled out by members.

Since I had already added

$txt['bio'] = 'Biography';
 
to Who.english.php....I took your suggestion and added the same code to modifications.english.php and I still get the error on those profiles where the member has not entered anything in their biography.



Offline Jalkson

  • Jr. Member
  • **
  • Posts: 173
  • Gender: Male
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #23 on: January 11, 2008, 03:11:41 PM »
What errors are you receiving?  The same as before, but only on the empty profile bios?

Offline badams

  • Semi-Newbie
  • *
  • Posts: 36
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #24 on: January 11, 2008, 03:18:35 PM »
Same Error.......

Offline Jalkson

  • Jr. Member
  • **
  • Posts: 173
  • Gender: Male
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #25 on: January 11, 2008, 03:42:22 PM »
I'm unsure of how to fix the issue.  Seeing as how the OP is still active, it might be in your best interest to either wait and see if he answers, or PM him.

Good luck, and I'll let you know if I figure it out.

Offline badams

  • Semi-Newbie
  • *
  • Posts: 36
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #26 on: January 11, 2008, 04:09:21 PM »
OK....went back to the drawing board and Alan's original code.....

In testing....I discovered that the adding the the code in Who.english.php or modifications.english.php....didn't make any difference what so ever....

Going back to the original code.....the error occurs only on those profiles where members did not fill in the biography......

I did not receive the error when a biography was present......

I feel like I'm a little bit more ahead...but back where I started....

Sounds like it needs an "If" statement somewhere....


Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #27 on: January 11, 2008, 06:05:57 PM »
Guys Guys Guys :)
Listen to me dear @badams @Jalkson,

Believe me I worked on it many times. I did everything.. But still got the same error.
And finally I figured out myself.
Ok I couldn't use BBC now. But it is better taking this error everyday.
Besides, I don't need BBC in biography :)

I wrote to Alan on MSN 3 or 4 weeks ago, and he never turn back to me. So I delete him, and this story end for me.

I am using this tip now, I'm not taking errors. So I am happy :) Thanks Alan for this tip anyway ;)
İnadına SMF 1.1.X

Offline Jalkson

  • Jr. Member
  • **
  • Posts: 173
  • Gender: Male
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #28 on: January 11, 2008, 06:50:07 PM »
Yes, you're fix makes it so the error doesn't show, but technically it isn't a fix.  If all the features aren't working, it isn't fixed. :P

Try pming him on the forums,  he was active today, so I'm sure you might be able to get a hold of him.



Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #29 on: January 11, 2008, 07:22:40 PM »
Yes, you're fix makes it so the error doesn't show, but technically it isn't a fix.  If all the features aren't working, it isn't fixed. :P
But technically it is a fix for me, because I don't need BBC tags really :) :P


Try pming him on the forums,  he was active today, so I'm sure you might be able to get a hold of him.
Maan, I give up.. :)
İnadına SMF 1.1.X

Offline matasanos

  • Jr. Member
  • **
  • Posts: 267
    • Lords-Beer.net
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #30 on: October 02, 2008, 01:30:11 PM »
I Know this topic has not been posted in for too much days..but i have found the solution thanks to woden and a old post

On the default theme Profile.template.php

Look for:

Code: [Select]
// Some more information.
echo '
</td>
</tr><tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>
</tr>

and after that add this:

Code: [Select]
<tr><td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>About Me: </b></td>
<td>', parse_bbc (@$context['member']['options']['about_me']), '</td>
</tr><tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>


The look for:

Code: [Select]
// Website details.
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>
<tr>
<td width="40%"><b>', $txt[83], ': </b><div class="smalltext">', $txt[598], '</div></td>
<td><input type="text" name="websiteTitle" size="50" value="', $context['member']['website']['title'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[84], ': </b><div class="smalltext">', $txt[599], '</div></td>
<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td></tr>';

And after that add:


Code: [Select]
echo '<tr>
<td><b>About Me: </b></td>
<td><textarea name="default_options[about_me]" rows="4" cols="80" class="editor">', @$context['member']['options']['about_me'], '</textarea></td>
</tr>';

It's that easy. Please make backups before you change things. ;D

Offline PHPLearner

  • Semi-Newbie
  • *
  • Posts: 99
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #31 on: July 05, 2009, 10:49:36 PM »
I Know this topic has not been posted in for too much days..but i have found the solution thanks to woden and a old post

On the default theme Profile.template.php

Look for:

Code: [Select]
// Some more information.
echo '
</td>
</tr><tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>
</tr>

and after that add this:

Code: [Select]
<tr><td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>About Me: </b></td>
<td>', parse_bbc (@$context['member']['options']['about_me']), '</td>
</tr><tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>


The look for:

Code: [Select]
// Website details.
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>
<tr>
<td width="40%"><b>', $txt[83], ': </b><div class="smalltext">', $txt[598], '</div></td>
<td><input type="text" name="websiteTitle" size="50" value="', $context['member']['website']['title'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[84], ': </b><div class="smalltext">', $txt[599], '</div></td>
<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td></tr>';

And after that add:


Code: [Select]
echo '<tr>
<td><b>About Me: </b></td>
<td><textarea name="default_options[about_me]" rows="4" cols="80" class="editor">', @$context['member']['options']['about_me'], '</textarea></td>
</tr>';

It's that easy. Please make backups before you change things. ;D

Thanks A Bunch, That Took Care Of It!!!....Woo-Hoo, Used 1.1.9 Also

Offline iiKiller

  • Jr. Member
  • **
  • Posts: 110
  • Gender: Male
    • iKorp Networks
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #32 on: July 07, 2009, 01:40:06 PM »
This is pretty cool ;) How about it for SMF 2.0 anytime? And this as a Mod would be wicked :D

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,159
  • Gender: Male
    • @fragicide on Twitter
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #33 on: July 26, 2009, 01:06:00 AM »
This is pretty cool ;) How about it for SMF 2.0 anytime? And this as a Mod would be wicked :D

Seeing as you have already packaged it as a mod :)
Jason Clemons
Former Lead Customizer/Support Specialist
Twitter | Facebook | Instagram

Offline Alan S

  • Sophist Member
  • *****
  • Posts: 1,250
  • Gender: Male
  • Monkey see Monkey do
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #34 on: July 30, 2009, 07:39:11 PM »
Yeah i just recieved a PM from the SMF customisation team informing me that a mod had been rejected until proof could be provided that permission was given from the original coder to package it as a mod.

iKorp, iiKiller usualy permission is asked for before packaging the mod and the code is not just packaged and submitted as if it is your own work.

I would have had no problem saying you could package it if you had asked me 1st.....
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #35 on: July 31, 2009, 09:07:37 AM »
Sorry :S
Suppose I was just too eager to get it out :P I added you as an author though, proves I wasn't trying to hog it :P Okay then, you'll probably say no now, but; "May I release this packaged mod please Alan?" Once again, sorry for not asking before.

Offline Alan S

  • Sophist Member
  • *****
  • Posts: 1,250
  • Gender: Male
  • Monkey see Monkey do
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #36 on: July 31, 2009, 08:12:16 PM »
Lol , Its no problem.

Yes , I give my permission for IKorp to release this code as a mod.


You should link to this post when your resubmitting this mod or they will reject it again.
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Offline Joshua Dickerson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,777
  • Gender: Male
    • joshuaadickerson on GitHub
    • joshuaadickerson on LinkedIn
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #37 on: September 25, 2009, 02:10:55 PM »
iKorp, did you resubmit it?
Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Offline darrenbeige

  • Jr. Member
  • **
  • Posts: 233
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #38 on: September 25, 2009, 02:28:22 PM »
I solved my promlem myself..
Alan you must change this:
Code: [Select]
<td>', parse_bbc($context['member']['options']['bio']), '</td>
To that:
Code: [Select]
<td>', @$context['member']['options']['bio'], '</td>
and there is no error message again..

If you want bbccode functionality enabled and not have the error, you need to change
Code: [Select]
<td>', parse_bbc($context['member']['options']['bio']), '</td> to
Code: [Select]
<td>', (!empty($context['member']['options']['bio']) ? parse_bbc($context['member']['options']['bio']) : '', '</td>.

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: [Tip] Adding A Biography Section To A Users Profile
« Reply #39 on: September 26, 2009, 01:44:57 PM »
Groundup - I submitted it a while back now, twice (once after getting permission), but it's still not been accepted.

Still - how do you do this for SMF 2.0?