This topic is locked

Free Plugins for PHPRunner 10.x

7/28/2020 3:00:38 PM
PHPRunner Tips and Tricks
fhumanes author

Hello:
I have created a new Plugin to obtain the Latitude and Longitude coordinates through Javascript of the browser in which an application is working (Geolocation).
It is of use, especially, for applications that work on mobile phones, although it also works on PC browsers.
This and 20 others are free at your disposal on my portal.
In time, if you need any, I can try to see if I can develop it.
Greetings,
Fernando

fhumanes author 9/7/2020

Hello:
I have implemented a new Toggle plugin, which allows fields to be activated or deactivated, similar to the chekbox.
It is based on this javascript library https://www.bootstraptoggle.com/.
You can access to download it on my portal.
Greetings,
fernando

A
acpan 9/7/2020

Thanks, it looks great! Appreciate your work.
May be also have an option to toggle without going into edit mode?
ACP



Hello:
I have implemented a new Toggle plugin, which allows fields to be activated or deactivated, similar to the chekbox.
It is based on this javascript library https://www.bootstraptoggle.com/.
You can access to download it on my portal.
Greetings,
fernando

woodey2002 9/8/2020

Thanks so much!
It's Amazing.
Cheers

J

fhumanes author 9/9/2020

<<<

Thanks, it looks great! Appreciate your work.
May be also have an option to toggle without going into edit mode?
ACP

>>>>
Hello:
I think that from the plugins you cannot do what you indicate.
At least I don't know how to do it.
I can't find good documentation for building plugins.
Greetings,
fernando

A
acpan 9/10/2020

Thanks. I had tried it with this approach in the end and it is great!
I apply to a field called "enabled" in my table.

  1. Set the view as and edit as for the "enabled" field, to the toggle plugin.
  2. Go to Page Designer and set the field to left justify, to prevent it moves slightly left after toggle.
  3. Set the click action on the "enabled" field which we will toggle it.
  4. Add the code to the Tri-part events as follows:
    Client Before events:



params["enabled"] = row.getFieldValue("enabled");

params["record_id"] = row.getFieldValue("id");


Server Event:



$result["record_id"] = $params["record_id"] ;

$result["enabled"] = $params["enabled"];
if ($result["enabled"] == 0 )

{

$result["sql"] = "UPDATE carsusers SET enabled = 1 where id=".$result["record_id"];

}

else

{

$result["sql"] = "UPDATE carsusers SET enabled = 0 where id=".$result["record_id"];

}

DB::Exec($result["sql"]);


Client After Event:


if (result["enabled"] == 0 )

{

row.fieldCell("enabled").bootstrapToggle('on');

result["enabled"] = 1;

}

else

{

row.fieldCell("enabled").bootstrapToggle('off');

result["enabled"] = 0;

}
row.setFieldValue("enabled",result["enabled"] );


Note: if you would like to change the size of toggle to eg. small (instead of default normal size), then you have to edit one time in the toggle js file: bootstrap-toggle.min.js and change the size to small.

M
Mark Kramer 9/12/2020

Thank you Fernando! We really appreciate all your tips and plugins

fhumanes author 9/20/2020

Hello:
I have released a new "Select2" plugin which is a Lookup type object with a search stage. Very good for lookup cases with many values.
I hope you like it.
Regards,

fernando

mbintex 9/21/2020

Looks great
but in the demo
if you search for "Alemania"
you get

  • Alemania twice
  • Rep Alemania democratica
    which does not exist anymore.
    Second is an error in the country list, but do you have countries twice? Or is that an error in the beta?

fhumanes author 9/21/2020



Looks great
but in the demo
if you search for "Alemania"
you get

  • Alemania twice
  • Rep Alemania democratica
    which does not exist anymore.
    Second is an error in the country list, but do you have countries twice? Or is that an error in the beta?


Hello:
There was a problem that in certain circumstances doubled the values. It is now fixed, please download and update the plugin.
Greetings,
fernando

fhumanes author 9/21/2020



Looks great
but in the demo
if you search for "Alemania"
you get

  • Alemania twice
  • Rep Alemania democratica
    which does not exist anymore.
    Second is an error in the country list, but do you have countries twice? Or is that an error in the beta?


Hello:
Regarding the error in the Country catalog, I have seen that there is a "history indicator" field in the table, which I have not used to display the list.
I know that this type of error is very important for you because the Germans have worked hard for reunification and we appreciate all that effort.
Greetings,
fernando

mbintex 9/21/2020

Thank you very much for your continuing efforts.

fhumanes author 10/11/2020

I have updated the Toggle Plugin, which produced an error when trying to show "master" as the header of the record.
I have created the Multiselect2 plugin, at the request of my colleague and friend Raúl Plaza, to add new parameters that set the height and width of the plugin and some changes in the CSS, so that it fits a little better to the Bootstrap style display. This plugin is a modification of the Multiselect, which I have not created.
To download new versions access the Plugins article

A
Abbas 10/11/2020

Many thanks and appreciation to you for making the plugins available for free, you make my day <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=92780&image=1&table=forumreplies' class='bbc_emoticon' alt='B)' />

A
acpan 2/27/2021

Thank you for your great contributions to this community!
I use a toggle switch called Clean Switch, which is sleek and light, with less or no flickering when loading heavy page. It suits very well for PHPR and i use it recently for heavy page.
Clean Switch
Would be nice if you can consider doing a plugin for it in future!
gracias!



I have updated the Toggle Plugin, which produced an error when trying to show "master" as the header of the record.
I have created the Multiselect2 plugin, at the request of my colleague and friend Raúl Plaza, to add new parameters that set the height and width of the plugin and some changes in the CSS, so that it fits a little better to the Bootstrap style display. This plugin is a modification of the Multiselect, which I have not created.
To download new versions access the Plugins article

