If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
-
omphilesithole
- Posts: 26
- Joined: 2015-01-12 13:01
Post
by omphilesithole » 2015-04-14 13:58
i have the following code on my home page and i want to add text that explains each table how can i to that
Code: Select all
<div class="row" id="table_links">
<?php
/* accessible tables */
if(is_array($arrTables) && count($arrTables)){
$i=0;
foreach($arrTables as $tn=>$tc){
$tChkFF = array_search($tn, array());
$tChkHL = array_search($tn, array());
if($tChkHL !== false && $tChkHL !== null) continue;
$searchFirst = (($tChkFF !== false && $tChkFF !== null) ? '?Filter_x=1' : '');
?>
<div align="center" id="<?php echo $tn; ?>-tile" class=" <?php echo ( $block_classes['other']['grid_column']); ?>">
<div class="">
<div class="container1"><br><br><br><br>
<a class="" title="<?php echo preg_replace("/&(#[0-9]+|[a-z]+);/i", "&$1;", htmlspecialchars(strip_tags($tc[1]))); ?>" href="<?php echo $tn; ?>_view.php<?php echo $searchFirst; ?>"><?php echo ($tc[2] ? '<img src="">' : '');?><strong><font size="4"><?php echo $tc[0]; ?></font></strong></a><br><br>
<div class=""><?php echo $tc[1]; ?></div>
</div>
</div>
</div>
<?php
$i++;
}
}else{
?><script>window.location='index.php?signIn=1';</script><?php
}
?>
</div>
-
a.gneady
- Site Admin
- Posts: 1354
- Joined: 2012-09-27 14:46
-
Contact:
Post
by a.gneady » 2015-04-15 08:22
In AppGini, add your explanation text to the "Description" box of the concerned table.
AppGini plugins to add more power to your apps:
-
omphilesithole
- Posts: 26
- Joined: 2015-01-12 13:01
Post
by omphilesithole » 2015-04-15 11:05
Thanks i have sorted it on the pade inccommon.php on the function:
function getTableList($skip_authentication = false){
$arrAccessTables = array();
$arrTables = array(
'crimereport' => array('Incident Reports', 'All Reported Incidents are found here, coming from the Mobile App, Calls and Radio channels', 'table.gif')
}
I have added the description on the second parameter and called it by saying <div class=""><?php echo $tc[1]; ?></div> and it worked!!!
Solved!!!!!!
-
trumedio
- Posts: 5
- Joined: 2015-04-12 21:03
Post
by trumedio » 2015-04-20 22:02
In which file do I see the description text I add to the table or is it stored in the database?
-
peebee
- AppGini Super Hero

- Posts: 356
- Joined: 2013-03-21 04:37
Post
by peebee » 2015-04-20 22:48
You find the generated "Description" text in templates/tablename_templateDV.html
Find the field concerned and you'll see a <div class="alert alert-info"> - see example below. The description text is within the <div> and you can edit and replace it directly if desired.
<span class="help-block collapse" id="fieldname-description"><div class="alert alert-info">This is the Description text you entered in your AppGini project for this particular field</div></span>
-
peebee
- AppGini Super Hero

- Posts: 356
- Joined: 2013-03-21 04:37
Post
by peebee » 2015-04-20 22:56
I just re-read your post and now see that you actually asked where is "the description text I add to the table". Sorry, the info above was for the field description text.
You'll find the table description text in incCommon.php Search for the following code:
function getTableList(){
$arrTables=array(
'yourtablename'=>array('Table Title', 'This is your description.', 'resources/table_icons/table-icon.png')
Hope that helps.
EDIT: that code above is Appgini V5.30. I see in V5.31 it is now:
function getTableList($skip_authentication = false){
$arrAccessTables = array();
$arrTables = array(
'yourtablename'=>array('Table Title', 'This is your description.', 'resources/table_icons/table-icon.png')
as per omphilesithole's post above.