Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: GC - helmikuu 09, 2006, 10:38:28 IP

Otsikko: I need help with this function
Kirjoitti: GC - helmikuu 09, 2006, 10:38:28 IP
I get the following error:

Fatal error: Call to undefined function: clangroups() in /home/mod/public_html/Sources/Profile.php on line 311

and line 310/311 is:
// Call the appropriate subaction function.
$_REQUEST['sa']($memID);


and what i added above was (Line: 230/231):
$context['profile_areas']['edit_profile']['areas']['forumProfile'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=forumProfile">' . $txt['forumProfile'] . '</a>';
$context['profile_areas']['edit_profile']['areas']['clangroups'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=clangroups">' . $txt['clangroups'] . '</a>';


any idea's?
Otsikko: Re: I need help with this function
Kirjoitti: Dannii - helmikuu 09, 2006, 10:44:57 IP
As it says, there isn't a function called clangroups.
Otsikko: Re: I need help with this function
Kirjoitti: Thantos - helmikuu 09, 2006, 10:45:18 IP
where is clangroups() located?  And is that file being included?
Otsikko: Re: I need help with this function
Kirjoitti: GC - helmikuu 09, 2006, 10:57:15 IP
Well, i'm trying to make another page in the profile section. Like the extra info about the MSN and AIM links and stuff. But this is just info about a clan. But I think I messed something up. I just made another function template_clangroups() in the profile.template.php.
Otsikko: Re: I need help with this function
Kirjoitti: Dannii - helmikuu 09, 2006, 11:02:00 IP
There needs to be a corresponding function in Profile.php
Otsikko: Re: I need help with this function
Kirjoitti: GC - helmikuu 09, 2006, 11:06:04 IP
Can you tell me how?
Otsikko: Re: I need help with this function
Kirjoitti: Dannii - helmikuu 09, 2006, 11:19:58 IP
The template doesn't know what to display unless your function called clangroups tells it what to display.
Otsikko: Re: I need help with this function
Kirjoitti: GC - helmikuu 09, 2006, 11:21:30 IP
but shouldn't it read the profile.template.php file for that info?
Otsikko: Re: I need help with this function
Kirjoitti: Thantos - helmikuu 09, 2006, 11:24:09 IP
Source functions do not belong in the template files.

Go look at my ignore boards mod for an example of how to add another page to the profile.
Otsikko: Re: I need help with this function
Kirjoitti: GC - helmikuu 09, 2006, 11:27:50 IP
ok thanks. I'll look at it tomorrow. I have enough toime for 6 hours of sleep before school. Thanks for the help! (I'll look back here tomorrow)