Hey All,
Does anyone know where to edit the very top header bar. I've tried the header-extras.php hook and other places - can't figure out where this is built from. I have seen screenshots of other folk's applications with extra buttons up here - so I know it's possible.
Trying to insert buttons to the right (or possibly Left) of the Sign In.
Thank you!
Adding New Buttons to Top Header
Re: Adding New Buttons to Top Header
The "Sign In" button is generated in incCommon.php
It will depend on which version of AppGini you are using but in the new V5.5.0 it's the <ul> around line 334 to 362
Look for code around there starting with <ul class="nav navbar-nav">
You should be able to add your additional button in there.
It will depend on which version of AppGini you are using but in the new V5.5.0 it's the <ul> around line 334 to 362
Look for code around there starting with <ul class="nav navbar-nav">
You should be able to add your additional button in there.
-
- Veteran Member
- Posts: 67
- Joined: 2015-06-06 12:10
Re: Adding New Buttons to Top Header
Thanks Peebee! That's it!
For future reference and people looking to do the same, here is the specific section in the inCommon.php;
Cheers
For future reference and people looking to do the same, here is the specific section in the inCommon.php;
Code: Select all
<?php if(!$_GET['signIn'] && !$_GET['loginFailed']){ ?>
<?php if(getLoggedMemberID() == $adminConfig['anonymousMember']){ ?>
<a href="index.php?signIn=1" class="btn btn-success navbar-btn navbar-right"><?php echo $Translation['sign in']; ?></a>
<a href="SOME LINK" class="btn btn-success navbar-btn navbar-right">Test Button</a>
<p class="navbar-text navbar-right">
<?php echo $Translation['not signed in']; ?>
</p>
<?php }else{ ?>
<a class="btn navbar-btn btn-default navbar-right" href="index.php?signOut=1"><i class="glyphicon glyphicon-log-out"></i> <?php echo $Translation['sign out']; ?
></a>
Re: Adding New Buttons to Top Header
Try this in the hooks/header-extra.php file, before the PHP open tag
Code: Select all
<script>
$j(function(){
$j('.navbar-btn').parent().prepend('<a class="btn navbar-btn btn-danger" href="https://www.URL.co.uk/contact-us"><i class="glyphicon glyphicon-envelope"></i> Help Me</a>');
});
</script>
Re: Adding New Buttons to Top Header
Hijmcgov wrote: ↑2019-09-20 23:55Try this in the hooks/header-extra.php file, before the PHP open tag
Code: Select all
<script> $j(function(){ $j('.navbar-btn').parent().prepend('<a class="btn navbar-btn btn-danger" href="https://www.URL.co.uk/contact-us"><i class="glyphicon glyphicon-envelope"></i> Help Me</a>'); }); </script>
I'm trying to insert this but links appear repeated close to every button. I just need only one link
How can I fix it?
thanks
Re: Adding New Buttons to Top Header
Try
Code: Select all
<script>
$j(function(){
$j('.navbar .navbar-right').prepend('<a class="btn navbar-btn btn-danger" href="https://www.URL.co.uk/contact-us"><i class="glyphicon glyphicon-envelope"></i> Help Me</a>');
});
</script>
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Adding New Buttons to Top Header
ahhh 2 links still remain...
PS there's also a list where I can get the icons? They are very nice
PS there's also a list where I can get the icons? They are very nice
- Attachments
-
- extraheader.png (9.12 KiB) Viewed 3707 times
Re: Adding New Buttons to Top Header
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Adding New Buttons to Top Header
thank you so much!!!
Re: Adding New Buttons to Top Header
try
<script>
$j(function(){
$j('ul.nav.navbar-nav.navbar-right.hidden-xs').prepend('<a class="btn navbar-btn btn-danger" href="https://www.URL.co.uk/contact-us"><i class="glyphicon glyphicon-envelope"></i> Help Me</a>');
});
</script>
<script>
$j(function(){
$j('ul.nav.navbar-nav.navbar-right.hidden-xs').prepend('<a class="btn navbar-btn btn-danger" href="https://www.URL.co.uk/contact-us"><i class="glyphicon glyphicon-envelope"></i> Help Me</a>');
});
</script>
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Adding New Buttons to Top Header
It works! thank you very much pböttcher!!!
Re: Adding New Buttons to Top Header
pbottcher, how would you do that code with a pop out window, or better known as a new window
Re: Adding New Buttons to Top Header
Have you tried
in the anchor tag (<a>)?
That is a new window, not a pop up.
~Paul
Code: Select all
target="_blank"
That is a new window, not a pop up.
~Paul