News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

I need help with this function

Started by GC, February 09, 2006, 10:38:28 PM

Previous topic - Next topic

GC

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?

Dannii

As it says, there isn't a function called clangroups.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Thantos

where is clangroups() located?  And is that file being included?

GC

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.

Dannii

There needs to be a corresponding function in Profile.php
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."


Dannii

The template doesn't know what to display unless your function called clangroups tells it what to display.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GC

but shouldn't it read the profile.template.php file for that info?

Thantos

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.

GC

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)

Advertisement: