Ability to add tabs in member's area from plugins or site.inc.php How is this done? I just want to add a single tab for now I am running 3.2.3 now as a beta Thank you
Code: TabMenu::getInstance()->add(new TabMenu_Tab($title, $relative_url,null)); This will add new tab with table title set to $title and redirection url to $relative_url; Path is relative to aMember installation (ie \amember)
ok got that figured out, how do I get the tabs on my new page OR how do I get my new page to show inside member.php page (member.php?tab=newpage
Open member.html and change this: {if $smarty.get.tab eq "add_renew"} {include file="member_add_renew.html"} {elseif $smarty.get.tab eq "payment_history"} {include file="member_payment_history.html"} {elseif $smarty.get.tab eq "newslatter_archive"} {include file="member_newslatter_archive.html"} {else} {include file="member_main.html"} {/if} to this: {if $smarty.get.tab eq "add_renew"} {include file="member_add_renew.html"} {elseif $smarty.get.tab eq "payment_history"} {include file="member_payment_history.html"} {elseif $smarty.get.tab eq "newpage"} {include file="member_newpage.html"} {elseif $smarty.get.tab eq "newslatter_archive"} {include file="member_newslatter_archive.html"} {else} {include file="member_main.html"} {/if} Then, duplicate one of the member_filename.html files and name it member_newpage.html Suggestion for Alex/Amember: 1. member_newslatter_archive.html is misspelled. Should be member_newsletter_archive.html 2. Make it easier to make new tab additions have .active classes.
So, specifically, do we just put this code in at the very top of one of these two pages? Where is the site.inc.php file? Could not find that one, only the plugins.inc.php (which I assume is the other one you are referring too???). Thanx. Claudia Beck
@Claudia: That code is for when you are creating a plugin, or as you point out, in the site.inc.php You can find details on it here: http://manual.amember.com/Using_site.inc.php_and_hooks
Oh. Well, I am not a programmer. So this method won't work for me. I can access the page code though, so if it is a copy & paste deal with the site.inc.php I could do that, but pretty much only that.) This is what I am wanting to do: I had another post here on the forum where I was wishing to create a safelist referral text ad for my members, and wondering how they were to access it. davidm1 (CGI central partner) mentioned that I create a page/subpage for members to access. (http://www.amember.com/forum/showthread.php?t=13145) I assumed they would "access" it by me creating an additional tab in their admin area. If that is not easily possible, then how would I create a way for the members to access it. I have a referral splash page or two I would like them to get to also. Looking at the member's admin page, even if I could add to the "Useful Links" list would be fine. I can edit the html, so maybe I should edit that page template???? Thank you for some direction with this. This is my first time managing an AMember script so I don't know how any of the extra stuff is done yet. Claudia
That is exactly what it can be. For example, to create a tab called "My Tab" that displays the signup page: Code: TabMenu::getInstance()->add(new TabMenu_Tab('My Tab', 'signup.php',null));
Thank you, this has worked perfectly. Is there an easy way to add multiple links to the new tabs like our Affiliate info tab? Also, was wondering if I could change the title on the Affiliate info tab somewhere? Or will that mess up any links to it? Thank you! Claudia
You can get example from tabs.inc.php: PHP: $affiliateTab = new AffiliateTab(_TPL_AFFILIATE_TITLE, 'aff_member.php', null); $affiliateTab->addItem(new TabMenu_Tab_Item(_AFF_GET_BANS_LINKS, 'aff.php?action=links')); $affiliateTab->addItem(new TabMenu_Tab_Item(_AFF_REVIEW_STAT, 'aff.php?action=stats')); $affiliateTab->addItem(new TabMenu_Tab_Item(_AFF_UPDATE_PAYOUT, 'aff.php?action=payout_info')); Also you can change tab title without a problem in language file. need to change this var: _TPL_AFFILIATE_TITLE
I can't seem to get these extra links to work. Do I copy that whole block of code and put it in my site.inc file? Under the: TabMenu::getInstance()->add(new TabMenu_Tab('My Tab', 'signup.php',null)); line? Thanks.
That block is just an example of hos tab with items can be created. Of course you need to modify it depends on exact requirements and place it to site.inc.php