This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <renderingStyle name="default" depends="" defaultColor="#ebe7e4" version="1"> | |
| <!-- DOCUMENTATION: of the rendering syntax: | |
| Elements: | |
| <switch> : Old convention <group>, bundles (groups) a section of <case>, <apply>, and further <switch> levels | |
| <case> : Old convention <filter>, is the analog of (if...else) | |
| <apply> and <apply_if> (synonym) : Old convention <groupFilter>, specifies additional conditions/assignments to their parent filter | |
| - <switch> and <case> can be top level elements, <apply> cannot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Drupal\middlebury_course_hub\Plugin\Group\RelationHandler; | |
| use Drupal\Core\Access\AccessResult; | |
| use Drupal\Core\Entity\EntityInterface; | |
| use Drupal\Core\Session\AccountInterface; | |
| use Drupal\group\Plugin\Group\RelationHandler\AccessControlTrait; | |
| use Drupal\group\Plugin\Group\RelationHandler\AccessControlInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| $file = $argv[1]; | |
| if (!preg_match('#\.html$#', $file)) { | |
| throw new Exception("$file must be a .html file."); | |
| } | |
| if (preg_match('#(.+)sites.middlebury.edu/middmag-old/(.+)#', $file, $pathMatches)) { | |
| $directory = dirname($pathMatches[2]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .mapboxgl-map,.maplibregl-map{-webkit-tap-highlight-color:rgba(0,0,0,0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.mapboxgl-canvas,.maplibregl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen,.maplibregl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass,.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer,.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active,.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this function gets executed | |
| // if the CAS username doesn't match a username in WordPress | |
| function wpcas_nowpuser( $user_name ) { | |
| midd_wpcas_nowpuser($user_name); | |
| // Authenticate again now that the user exists | |
| $wpCAS = new wpCAS; | |
| $wpCAS->authenticate(); | |
| } | |
| function midd_wpcas_nowpuser($username) { | |
| require_once( ABSPATH . WPINC . '/registration.php' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: DynamicAddUsers | |
| Plugin URI: | |
| Description: Replaces the 'Add User' screen with a dynamic search for users and groups | |
| Author: Adam Franco | |
| Author URI: http://www.adamfranco.com/ | |
| */ | |
| global $dynaddusers_db_version; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $nids = \Drupal::entityQuery('node')->condition('type', 'event')->condition('status', 0)->execute(); | |
| $nodes = entity_load_multiple('node', $nids); | |
| foreach ($nodes as $entity) { | |
| $entity->set('moderation_state', 'published'); | |
| if ($entity instanceof RevisionLogInterface) { | |
| $entity->setRevisionLogMessage('Programatically updating workflow state.'); | |
| $entity->setRevisionUserId(\Drupal::currentUser()->id()); | |
| } | |
| $entity->save(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $query = \Drupal::entityQuery('node'); | |
| $query->condition('type', 'story'); | |
| $nids = $query->execute(); | |
| echo "Updating " . count($nids) . " stories:\n"; | |
| $nodes = node_load_multiple($nids); | |
| foreach ($nodes as $node) { | |
| $node->field_aggregate = TRUE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lstat("/home/afranco/directory", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 | |
| lstat("/home/afranco/directory/.git", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 | |
| lstat("/home/afranco/directory/.git/index", {st_mode=S_IFREG|0664, st_size=346, ...}) = 0 | |
| lstat("/home/afranco/directory", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 | |
| lstat("/home/afranco/directory/.git", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 | |
| open("directory/.git", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 36 | |
| lstat("directory/.git/index", {st_mode=S_IFREG|0664, st_size=346, ...}) = 0 | |
| lstat("/home/afranco/directory", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 | |
| lstat("/home/afranco/directory/.git", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 | |
| lstat("/home/afranco/directory/.git/index", {st_mode=S_IFREG|0664, st_size=346, ...}) = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| <!-- LDAP Authentication Configuration --> | |
| <bean id="ldapAuthenticationHandler" | |
| class="org.jasig.cas.authentication.LdapAuthenticationHandler" | |
| p:principalIdAttribute="middleburyCollegeUID" | |
| c:authenticator-ref="authenticator"> | |
| <property name="principalAttributeMap"> | |
| <map> | |
| <!--| This map provides a simple attribute resolution mechanism. |
NewerOlder