In the sample code parts below, italics is EXISTING CODE in the file(s) noted and the bold text is what should be added.
There is already a content type in DaDaBIK named "numeric". If your fields are numeric, I'd just make those fields the numeric content type and add code to business_logic.php to right align those fields (on or about 2833):
if ($field_content == "email"){
$field_to_display = "<a href=\"mailto:".$field_value."\">".$displayed_part."</a>";
} // end if
elseif ($field_content == "numeric"){
$field_to_display = "<div style=\"text-align:right;\">".$displayed_part."</div>";
} // end elseif
elseif ($field_content == "url"){
$field_to_display = "<a href=\"".$field_value."\">".$displayed_part."</a>";
} // end elseif
If you cannot simply use the numeric content type, then I'd suggest adding a new field type to your installation rather than writing code for specific fields (much easier to implement).
To add a new field type, open include/internal_table.php and add your new field type name into the list where you want it to appear:
$int_fields_ar[2][3] = "text/text_right/textarea/rich_editor/password/insert_date/update_date/date/select_single/generic_file/image_file/ID_user/unique_ID";
In this example, I've added the type "text_right" separated by a slash right after the text type. This adds the new type to the drop-down list in the Admin Interface Configurator.
Then open include/business_logic.php and inside the get_field_correct_displaying function (on or about line 2812), add this new field type case:
...case "rich_editor":
$field_to_display = $field_value;
break;
case "text_right":
if ($display_mode == "results_table") {
$field_to_display = "<div style=\"text-align:right;\">".$field_value."</div>";
}
else{
$field_to_display = $field_value;
} // end else
default: // e.g. text, textarea and select sinlge
if ($display_mode === .....
This tells DaDaBIK that whenever it encounters a field which is set to "text_right" and the display is the results table, apply the right-alignment to the text.
Change the fields you want right aligned in the interface configurator to this new type and you're done like dinner.
If you rather want to add a new content type, you need to add the if for the new content type to every field type where the content type could be used. Easier to add field type.