• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Creating a add-on to insert tabs in profile page (using hooks)

Creating a add-on to insert tabs in profile page (using hooks)

Fuhrmann

Well-known member
#1
Fuhrmann submitted a new resource:

Creating a add-on to insert tabs in profile page (using hooks) (version 1.0) - This tutorial will teach you how to insert new tabs in the profile page using the templates hooks.

This tutorial will teach you how to insert new tabs in the profile page using the templates hooks. You can see a more detailed explanation here: http://xenforo.com/community/threads/how-to-use-template-hooks.13167/

Step 1 - First of all

You have to make sure that your XenForo is in debug mode. To do this, open your config.php (yourForum/library/config.php) and put this line into:

Code:
$config['debug'] = true;
Save it. Close. Go to your AdminCP...
Read more about this resource...
 

Fuhrmann

Well-known member
#2
Fuhrmann updated Creating a add-on to insert tabs in profile page (using hooks) with a new update entry:

Creating a add-on to insert tabs in profile page (using hooks) - Part2

Learn more about conditionals in here: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-182355

You have to read the first part to understand the second.

Some codes of this tutorial I have taken of this addon on. (BTW, its a great addon, i always use)
http://xenforo.com/community/threads/product-xenfans-com-extra-debug.19504/

--------

Ok, so what's up now?

Since we finished our first tutorial we now have a simple tab heading and his...
Read the rest of this update entry...
 

Fuhrmann

Well-known member
#3
Fuhrmann updated Creating a add-on to insert tabs in profile page (using hooks) with a new update entry:

Creating a add-on to insert tabs in profile page (using hooks) - Part 3

In this part we'll be making something more complex. We will be using more PHP code and go throug the XenForo's code.

So before we start, i really recomend you guys to use some IDE for programming in PHP. There is a tutorial made by Kier and you can see it HERE

So, your PHP EDITOR (or something) is ready? Let's go then.

Step 1 - Defining our mission

Remember...
Read the rest of this update entry...
 

Fuhrmann

Well-known member
#4
Fuhrmann updated Creating a add-on to insert tabs in profile page (using hooks) with a new update entry:

Creating a add-on to insert tabs in profile page (using hooks) - Part 4

Hey guys! DaveL just give me some tips about the next part:

Also, I dont know if you planned to create any more tutorials, but another interesting one based on the profile tab with the permissions you went through would be a "member notes" kind of add on.
Usergroups with permissions (admins/mods) can only see the tab on users profiles. Each tab has a text input box similar to that of the "profile posts" tab. Admins/Mods could then post a note which would only show to other Admins/Mods...
Read the rest of this update entry...
 

Fuhrmann

Well-known member
#5
Fuhrmann updated Creating a add-on to insert tabs in profile page (using hooks) with a new update entry:

Creating a add-on to insert tabs in profile page (using hooks) - Part 5

Step 11 - Creating the Model

As explained in the PART 3 of this tutorial:

Fuhrmann said:
Model: In this layer are defined rules of access and manipulation of data, which often stored in databases or files, but nothing indicates that serve accommodation only for persistent data. Can be used for data in volatile memory, eg RAM, although such use does not happen very often. All rules related to treatment, obtaining and validating data must be implemented in this...
Read the rest of this update entry...
 
#8
Yup, I realize it's just an example, but it would be very helpful to have the actual complete code available as an installable addon, as it'd make it much easier to grok some of the finer points if I could actually step through the code in xdebug, etc. and not have to rely on me having copied and pasted all the separate chunks into the right place from all 5 of the tutorials.

But thanks for the pointer to the Profile Tab Manager, it may give me the understanding I need.

Basically, I'm needing to create my own little addon, for displaying some user specific data in an extra tab. The data is links to customer's sites, with backend logins, so support staff can easily login to their sites to provide hands on support. The table is on a separate database connection.

So this tutorial gives me about 80% of what I need.

-- hugh
 
#9
OK, looks like I can do pretty much what I need with the Profile Tab Manager, so that'll do as a quick and dirty solution for my needs. But I'd still like to create my own "from scratch" addon to do it, just for giggles. And getting my XF dev chops going. Just migrated from vB, and have a few mods I need to re-implement on XF for my main site.

-- hugh
 

tyteen4a03

Well-known member
#10
OK, looks like I can do pretty much what I need with the Profile Tab Manager, so that'll do as a quick and dirty solution for my needs. But I'd still like to create my own "from scratch" addon to do it, just for giggles. And getting my XF dev chops going. Just migrated from vB, and have a few mods I need to re-implement on XF for my main site.

-- hugh
Just wondering, what mods do you need to reimplement on xf?
 

LPH

Well-known member
#12
Once this is done on a local machine, what are the steps to package this up for distribution on the XF resource manager? Does an install routine need to be written?
 

Jeremy

Well-known member
#13
Do you add any tables to the database or modify any pre-existing tables? If not, you really only need to export the add-on file, create a .zip file of that + add-on files and upload it.
 

Robust

Well-known member
#17
Just me or does Part 3 not work on this?

  • The following error occurred:
    The controller XenForo_ControllerPublic_Member does not define an action called Userslike.