How to write custom event log in monolog library? - laravel

I am using Laravel to build my web site.I installed monolog library to keep logging.
I want to log for click event.
how can I do this?
Please help.

Clicks happen on front-end side.
If you want to log every page load (PHP call) you can use App::before in app/filters.php to log every request. More information on that here.
If you want to log every click you might want to use Google Analytics' event tracking. Write some JS to handle all click events and send them to ga. More information here.

Related

Integrating Surveyjs with Nativescript + Angular

I am trying to merge surveyjs along with my NativeScript application. I have referred URL for merging the same with Angular application
From the Angular demo code given on website, we have to add event handler for Complete button where we can get the response from surveyjs. Is it possible to integrate similarly for Nativescript Mobile application? Here is the approach which i feel can be taken.
Display
Create a HTML as provided by SurveyJS with required CSS and JS
referenced and add them as a file in project.
Modify HTML once i get the survey question json back from server.
Show the HTML as part of WebView. This will take care of displaying
the survey on my Application.
Here are my challenges during Submission
As per the process given on SurveyJS, i need to add handler for
oncomplete which will get the result json for me. How can i add
handlers for Complete button click in my code? Also please note that
there is a possibility that there may be multiple surveys on a single
page.
Apart from Survey, there are other fields also on the page and user
will submit them all in one go by clicking submit button of the page.
Hence i am planning to hide Complete button provided by SurveyJS
page. This needs to be triggered via code. Can this be done?
If someone can give directions on whether this scenario can be handled in nativescript application with Angular,it would help immensely.
yes it can be done using nativescript-webview-interface plugin.
add jS code inside WebView to handle oncomplete event from surveyJS. and on that function call emit some event to native app. after that add nativescript code to listen for that event and get the JSON back.
inside webView JS function
var oWebViewInterface = window.nsWebViewInterface;
// emit event to native app
oWebViewInterface.emit('anyEvent', jsonData);
inside native App
oWebViewInterface.on('anyEvent', function(jsonData){
// perform action on event
});
for more details on this you can check plugin readme file https://github.com/shripalsoni04/nativescript-webview-interface

ClickFunnels integration with rails2 app

Is there a way to create a page in ClickFunnels(https://www.clickfunnels.com/) website and when I submit that page, I need to store the form details in my rails app(into a particular table). Which means I want to display my database in the clickfunnels integrations list. I googled hours but couldn't get much information on this.
can anyone suggest me if you have done this. A reference link also much appreciated.
We couldn't find any way to do this inside clickfunnels itself, if there is a easy way to add custom systems to their integrations I too look forward to seeing those answers. Until then, here's what we did: We just put our custom form on their page and used ajax to send it back out the end point in our system it needed to hand that data too.
Then, since we also needed to submit the same info to click funnels, we build a fake CF form(I think we actually put one on the page, but used CSS to hide it, then filled it out dynamically from our custom form), and call submit on that form, sending the user through the normal click funnels submission process and sending them to the next page in the funnel.

Fineuploader Validate Event

We have just purchased a licence for fineuploader and it works great.
However, the documentation, after basic setup is rather confusing.
We are trying to handle the validate event but cant find any information about what the event data is such as valid extension etc and how we can inform users about any errors happening in the validation phase.
Would appreciate any assistance
The validate event is documented in quite a bit of detail in the events documentation at http://docs.fineuploader.com/api/events.html#validate.
As the validation documentation says, you can use the validate event to enforce your own custom rules. You are given the name and size of the file in your callback handler. If you need access to more information (such as the actual file), you can declare a submit event callback handler instead. When submit is called, an ID is available for the file, and you can address it using any of the other API methods that require a file ID.
If you only need to validate based on file extension, use the built in validation for that. See the validation config options for more details.
You can display a message to the user however you see fit. The onError callback will be invoked on a validation error. If you are using Fine Uploader UI, the showMessage function will also be invoked with the error message.
Please have a close look at the portions of the documentation linked to above, as well as the live demo that includes validation on the home page.

Joomla execute function on user login

I need to execute a internal php function to insert a record in database when user login in joomla. How can I do this creating on component, plugin or extensior?
the event onUserLogin works on joomla 2.5? thank you.
You would need to create a plugin and use the event hooks in joomla. So trigger the event and it will talk to your plugin and do w/e it is you want in this case take some user details.
I don't know how to help you code it out if you don't post code so here are some good links to take a look at
Documentation on user events ---> http://docs.joomla.org/J1.5:Plugin/Events/User
Documentation on events ---> http://docs.joomla.org/Plugin/Events
Notice a lot are being "moved" so click through the links to get to the new pages and notice the name changes in the deprecated events.
Hope this helps and post back some code for more feed back.

how can we develop ajax application with GWT UI-Binder

As per my project requirement i want to develop an Ajax application with GWT Ui-Binder.. for achieving page refreshing automatically while getting content from database..
Remember: withOut click Refresh button (or) any mouse motion.If u aware about this task...can you please give me with any related exmaple..
if you want to refresh automatic, so you may have any condition where you get event of getting data from database like rpc came on success method etc.. then simply call Window.Location.refresh(); there.

Resources