Random
-
Show field when a different selection is made on the same form
function HOOK_form_alter( &$form, &$form_state, $form_id ){
if( $form_id == "user_register_form" || $form_id == "user_profile_form" ) {
// Shows OTHER text field when 'Other' is selected as their specialty
$form["field_specialty_other"]["#states"] = array(
"visible" => arr...
Code
JavaScript
Template Coding
Drupal
2013
-
Make Drupal Module Most Important
So other modules don't supersede your module, run this code once.
<?php
db_query("UPDATE {system} SET weight = 100 WHERE name = 'MODULE_NAME'");
?>...
Code
Template Coding
Drupal
2013
-
Create custom content type
contenttypetest.info
name = Contenttype test
description = Test - how can I create a new content type with hook form?
core = 7.x
files[] = contenttypetest.module;
files[] = contenttypetest.install;
contenttypetest.module
<?php
// hook_form implementation
function contenttypetest_form($node, &$f...
Code
Template Coding
Drupal
2013
-
Output a menu
<?php
$page_menu_items = menu_tree_output(menu_tree_all_data("main-menu"));
echo( drupal_render($page_menu_items) );
?>...
Code
Template Coding
Drupal
2013
-
Similar by Taxonomy
<ul class="item-list">
<?php
$terms_nood = taxonomy_node_get_terms_by_vocabulary($node,6);
$terms = taxonomy_get_tree(6);
foreach($terms as $term){
//$tagged = taxonomy_term_count_nodes($term->tid);
if( $term->name == arg(1) || array_key_exists( $term->tid,$terms_nood ) ){
echo("<li...
Code
Drupal
Template Coding
2014
-
Post referencing setup
Assign multiple disciplines to a project
<?php
// Adds custom post type for Projects and Services
function create_post_type(){
register_post_type('project',
array(
'labels' => array(
'name' => __('Projects'),
'singular_name' => __('Project')
),
'taxonomies' => array('category'),
'public...
Code
Wordpress
2016
-
Device-Responsive Layout
HTML
<meta name="viewport" content="width=device-width, initial-scale=1.0;"/>
CSS
@media (max-width: 480px){
}
@media (max-width: 767px){
#container{
padding: 0 25px;
}
nav ul li a{
font-size: 100%;
padding: 15px 0;
border-radius: 30px;
}
nav ul li ...
Stylesheet Coding
Code
2013
-
Business Researchers
Business Strategy Services Information
Layout & Typography, Site Template & Request Handler, Animated Dropdown Menus, Google Maps Embed, Flash Embed
See also: businessresearchers.com...
Work
Stylesheet Coding
Template Coding
JavaScript
2010
-
Aaron Metals
...
Graphic Design
2003
-
Organic Planner
Private Notes & Organizational Tools
...
Work
Template Coding
Information Structuring
Stylesheet Coding
Drupal
Organic Connectivity Module
Graphic Design
2010
-
Triple Goddess
Collective / Events Microsite
Work
Information Structuring
Template Coding
Stylesheet Coding
Drupal
Graphic Design
2009
-
Cytel
built and styled the contact form (with connectivity to SalesForce)
embedded customized Google maps...
Work
Stylesheet Coding
Google
2009
-
Kimochis Portal
Forum for Users of Educational Toys
Work
Stylesheet Coding
Information Structuring
Template Coding
Drupal
2011
-
Medical Industries America, Inc.
Respiratory Homecare Product Promotion
Photoshop, XHTML, CSS, JavaScript.
2001....
Work
Graphic Design
2001
-
AJAX Remote Read, Local Write
w/JavaScript
//the callback function run after loading JSONp below
function test_results_loaded(data){
//post data to a service via ajax
var xhr = new XMLHttpRequest();
xhr.open("POST", "https://orgnsm@orgnsm.org:lkAGWUE01H@orgnsm.testrail.com//index.php?/api/v2/add_result/1", true);
xhr.setRequestHeader('Cont...
Code
JavaScript
JQuery
2013
-
Organic Interfaces
Portfolio Website
Work
Information Structuring
Template Coding
Stylesheet Coding
Graphic Design
Drupal
Organic Connectivity Module
2011
-
Attributes
Types
2012
-
Rate Your Customer / Rate My Contractor
Work
Wordpress
Stylesheet Coding
PHP
2015
-
RosaPharma
Pharmaceutical Development Services Information
Layout, Typography & Navigation, Semantic XHTML, Site Template & Request Handler [custom built with PHP], drop-down navigation...
Stylesheet Coding
Information Structuring
Template Coding
JavaScript
Work
2010
-
Foster Care Training
Education Service Promotion
Work
Stylesheet Coding
Wordpress
2016
-
Orgnsm (ROOT)
Community Outreach Divisions Catalog
Work
Information Structuring
Stylesheet Coding
JavaScript
Graphic Design
2016
-
OSX Virtual Web Host Config
add line to /etc/hosts
127.0.0.1 amniot.localhost
add lines to /etc/apache2/httpd.conf
NameVirtualHost 127.0.0.1:80
<VirtualHost amniot.localhost:80>
<Directory "/Library/Webserver/Documents_AMNIOT">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
...
Code
Macintosh
2014
-
Lotto-rithm
Algorithm knowledge promotion
Work
Graphic Design
2016
-
LDAP Connect and Bind Test
<?php
$host = "127.0.0.1:10389";
$ldap = ldap_connect($host);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
$username = "uid=admin,ou=system";
$password = "secret";
if( $bind = ldap_bind($ldap, $username, $password) )
echo( "logged into ".$host." as ".$username );
else
echo( "Fa...
Code
Template Coding
PHP
2013
-
MySQL Basics
add export PATH=$PATH:/usr/local/mysql/bin to ~/.bash_profile or /etc/profile
Backup database to text file
mysqldump database_name > database_name.sql
Remove database
mysql> drop database database_name;
Create database
mysql> CREATE DATABASE database_name;...
Code
2014