Main Nav show Buttons based on Login

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
sun30friend
Posts: 5
Joined: Thu Aug 23, 2018 2:13 pm

Main Nav show Buttons based on Login

Post by sun30friend »

Hi,

i need to change the top Main Nav to show the buttons based on user login like in the DropDown Menu, but don't know where to start.

thanks
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Main Nav show Buttons based on Login

Post by Thorsten »

Hi,

what do you want to change?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sun30friend
Posts: 5
Joined: Thu Aug 23, 2018 2:13 pm

Re: Main Nav show Buttons based on Login

Post by sun30friend »

i need the ADD FAQ Button only visible when a user is logged into phpmyfaq
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Main Nav show Buttons based on Login

Post by Thorsten »

Hi,

add in assets/template/default/index.tpl line 67 to the following code:

Code: Select all

                        [userloggedIn]
                        <li class="{activeAddContent}">{msgAddContent}</li>
                        [/userloggedIn]
In index.php, in after line 633, add the following:

Code: Select all

'msgAddContent' => '<a href="'.$faqSystem->getSystemUri($faqConfig).'addcontent.html">'.$PMF_LANG['msgAddContent'].'</a>',
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply