Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Possible to add custom tabs to profile?
Avatar
Nate
Member
sp_UserOfflineSmall Offline
Jan 24, 2014 - 7:09 am

I'm installing a shopping cart plugin that comes with an order history page and a page for the customer to re-download their purchases. I would really like to add these two pages to SimplePress' profile page. Is this possible?

If not it would be an awesome feature so you could add custom tabs to the profile and use shortcodes from other plugins or custom pages to display inside the profile.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 24, 2014 - 12:35 pm

Well... it IS possible to add panels and menus to the profile. But, of course, there is coding involved in doing so. But the hooks are there if you are feeling like giving it a go... We can point them out to you.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Nate
Member
sp_UserOfflineSmall Offline
Jan 24, 2014 - 1:08 pm

Yea that'd be great to be pointed in the right direction, thanks.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 24, 2014 - 5:58 pm

Well - I always think the best way to learn is by example so let's start with an easy one. The 'Watches' Simple:Press plugin adds a single panel to the profile form so might be good place to start.

Look at the Watches plugin and find the file /library/sp-watches-components.php

The first two functions in this file are (1) for updating the panel - which may not be appropriate in your requirement... and (2) for adding the tab and menu to the panel.

In the file /forms/sp-watches-manage-form.php

You will find the code for the actual panel display. Of course - again - yours may be easier. I know you mentioned shortcodes but I they coild not be used here - at least I do not think so. it would almost certainly need to be template tags/function calls.

If you trace the above functions back you will find the hooks that they are assigned to... These will be defined in the sp-watches-plugin.php file in the root folder of the plugin.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620