Put new line in text on main screen

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
shasta59
AppGini Super Hero
AppGini Super Hero
Posts: 231
Joined: 2013-01-08 19:40
Location: Calgary, Alberta, Canada

Put new line in text on main screen

Post by shasta59 » 2014-11-30 18:48

Have you ever wanted to put text on two lines - or more - on the main screen? (Where the buttons are to select the various tables you have created).

It is fairly easy to do. Here is my method.

Open up the incCommon.php file and look around line 106 for the function getTableList()

You will see something like my test site code below:

Code: Select all

$arrTables=array(   
			'employee_info'=>array('Employee info', 'Section for employee information', 'table.gif'),
			'incident_report'=>array('Incident report', 'Incident report filing. Report will automatically be sent to the proper individuals.', 'table.gif'),
			'schools'=>array('Schools', 'A list of schools (admin use only)', 'table.gif'),
			'routes'=>array('Routes', 'List of routes at a school. (Admin use only)', 'table.gif'),
			'event_signup'=>array('Event Signup', 'Sign up for safety meetings and other events', 'table.gif'),
			'events'=>array('Events', 'List of events (admin use only)', 'table.gif'),
			'event_type'=>array('Event type', 'Type of event (Admin use only)', 'table.gif')
			);
Take and add in the following to make it put in a return. '."<br />".'

The periods, double quotes must be in there. Here is what my test site code looks like after these additions. Notice I have added a single quote before the first period and one after the last period. Again very important to not miss putting them in.

Code: Select all

$arrTables=array(   
			'employee_info'=>array('Employee info', 'Section for employee information', 'table.gif'),
			'incident_report'=>array('Incident report', 'Incident report filing. Report will automatically be sent to the proper individuals.', 'table.gif'),
			'schools'=>array('Schools', 'A list of schools' ."<br />". '(admin use only)', 'table.gif'),
			'routes'=>array('Routes', 'List of routes at a school.' ."<br />". '(Admin use only)', 'table.gif'),
			'event_signup'=>array('Event Signup', 'Sign up for safety meetings and other events', 'table.gif'),
			'events'=>array('Events', 'List of events' ."<br />". '(admin use only)', 'table.gif'),
			'event_type'=>array('Event type', 'Type of event.' ."<br />". '(Admin use only)', 'table.gif')
			);
Now, on my main screen the text is on two lines.

Any questions just ask. (There are other ways to do this but this is a very quick cheap and dirty way to do it that works). Here is a picture.
Voila_Capture254.jpg
text on two lines
Voila_Capture254.jpg (22.82 KiB) Viewed 2085 times
(Also see my tip on how to centre the text in the boxes).

Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -

Post Reply