1
Show Posts
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
Messages - memiked
2
Questions / Re: Blob image on Mysql Table not show
Was easy to delete the photos in the interface and upload again to fix the path instead of retyping the path in the database. Better to setup run local lan connections do testing as ip if not using urls from the get go.
http:// 192.168.1.85/radproject
Also check rights on your folders I had the images dir get a 141 instead of 755 for some reason.
3
General Discussion / Re: Mixed form input
Link
Mike
4
Blogs / Re: Custom view components
Checkbox, Single Switch
So in Action on page Yes is Green and No is Red
in displayed field I thought why not same color for text, easy to see Yes in Green
Column "Active" in db hold Yes or No.
in List.php
<?php
if ($data['Active'] == 'NO')
echo "<font color=\"#FF0000\"><strong>NO</strong></font>";
if ($data['Active'] == 'YES')
echo "<font color=\"#00FF00\"><strong>YES</strong></font>";
else
?>
Hopes this helps
5
Blogs / Re: Page Modal component
1)******
Created 2 Tables both with identical columns
Table "CustCur"
Table "CustHist"
|*******
2)******
CustCur - "Add New page" only NO View,Edit,Delete
CustHist - View, Edit and Delete only No "Add Page"
-CustHist has couple extra fields for "file upload" "Notes" and "photo uploads" .
Works as so.
Add new page in "CustCur" in "Page Properties" Action After Add
PHP Statement to Execute insert data to CustHist " $rec_id = $db->insert( 'custhist' , $modeldata); "
|********
- Purpose was page "CustCur" to quickly get Customer demographics, then on site visit "CusHist" get Photos Files..etc
CustCur to do most of the work.
3)******
Now how to get to customer site ? ah need map. OK
Create Field URL or a Button URL "Get Map"
Both CustCur and CustHist must have these columns,
Address-City-Stat-Zipcode and column "MapUrl"
4)******
In View Page, add @ " Action Before View Page" under View Page Properties.
$db->rawQuery("UPDATE quotehist SET MapUrl = CONCAT('https://www.google.com/maps/search/?api=1&query=',`Address`,',',`City`,',',`Stat`,',',`Zipcode`)");
****
Result in field is now a browser link combined from your Address-City-Stat-Zipcode added into column "MapUrl"
"https://www.google.com/maps/search/?api=1&query=1234 Test St,Tester City,,53172"
--------------
*Note: If needed on "CustCur" page to have "Edit Page" and update table "CustHist"
do-
in "Page Properties" Action After Update
PHP Statement to Execute insert data to CustHist.
add these 2 lines below.
$db->where('id' , $rec_id);
$db->update( 'CustHist' , $modeldata );
--------------
and..back up PPM file, database and zip up htdocs\myapp.
6
Blogs / Re: Setting Project Theme
Mobile look..
but first..back up PPM file, database and i zipped up htdocs\myapp.
1)Added these 2 * Meta lines into main_layout.php to remove browser address bar to look more like a mobile app
(add app link to home screen of course fire app link from home screen to make it work)
----
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
added*<meta name="apple-mobile-web-app-capable" content="yes" />
added*<meta name="mobile-web-app-capable" content="yes" />
----
2)For "Mobile Look"
Once app was completed - for "List Page/s" in "Page Design" I changed the "Display Type" from "Tabular List" to "Custom List" for the list page.
"Custom List" looks like a Card view and looks better on mobile devices.
*Next - Copied the list.php file and pasted back into same dir and renamed "list <copy.php" to mlist.php.
so now in app\view\partials\customerlist directory
there are these two files.
list.php <-- for desktop view
mlist.php <-- card view for mobile
Next - Back into interface into "Page Design" and change the "Display Type" back to "Tabular List" for each list.php page I changed.
--------
Hand Work for "Mobile Look" done with interface..
**NEXT Add the logic to change to Mobile view
Under App/Controllers/Customercontroller - your controllers diff name.
in the controller file or file/s
Added these lines as logic to switch only "custom (card) view" when mobile detected.
//page filter command
$tc = $db->withTotalCount();
$records = $db->get('customercurrent', $limit, $fields);
$data = new stdClass;
$data->records = $records;
$data->record_count = count($records);
$data->total_records = intval($tc->totalCount);
if($db->getLastError()){
$this->view->page_error = $db->getLastError();
//ChangeAdd*
}
if(is_mobile()){
$this->view->page_title ="Current Customer";
$this->view->render('assetscurrent/mlist.php' , $data ,'main_layout.php');
}
else{
$this->view->page_title ="Current Customer";
$this->view->render('assetscurrent/list.php' , $data ,'main_layout.php');
}
}
//endAdd*
/**
* View Record Action
* @return View
--------
Small things
Add Icons under "Project Settings"
----
In app\views\layouts\main_layout.php
Changed title echo to my App Name by hand to eliminate getting "Index Index" as App Name
Line #15: <title><?php echo "Customer Help" ?></title>
7
Questions / Re: How to add Logout link into menu?
So I put into the htaccess file "rewritebase/myapp"
I enable the user authentication, found I was hindered with logging in and out during a test build so disabled that for the time being. experienced a blank screen in the build process when going to "review" in the interface, disabled authentication solved that too. Made sense on the test build authentication was last thing to enable and configuring rights for me. Once there Authentication enabled the users "My Account and Logout button was now in the Menu selection.
I found during that process the file "PageAccessManager.php" has the logic to handle the index file with logged in user.
Also I could quickly fine tune some access rights in that file as well, of course editing after the build was completed since through the interface files will be overwritten if not deselected for overwrite. Maybe this helps.
8