fhumanes author 2/28/2021



Thank you for your great contributions to this community!
I use a toggle switch called Clean Switch, which is sleek and light, with less or no flickering when loading heavy page. It suits very well for PHPR and i use it recently for heavy page.
Clean Switch
Would be nice if you can consider doing a plugin for it in future!
gracias!



Hello,
I will check the code to see if I am able to do it.
I find it an excellent plugin for mobile applications.
Greetings,

fernando

fhumanes author 3/2/2021



Thank you for your great contributions to this community!
I use a toggle switch called Clean Switch, which is sleek and light, with less or no flickering when loading heavy page. It suits very well for PHPR and i use it recently for heavy page.
Clean Switch
Would be nice if you can consider doing a plugin for it in future!
gracias!


Hello:
The new "Switch" plugins has already been made and is available on my portal:https://fhumanes.com/blog/guias-desarrollo/plugines-de-phprunner/
Greetings,

fernando

A
acpan 3/3/2021

Thank you, fernando!
I quickly did a test, it is great! Loading is instant with no flickering for multiple checkboxes.
Here's sharing my experience after using:

  1. In material mode, the color of the switch is always grey on the list page, even when the checkbox is turned on, however, in IOS mode, it shows green, which is more logical. Maybe this is an intentional design by the clean-switch's author.
    My current workaround, to override the grey color for material mode, go to page designer and set custom css (or edit the css file directly and add !important to the background-color setting):



/* to override the clean switch CSS disable grey color status */

.cl-switch input[type="checkbox"]:checked + .switcher {

background-color: #8591d5 !important;

}


2. On LIST page, the id and name of the checkbox input do not contain any value, as shown below:



<span id="edit4_status" val="0">

<label class="cl-switch ios">

<input type="checkbox" id="" style="text-align:left;" disabled="" name="">

<span class="switcher"></span></label></span>


Maybe for your future update, to also include the values for checkbox input id on the LIST page (just like EDIT page) so we can use jQuery command to toggle it directly, in the case of below scenario.
====== Toggle the checkbox from list page without going into Edit Page =======
Using PHPRunner's Field Click Action, we can toggle the Cleanswitch's plugin checkbox status on the list page, without the need to go into edit page.
First go to Pages->List Page and Click Actions and select the checkbox field, and enter the Click Action events as follows:
Before Client:



params["id"] = row.getFieldValue("id");

params["status"] = row.getFieldValue("status");


Server Event:



$result["id"] = $params["id"] ;

$result["status"] = $params["status"];

if ($result["status"] == 0 ) {

$status_new = 1;

}

else {

$status_new = 0;

}
$result["sql"] = "UPDATE inventory SET status = $status_new WHERE id=".$result["id"];

DB::Exec($result["sql"]);

if ( DB::LastError() ) {

echo DB::LastError().": ".$result["sql"];

}


After Client:



// var id = result["id"];

var status = result["status"];
// Get the span id to find the checkbox within it

var html_row_id = row.recordId()
if ( status == 0) {

// in List page, the default Switch Plugin is set to disabled, so enable it first before check on

$('#edit'+html_row_id+'_status').find(":checkbox").prop("disabled",false).prop("checked",true);



// Note: if we have the id value (as per above suggestion), we can easily toggle the checkbox directly without finding =>

// $('#switch_'+html_row_id).prop("disabled",false).prop("checked",true);



// finally, update the grid value, so we don't need to reload the screen.

row.setFieldValue("status",1);

}

else {

$('#edit'+html_row_id+'_status').find(":checkbox").prop("disabled",false).prop("checked",false);

row.setFieldValue("status", 0);

}


the current version is already very good to use, so the above serve as tips to anyone who may find it useful.
gracias!

fhumanes author 3/4/2021

Hello,
It is already corrected and available for download.
I have also made an example with the new version and I have applied the code that features us and works very well.
I have also left that example so that they can download and try those interested in this plugin.
URL of the article: https://fhumanes.com/blog/actualizacion-plugin-switch-y-ejemplo/
Greetings,

fernando.

fhumanes author 3/4/2021

Hello:
I have updated the plugin:

  • "Summernote"
  • "Trumbowyg"
    In some circumstances they had no full functionality.
    The detail of the changes and the new versions are at: https://fhumanes.com/blog/
    Greetings,

    fernando.

fhumanes author 3/21/2021

Hello:
I have created a new Bootstrap DataPicker plugin (date selector) that contemplates the holidays (so that these days are not selectable).<br/>
In my portal additional information and download of the plugin. https://fhumanes.com/blog/nuevo-plugin-bootstrap-datapicker/
Greetings,

fernando

Tandy 6/12/2021

Question,
How hard would it be to make a plugin almost like date or your time but with Feet and Inches?
So the View page would look like this: 8 FT 6 IN

The Feet scroll anywhere from 0 to 600 FT
The Inches scroll anywhere from 0 to 11 IN

I am looking for something like this because I have a lot of different sizes in my program

Thank You
James

fhumanes author 6/12/2021

Hello James,

For any collaboration / help you want from me, I beg you to communicate through my email. In my email fernandohumanes@gmail.com it is sure I identify all requests and before any questions I can ask you and clarify it. In the forum, I understand that they are for questions and collaborations for any member of the forum and for me, it is more difficult to identify the questions.

As I have written in different articles there are several ways of poducing adequate entries to the problems and surely some of them can solve your need.

Greetings,
fernando

W
wheathcock 7/20/2021

Very Nice!!
Thank you very much for your hard work and thoughtfullness.

All the best,

Wayne