Jump to content

monchu

Members
  • Posts

    93
  • Joined

  • Last visited

Posts posted by monchu

  1. Hi Marvin,

    Apa kabar?

    You can add roles using hook in your ready.php

    $this->addHookAfter('Session::loginSuccess', null, function($event) {
    	$user = $event->wire('user');
    
    	if (($this->wire('user')->notes) == '') $note = "Data belum lengkap";
    	
    	if ((($this->wire('user')->notes) != '') && (!$this->wire('user')->hasRole('new-role'))) {	
    		$user->of(false);
    		$user->addRole('new-role');
    		$user->save();
    		$user->of(true);
    	}
    });

     

  2. 9 hours ago, Marco Ro said:

    Me too was looking to Digital Ocean's, is so interesting service. But I didn't experience and It seems a bit complex to use.

    I'm using DO with basic setup, and it's easy to manage. One droplet for web and one for the database.
    To manage the database, I use Heidi SQL and PuttY for the app.

  3. On 1/12/2021 at 3:10 AM, ryan said:

    Most likely I wouldn't be able to make any more commits to the core if I got run over by a train. I've always thought this was one of the reasons to use open source, ensuring that when someone smacks the tracks, the code doesn't. But it's not just about being open source, the code also has to be clean and well documented so that others can easily take it on board. That's one reason why I put so much effort into code quality and code documentation. My intention is that the code is always ready for others to understand and work with. As for commercial services/modules, it's the same risk inherent with any product or service you pay for. While not open source, the Pro modules do have the same code quality and documentation as the core, and are not obfuscated or encrypted. If it sets your mind at ease, I'm 46 years old (not 76), and am very healthy. I run and lift every day, eat lots of salads, don't eat red meat, and don't participate in any dangerous activities. Most likely I'll be here for at least another 46 years. But if I'm ever derailed then I know the project would still be in good hands.

    46 you're still young Ryan ? I'm 66 this year and active as a martial arts instructor, and I still want to do it for the next 20 years hopefully.

    So you can maintain PW for the next 40 yrs. ?

    • Haha 1
  4. 8 hours ago, kongondo said:

    Here's one for you CSS ladies and gents. I am trying to improve my knowledge (and use!) of CSS Grid and Flex. I have pored over tutorials, both written and visual. However, I have hit a brick wall with something seemingly simple. I would like to overlap two divs as illustrated in the image below. There are two layouts, one slightly different than the other. I would like div two to overlap div one. In the good 'ol days maybe a negative margin and position absolute would have done the trick. I would like to achieve this using CSS Grid and if needed, CSS Flex. I don't care about IE.

    Very easy using css grid no need flex to do that.

    Use z index bigger for div two and use grid-area to locate div one and div two.

    • Like 2
  5. On 12/21/2020 at 2:01 AM, adrian said:

    But, we have these Profields (just talking about Textareas and Combo) to do something that perhaps isn't that beneficial in very many cases. In your address example - how much of a performance advantage will it actually have? What if I also need first_name and last_name fields outside of the address combo field - now I start wondering whether I want a combo address field that includes these, or I want an address field that is just location info, with the first/last name fields separate, or do I just go with all separate fields for ultimate flexibility. 

    I want to share in my use case using FormBuilder, Textareas and Combo. I manage a martial arts association website in Australia. We produce certification for jury and athletes.

    I use Textareas field to store the integers and manipulate those values in Hanna Code and use that code in FormBuilder markup field for the quiz certification.

    Since we have a lot of user types from students, instructors, martial arts schools etc.; this is where Combo field suit to store all members data separated from their user's profile account.

    Doing this way, the user profile data only consists of essential data such as user name, first/last name, email and password etc. Then I can re-use that Combo field in any project as well.

    So in my use case, the combination of FormBuilder, Textareas and Combo are beneficial.

    • Like 1
  6. You only need to create a hidden page with blank template let say settings, then put all settings in that page:

    $page->rootParent()->child('template=settings, include=hidden');

    or put it in _init.php:

    $mySettings = $page->rootParent()->child('template=settings, include=hidden');

  7. Dashboard Tasks

    MD COLLABS, MaxDev Collaboration & Sharing Tool is a simple management task module; a plugin runs on Processwire CMF Framework.

    Available here at https://github.com/sjahrazad/DashboardTasks

    This module allows you to track interactions in your team through your Email application; furthermore, you can collaborate and share your task instantly from the web site.

    This module modified from Kongondo Dashboard Notes at https://processwire.com/talk/topic/20980-dashboard-notes/

    Install

    1. Place the module files in /site/modules/DashboardTasks/
    2. In your admin, click Modules > Check for new modules
    3. There are two modules, the main module is DashboardTasks, and the other one DashboardDocs is an optional module in case you want the users to attach files to their task.
    4. Install DashboardDocs to use both modules, or install DashboardTasks only without the document attachment.

    User Roles

    There are three roles for this module, task-user (co-worker), task-owner (task creator) and task-manager.

    Demo Users

    The installer created five demo users, task-manager, task-owner and three task-coworkers. For the first time log-in user, before using the module, a task manager role required to configure the Global Settings.

    user name: task-manager, password: task-manager, email: task-manager@yourdomainname
    user name: task-owner password: task-owner, email: task-owner@yourdomainname
    user name: task-coworker1 password: task-coworker1, email: task-coworker1@yourdomainname
    user name: task-coworker2 password: task-coworker2, email: task-coworker2@yourdomainname
    user name: task-coworker3 password: task-coworker3, email: task-coworker3@yourdomainname

    Change those emails with your test emails.

    Task Types

    There are three types available for the new task creation. First, is the Notes type. Use this type if you want to share your notes or collaborate the ideas to your members.

    The second type is the core of this module, a Task Scheduler type with start date and due date of the task. If you click the Required Job Acceptance from your task settings, then this task type will become an enquiry or job offer task type.

    The third type is the Reports or Private Notes type. Use this type for your private record or might be you share it to the selected members in your team.

    Usage Scenario

    You can use this module for numerous tasks management purposes, from just a shared idea up to enquiry request type.

    Email or SMS is the primary interface for the user in this module. The user can decide either respond to that email request and log in to the system or just read it in their mailbox.

    If there is no action required from the recipient, then it is not compulsory to log in to the system as well. Responses to the submitted task also will be sent out to the task creator email as well.

    For example, your company use a Call Centre service to capture your customer's enquiries, where the messages will be sent out to your contractors or service providers.

    In this case, your role here is the Task Manager, the call centre agent's role become the Task Owner, someone who created the task and your contractors or service providers are the Task Users.

    Once a contractor received the request and accepted the enquiry's offer, this contractor assigned as the job provider for that task.

    The other scenario usage, for example, you're a property manager who will process your tenant request for fault enquiry to your tradesperson group. Or, a lecturer who wants to arrange a research group with some students.. the list goes on ...

    CSS

    CSS Grid doesn't work in some old browsers. You need to adjust the CSS under Less folder if you want to use this module for old browsers. <details> tag is not working in IE or Edge browser.

    SMS

    If you want the output sent to SMS and Email, you have to add your SMS Provider API to the ProcessDashboardTasks.module. And add your mobile users' array to the SaveTask and SaveTaskReply function.

    • Like 9
  8. Thanks a lot to Kongondo and Szabesz for this module.

    I have a small project on a university website, where they required quite simple task management for their internal research team. They want all actions triggered through emails and SMS because it is not easy to expect the team always log in to their website.

    I did a quick development based on this module and will share and post it in a new thread. 

     

    • Like 5
  9. I'm not sure your questions, though.

    For dynamic documents such as tickets, enquiries etc, I always use this format for page name to make it easier:

    date("ymd-His")."-".$user->id."-"custom-name or updated version

    it will avoid a clash page names and easy to find them for future use.

    • Thanks 1
  10. I have launched my martial arts website at https://merpatiputih.com.au/

    As a martial arts instructor, my problem was how to track student attendance, payment, course modules, and exercise /health progress report etc. and from my part, I need to publish the class event, schedules, location, and exercise modules for that event. 

    For public viewers, I just simply use blog profile module and UIkit. It's very easy and quick to set-up.

    The purpose of this site is for a logged-in member where from their mobile they can check-in to the available class a day before, and update their health record after the class.

    For user front-end, I'm using <region> and delay output. I found this method is really efficient to manage the HTML output, clean and simple. Less headache with templates structure. 

    Below are the functions and modules of this web apps:

    For Course sessions I'm using page reference, Profields Repeater Matrix and Schedule Pages Module.

    Profields Table to generate the student records and reports.

    Calendar for recurring class sessions through the year based on student ranks, selected by user Roles. I only need a simple calendar function (a quick search from the Internet) that able to receive a month and year input. Then, by using region, events field, Profields Repeater Matrix and URL segment it was reduced my time to code complicated function for the event schedule.

    The only thing here that I have to manage in date calculation is the time format, in Australia we use d-m-y. The tricky thing to get Next month (month + 1), I have to modify it to the first week to get a proper next month.

    To avoid inquiry about forgot password or username, student logs in via Facebook Login module.

    Here is the screenshot of student report:
     

    mp-report-cal.png

    mp-report.png

    • Like 16
  11. If you want to learn PHP framework, you can see the list here, PHP Framework list .

    You can develop any web application type using PHP framework. However, you have to develop your user interface from scratch, even for the Administration part. 

    Wordpress or Joomla, is a CMS application. Drupal started as CMS, but at some point, they changed the direction not just as CMS.

    PW is unique though. It is not purely PHP framework nor CMS apps.

    PW gives you the flexibility to some extent to develop non-CMS apps. In PW you get the Admin page as a starting point. From there it is up to you wants to build Website or another type web apps. But you can't change the existing Admin page model. 

    • Like 2
  12. 14 hours ago, Nukro said:

    Hi Guys

    It would be awesome when all the resource about processwire (tutorials, docs, cheatsheet, recipes, videos, api, faq etc...) would be unified on one documentation website called "docs.processwire.com".

    2

    In reality, the unified and structured content can be implemented in the corporate world, not really in the opensource community.

    In opensource community anyone only able to devote a few hours of their times, but it's already a valuable knowledge for someone else.

    Internet technology taught us to change our mindset from structured to unstructured content. From centralised to distributed information. The search engine and bookmark technology help us to manage the unstructured content on our part.

    • Like 4
×
×
  • Create New...