Hi,
I have created a setting that the admin can change. I want to display that setting (grabbing it by php and SQL from the database) on a certain page.
Is there a way to position some informational text below the title? Or as a footer under the data display (also: under the details to master record near the bottom of a page)?
I marked some possible placed in the image:
Olaf
How? Add some info text to a certain page?
How? Add some info text to a certain page?
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How? Add some info text to a certain page?
Hi,
for the header you could try to put into the hooks/TALBENAME.php file into the TABLENAME_footer function
for the header you could try to put into the hooks/TALBENAME.php file into the TABLENAME_footer function
Code: Select all
$footer='<script>if ($j(".page-header .row div:first button").length) {
$j("<a> MYTEXT</a>").insertAfter(".page-header button");
}
else {
$j(".page-header a").append("<a> MYTEXT</a>");
}
</script>';
break;
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: How? Add some info text to a certain page?
Hi pbötcher,
thanks for that code, but when I put something in the _footer section, it overwrites the general /hooks/footer-extras.php (where I have placed a general application footer). Do I need to write an extra php-include in the _footer section as well, adding to your code?
Olaf
thanks for that code, but when I put something in the _footer section, it overwrites the general /hooks/footer-extras.php (where I have placed a general application footer). Do I need to write an extra php-include in the _footer section as well, adding to your code?
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How? Add some info text to a certain page?
Hi again,
sorry, solved myself by rtfm: Simply add <%%FOOTER%%> to your return value ...
Does the trick.
Olaf
sorry, solved myself by rtfm: Simply add <%%FOOTER%%> to your return value ...
Code: Select all
$footer='<script>if ($j(".page-header .row div:first button").length) {
$j("<a> MYTEXT</a>").insertAfter(".page-header button");
}
else {
$j(".page-header a").append("<a> MYTEXT</a>");
}
</script><%%FOOTER%%>';
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How? Add some info text to a certain page?
Yep, that helps
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: How? Add some info text to a certain page?
Hi pbötcher,
just to let you know, your code does not seem to work (but the next $j... does - (and that seems good enough for me at this time).
Olaf
just to let you know, your code
Code: Select all
($j(".page-header .row div:first button").length) {
$j("<a> MYTEXT</a>").insertAfter(".page-header button");
}
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How? Add some info text to a certain page?
Hi,
what does not work? In which case. In my test environment it works just fine.
what does not work? In which case. In my test environment it works just fine.
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: How? Add some info text to a certain page?
Hi,
it simply does not show "mytext" - it seems the else is taken always.
I admit, not investigating further as the else condition is - it seems - what I would always want.
But right now I am posting another jquery question that is related to this: viewtopic.php?f=2&t=3104
Olaf
it simply does not show "mytext" - it seems the else is taken always.
I admit, not investigating further as the else condition is - it seems - what I would always want.
But right now I am posting another jquery question that is related to this: viewtopic.php?f=2&t=3104
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How? Add some info text to a certain page?
Hi,
I think the code itself works fine, but is for one setting. As you can have different settings, who you page is displayed (which I do not know) you may of course need to adjust the code to your needs.
This code assumes that you have a combined TV/DV and that you may or may not have the button at the top (next to the header) to add new records.
If e.g. you do not have the button there, of course you will always run through the else path
I think the code itself works fine, but is for one setting. As you can have different settings, who you page is displayed (which I do not know) you may of course need to adjust the code to your needs.
This code assumes that you have a combined TV/DV and that you may or may not have the button at the top (next to the header) to add new records.
If e.g. you do not have the button there, of course you will always run through the else path
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: How? Add some info text to a certain page?
Hi pbötcher,
thank you for your explanation. I found a solution with Jan's help that works quite well for me (and maybe others): viewtopic.php?f=2&t=3104&p=10381#p10381
Olaf
thank you for your explanation. I found a solution with Jan's help that works quite well for me (and maybe others): viewtopic.php?f=2&t=3104&p=10381#p10381
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view