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: 2
Joined: Thu Aug 23, 2018 2:13 pm

Main Nav show Buttons based on Login

Post by sun30friend » Thu Aug 23, 2018 3:23 pm

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: 14671
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Main Nav show Buttons based on Login

Post by Thorsten » Thu Aug 23, 2018 7:21 pm

Hi,

what do you want to change?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

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

Re: Main Nav show Buttons based on Login

Post by sun30friend » Fri Aug 24, 2018 7:58 am

i need the ADD FAQ Button only visible when a user is logged into phpmyfaq

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

Re: Main Nav show Buttons based on Login

Post by Thorsten » Sat Aug 25, 2018 5:34 pm

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