adrianmak

Members
  • Content count

    527
  • Joined

  • Last visited

Community Reputation

60 Excellent

About adrianmak

  • Rank
    Hero Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

4,105 profile views
  1. After editing an image (crop, focus, resize,etc), images order cannot be re-arranged by dragging until you clicked the images grid style on the top right hand corner I did try the latest 3.0.98 master version. Is it a bug or normal behavior ? I recorded a video to demonstrate
  2. adrianmak

    thats mean i used the wrong hook?
  3. adrianmak

    i deleted pages on page edit form
  4. I put following code in site/ready.php $this->addHookAfter('Pages::deleteReady', null, function($event) { $p = $event->object; die('page delete'); }); When I delete a page, this hook never run. Should I use the wrong hook for a page delete?
  5. This module only hide pages for non-superuser. But my case is there are certain user roles, i want to hide for a specific user role. The hide pages module will hide all pages for all user roles as they are all non-superuser
  6. I created a page template which which store a copy of user form submission from front-end I created a user role which is responsible to manage these form submission. For example, change a status will send a email acknowledgement to a user. To prevent other irrelevant stuffs to this user role, I would like to hide the Page tab and or hide those irrelevant pages on the pages tree You may said edit the page template access setting. To uncheck view pages for a user role, u have to uncheck the guest user role, this settings affect the front-end too. In other words, all pages cannot view at front-end
  7. adrianmak

    I leaned from @soma ModuleManager process module. The js script is written like that. What I key to learn is to pass variable from php to js. The class might be passed from php The code I wrote is just for learning purpose. Probably make nonsense at all.
  8. adrianmak

    If the code wrapped in a document ready function, how to pass value to a jquery document ready function ? I checked from internet, there is no way to pass parameter to a jquery document ready function
  9. adrianmak

    I wrote a few lines of code to practice. ProcessTest.module <?php class ProcessTest extends Process { function init() { parent::init(); } function ___execute() { $this->config->js("demo", "value passed from process module"); $out = ""; $out .= "<h2 class='tagline'>Process Test module title</h2>"; return $out; } } ProcessTest.js ; (function($, config) { var text = config.demo; $("h2.tagline").addClass("color-red"); console.log(text); })(jQuery, config); ProcessTest.css .color-red { color: #F00; } I could display the string in console.log passed from the module. But the jquery addClass is not working properly. No class added in the selected element.
  10. adrianmak

    How to handle user authentication for some RESTful action like update, delete, insert a record
  11. adrianmak

    Thank you for explanation........
  12. I'm learning how to write my own module. To learn how to write a module, one of method is to read modules developed by other people. Take Module Manager module which is written by @Soma https://github.com/somatonic/ModulesManager/blob/master/ModulesManager.module While I read thru the source, I could not find a javascript thing load statement to load the ModuleManager.js https://github.com/somatonic/ModulesManager/blob/6ddf1f872b17773cff2426e6f196d4d07c6ee709/ModulesManager.module#L173-L175 I could find only these two lines which is output two javascript variables used by ModuleManager.js. It is not to load the ModuleManager.js for this module. https://github.com/somatonic/ModulesManager/blob/6ddf1f872b17773cff2426e6f196d4d07c6ee709/ModulesManager.module#L173-L175 https://github.com/somatonic/ModulesManager/blob/6ddf1f872b17773cff2426e6f196d4d07c6ee709/ModulesManager.module#L173-L175 Anyone could explain how the module load its own ModuleManager.js file ?
  13. adrianmak

    Is it good to fetch all records from database, and using js/jquery lib for pagination and searching ? I was come into a situation, a client's existing website (not developed by me), the implementation for tabular data is fetch all records from database and use js/jquery for pagination and searching. The client asked for a modification to include search for some of other fields from records. Since the search function provided by js lib only search data where columns are populated on the table, other record details not on the columns cannot be search. And the whole tabular data page is fetch from ajax request, for this modification it required to rewrite from scratch for this part. It took too much time to study the code (not using php framework, just vanilla php code) written by others for that modification. And finally I rejected the client's request and asked him to look for someone else for modification
  14. adrianmak

    how do i use it on my own module? any example code?
  15. I see.....................thx