The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
-
lramirez
- Veteran Member
- Posts: 85
- Joined: 2019-11-01 23:23
Post
by lramirez » 2024-02-17 19:19
Good morning to the entire forum... (excuse my English

)
I have a question, if someone with knowledge can help me, I want to change the view of the username to the custom name written in the "custom2" like the example shown in the images.
Can someone guide me if this can be done...??
Thank you very much for your help.
-
Attachments
-

- 1login.png (9.22 KiB) Viewed 3011 times
-

- login4.png (39.76 KiB) Viewed 3011 times
-

- login2.png (8.63 KiB) Viewed 3011 times
Luis Ramirez R.
-
pbottcher
- AppGini Super Hero

- Posts: 1709
- Joined: 2018-04-01 10:12
Post
by pbottcher » 2024-02-17 20:36
Hi,
you can add the following code to the hooks/footer-extras.php
Code: Select all
<?php
$mi=getMemberInfo();
?>
<script>
$j('nav .navbar-link').text('<?php echo $mi['custom'][1]; ?>');
</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.
-
lramirez
- Veteran Member
- Posts: 85
- Joined: 2019-11-01 23:23
Post
by lramirez » 2024-02-19 06:21
Thank you very much pböttcher, for the help, I made a correction and it worked as I wanted... Thank you.
Code: Select all
<?php $mi=getMemberInfo(); ?>
<script>
$j('nav .profile-menu-text').text('<?php echo $mi['custom'][1]; ?>');
</script>
Luis Ramirez R.
-
lramirez
- Veteran Member
- Posts: 85
- Joined: 2019-11-01 23:23
Post
by lramirez » 2024-02-29 22:58
Hello...
(excuse my English)
I want to clarify that in order to achieve the result of the query
I made and that was answered by the user
pböttcher, the code:
Code: Select all
<?php $mi=getMemberInfo(); ?>
<script>
$j('nav .profile-menu-text').text('<?php echo $mi['custom'][1]; ?>');
</script>
was placed in /hooks/header-extras.php and it worked.
Thanks for the collaboration.
Luis Ramirez R.
-
xbox2007
- Veteran Member
- Posts: 152
- Joined: 2016-12-16 16:49
Post
by xbox2007 » 2024-03-03 02:58
Nice work
Thanks a lot