How to effectively utilize roles and capabilities in WordPress eludes many developers. Working with them can seem tricky and rigid, but it doesn’t have to be.
This presentation will have a brief overview of roles and capabilities in WordPress and how a developer can create their own. We will then move into a discussion of the user_has_cap and map_meta_cap filters, which enable developers to precisely manipulate capabilities without having to write anything to the database.
DjangoGirls Seoul 2017 11월 세미나에서 발표한 문서입니다.
- 소스 코드 : https://github.com/hannal/pieces-of-django-admin-djangogirls-seoul
- 각종 소식 : https://fb.com/hello.kaycha
How to effectively utilize roles and capabilities in WordPress eludes many developers. Working with them can seem tricky and rigid, but it doesn’t have to be.
This presentation will have a brief overview of roles and capabilities in WordPress and how a developer can create their own. We will then move into a discussion of the user_has_cap and map_meta_cap filters, which enable developers to precisely manipulate capabilities without having to write anything to the database.
DjangoGirls Seoul 2017 11월 세미나에서 발표한 문서입니다.
- 소스 코드 : https://github.com/hannal/pieces-of-django-admin-djangogirls-seoul
- 각종 소식 : https://fb.com/hello.kaycha
Rails, Postgres, Angular, and Bootstrap: The Power StackDavid Copeland
Rails, Postgres, Angular, and Bootstrap are all powerful technologies in and of themselves. When used together, however, you get a powerful web application development stack that reduces friction between what you want for your users and what you can deliver.
This workshop conducted by the team member of Inspire Chittagong (Mizanur Rahaman Mizan and Saad Amin). Workshop was in East Delta Univeristy. There was a session relating to the infos and also another one fully focusing on the practical theme development
The presentation focuses on Rails scaffolding as a good starting point for playing with Ext. The biggest integration task from a Rails point of view is providing the correct JSON data structures that Ext can process - a task that can be solved in a re-usable way. Passing data around between Rails controllers and views and the actual JavaScript code is another focal point.
The presentation features a preview version of Martin Rehfeld's Ext Scaffold Generator, soon to be announced as a official Rails plugin.
by Martin Rehfeld
Slides from my presentation at "What do you know? - Sydney" on using ES6 classes, the current support and a quick touch on how to use them moving forward.
This was a rapid 5 minute presentation so the slides alone aren't overly informative, grab me on Twitter if you've got questions!
The WordPress Administration area is no walk in the park. Just because it’s, perhaps, the most user-friendly of the big CMSs doesn’t necessary make it objectively easy to use. All sorts of things that can seriously break your site are mixed in with trivial options. And, once you start adding robust plugins, things can get complicated fast.
There are many ways to make WordPress more palatable for the common user (see: non-developers) and reduce the risk of big-time accidents. In this session, I’ll show you how easy it is to remove things users don’t need from the admin area—all with your own plugin.
Don’t worry if you haven’t written a plugin before. Not only will I give you the working plugin to start with, but I’ll explain everything along the way.
Let’s make WordPress just a little easier and safer for everyone!
CASL - це бібліотека, що допомогає інтегрувати прості права доступу в зрозумілій формі та розширяти їх з часом.
Оскільки CASL написаний на чистому ES6, то його можна використовувати з довільною ORM, HTTP або UI framework-ом. А допоміжні пакети дозволять інтегруватись без додаткових зусиль.
Що ж особливого в CASL?
1. Декларативна конфігурація
2. Підтримка MongoDB подібних умов
3. Можливість перевіряти права доступу в пам'яті та перетворювати їх в запити до бази
4. Можливість серіалізувати та розшарити права доступу між фронтендом і бекендом або мікросервісами
Clever Joomla! Templating Tips and TricksThemePartner
In this presentation I will show you that it isn't necessary to use an extension for everything you do with Joomla!. By making good use of module & component overrides in combination with clever tricks in your source files, it will be easy to build your own content slider for example. Another thing you can easily do without using extensions is activating Javascript or CSS on specific pages. I challenge you to build a website using a maximum of only one or two frontend extensions after visiting this presentation!
Rails, Postgres, Angular, and Bootstrap: The Power StackDavid Copeland
Rails, Postgres, Angular, and Bootstrap are all powerful technologies in and of themselves. When used together, however, you get a powerful web application development stack that reduces friction between what you want for your users and what you can deliver.
This workshop conducted by the team member of Inspire Chittagong (Mizanur Rahaman Mizan and Saad Amin). Workshop was in East Delta Univeristy. There was a session relating to the infos and also another one fully focusing on the practical theme development
The presentation focuses on Rails scaffolding as a good starting point for playing with Ext. The biggest integration task from a Rails point of view is providing the correct JSON data structures that Ext can process - a task that can be solved in a re-usable way. Passing data around between Rails controllers and views and the actual JavaScript code is another focal point.
The presentation features a preview version of Martin Rehfeld's Ext Scaffold Generator, soon to be announced as a official Rails plugin.
by Martin Rehfeld
Slides from my presentation at "What do you know? - Sydney" on using ES6 classes, the current support and a quick touch on how to use them moving forward.
This was a rapid 5 minute presentation so the slides alone aren't overly informative, grab me on Twitter if you've got questions!
The WordPress Administration area is no walk in the park. Just because it’s, perhaps, the most user-friendly of the big CMSs doesn’t necessary make it objectively easy to use. All sorts of things that can seriously break your site are mixed in with trivial options. And, once you start adding robust plugins, things can get complicated fast.
There are many ways to make WordPress more palatable for the common user (see: non-developers) and reduce the risk of big-time accidents. In this session, I’ll show you how easy it is to remove things users don’t need from the admin area—all with your own plugin.
Don’t worry if you haven’t written a plugin before. Not only will I give you the working plugin to start with, but I’ll explain everything along the way.
Let’s make WordPress just a little easier and safer for everyone!
CASL - це бібліотека, що допомогає інтегрувати прості права доступу в зрозумілій формі та розширяти їх з часом.
Оскільки CASL написаний на чистому ES6, то його можна використовувати з довільною ORM, HTTP або UI framework-ом. А допоміжні пакети дозволять інтегруватись без додаткових зусиль.
Що ж особливого в CASL?
1. Декларативна конфігурація
2. Підтримка MongoDB подібних умов
3. Можливість перевіряти права доступу в пам'яті та перетворювати їх в запити до бази
4. Можливість серіалізувати та розшарити права доступу між фронтендом і бекендом або мікросервісами
Clever Joomla! Templating Tips and TricksThemePartner
In this presentation I will show you that it isn't necessary to use an extension for everything you do with Joomla!. By making good use of module & component overrides in combination with clever tricks in your source files, it will be easy to build your own content slider for example. Another thing you can easily do without using extensions is activating Javascript or CSS on specific pages. I challenge you to build a website using a maximum of only one or two frontend extensions after visiting this presentation!
This presentation emphasis on How to connect a Play Application with Mysql as database in Scala.Play includes a simple data access layer called Anorm that uses plain SQL to interact with the database and provides an API to parse and transform the resulting datasets.
When you move beyond adding simple enhancements to your website with jQuery and start building full-blown client-side applications, how do you organize your code? At this month's Triangle JS Meetup, we'll take a look at patterns for application development using jQuery that promote the principles of tight encapsulation and loose coupling, including classes, the publish/subscribe paradigm, and dependency management and build systems.
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
Drupal 8, page callbacks are completely rewritten by utilizing Symfony Routing component. This session will explain many parts of routing, how to convert from Drupal 7 menu system to Drupal 8 routing system and it will cover how to define local tasks, local actions, and contextual links in Drupal 8.
Building Persona: federated and privacy-sensitive identity for the Web (Open ...Francois Marier
This talk explores the challenges of the existing Web identity solutions and introduce the choices that were made during the development of Persona (formerly BrowserID), a new Open Source federated identity solution from Mozilla, designed and built to respect user privacy.
Writing readable code is one of the most important aspects of web development. A developer should write code which another human is able to understand without the help of too many comments.
This talk will show you how to tidy up your code and write readable PHP.
WordPress currently powers over 1/5th of the internet and is growing. Historically, people think of WordPress as a blogging platform or use it as a CMS, but can this tool known and used by millions of people also be used to create complex applications? WordPress is familiar, easy to use, actively developed and supported, and has a powerful codebase that allows one to quickly develop applications and websites. These things make WordPress a great option to develop you next application. We will walk through examples of WordPress's use to create applications and very complex sites and then dive into the internals of WordPress that make this happen including: Custom Data Types, WordPress Hooks, Database Interactions, Connecting to Remote APIs, The WordPress JSON API, Caching, Extensibility, User and Role Management, Templates, and URL Rewriting.
atrium_username is a Drupal feature for managing user name display:
* a lightweight alternative to realname module;
* "works" before theme layer
* uses the node title of the user profile
Come to this talk prepared to learn about the Doctrine PHP open source project. The Doctrine project has been around for over a decade and has evolved from database abstraction software that dates back to the PEAR days. The packages provided by the Doctrine project have been downloaded almost 500 million times from packagist. In this talk we will take you through how to get started with Doctrine and how to take advantage of some of the more advanced features.
Instagram has become one of the most popular social media platforms, allowing people to share photos, videos, and stories with their followers. Sometimes, though, you might want to view someone's story without them knowing.
Ready to Unlock the Power of Blockchain!Toptal Tech
Imagine a world where data flows freely, yet remains secure. A world where trust is built into the fabric of every transaction. This is the promise of blockchain, a revolutionary technology poised to reshape our digital landscape.
Toptal Tech is at the forefront of this innovation, connecting you with the brightest minds in blockchain development. Together, we can unlock the potential of this transformative technology, building a future of transparency, security, and endless possibilities.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfFlorence Consulting
Quattordicesimo Meetup di Milano, tenutosi a Milano il 23 Maggio 2024 dalle ore 17:00 alle ore 18:30 in presenza e da remoto.
Abbiamo parlato di come Axpo Italia S.p.A. ha ridotto il technical debt migrando le proprie APIs da Mule 3.9 a Mule 4.4 passando anche da on-premises a CloudHub 1.0.
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
Gen Z and the marketplaces - let's translate their needsLaura Szabó
The product workshop focused on exploring the requirements of Generation Z in relation to marketplace dynamics. We delved into their specific needs, examined the specifics in their shopping preferences, and analyzed their preferred methods for accessing information and making purchases within a marketplace. Through the study of real-life cases , we tried to gain valuable insights into enhancing the marketplace experience for Generation Z.
The workshop was held on the DMA Conference in Vienna June 2024.
1. Drupal Sins
How I learned to stop thinking and love sites
that bomb.
By: Aaron Crosman
2. The Goal
Provide a custom authentication solution that
allows staff to have one backend and members
another.
3. The sinful solution
During login form validation check to see if the
user is a staff member, by authenticating the
user, checking their groups, and logging out
staff.
4. Taken from a .module file
/**
* Prevents staff members from logging in outside of staff login page. <<-- Why?
*/
function my_auth_staff_boot($form, &$form_state) { // NOT actually a hook_boot (thankfully) called as login form validator...
user_authenticate($form_state['values']);
global $user;
if (in_array('An Employee', $user->roles)) {
form_set_error($form['#id'], l(t('Staff must log in via staff-login', 'staff-login')), TRUE);
drupal_set_message('Staff must log in via ' . l(t('staff-login', 'staff-login')), 'error', TRUE);
// Load the user pages in case they have not been loaded.
module_load_include('inc', 'user', 'user.pages');
user_logout();
}
}
5. A Better Solution
Mimic LDAP or GAuth Modules’ approaches.
LDAP attaches a validator to the form and
takes over authentication (there are lots of
options so the code there is extensive). The
GAuth module adds a submit button to the form
and handles all processing for that form
directly.
7. GAuth Simplified 2
/**
* Login using google, submit handler
*/
function gauth_login_user_login_submit() {
if (variable_get('gauth_login_client_id', FALSE)) {
// .. skipping resource validation ...
$client = new Google_Client();
// .. skipping client setup ...
$url = $client->createAuthUrl();
// Send the user off to Google for processing
drupal_goto($url);
}
// ... skip errors
}
From there we pass through a menu router from the main module, and an API hook to get...
8. GAuth Simplified 3
function gauth_login_gauth_google_response() {
if (isset($_GET['state'])) {
// Skipping some error traps...
$redirect_url = isset($state['destination']) ? $state['destination'] : '';
if (isset($_GET['code'])) {
// Skipping a bunch of Client setup...
$oauth = new Google_Service_Oauth2($client);
$info = $oauth->userinfo->get();
if ($uid = gauth_login_load_google_id($info['id'])) {
$form_state['uid'] = $uid;
user_login_submit(array(), $form_state); // << That right there!!
}
else {
// Skipping other options....
}
}
drupal_goto($redirect_url); // << be nice and handle the destination parameter
}
}
<<Yeah I know three slides hardly counts as simplified.>>