Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: jensvanherck on December 28, 2009, 03:27:10 PM

Title: making new feature for my forum
Post by: jensvanherck on December 28, 2009, 03:27:10 PM
greeting,

I just have a litle question about making a new feature for user profiles on my forum well I was wondering..
so you have this for example=> /index.php?action=profile;u=1;sa=showPosts
ok so how can I get it to load an other feature by going to a link like => /index.php?action=profile;u=1;sa=submittedlinks

thank you for your time,
Jens Van Herck

Title: Re: making new feature for my forum
Post by: Arantor on December 28, 2009, 03:52:14 PM
At a minimum you need to modify the big array where it defines all the different parts of the menu, then define the function that the subaction would trigger.

Go read Profile.php in the first instance, and take it from there.
Title: Re: making new feature for my forum
Post by: jensvanherck on December 28, 2009, 06:55:29 PM
ok now i have an error showing up Unable to load the 'submittedlinks' template.  but i did add a template fille for that tot the directory of my theme .. what now ?
Title: Re: making new feature for my forum
Post by: Arantor on December 28, 2009, 06:56:21 PM
So what file did you add and what does it contain? Did you call loadTemplate with the appropriate file?
Title: Re: making new feature for my forum
Post by: jensvanherck on December 28, 2009, 07:02:11 PM
ow loadTemplate  :o
Title: Re: making new feature for my forum
Post by: Arantor on December 28, 2009, 07:05:09 PM
What seems to be the problem?
Title: Re: making new feature for my forum
Post by: jensvanherck on December 28, 2009, 07:12:40 PM
ow i fixed it i made a typo in the template function xD but now i see an other problem $context['member']['ID'] doesnt give the member id of whom im viewing the profile
Title: Re: making new feature for my forum
Post by: Arantor on December 28, 2009, 07:34:35 PM
Where do you ever see uppercase in SMF? As per the rest of the stuff in the profile, $context['member']['id'].
Title: Re: making new feature for my forum
Post by: jensvanherck on December 28, 2009, 10:29:28 PM
ah yes i see and i also forget to cut away a LIMIT in the mysql query so it couldnt get any results