Skip to content

Instantly share code, notes, and snippets.

@emasters
emasters / OGEntity
Last active April 25, 2018 14:41
This array represents an Organic Group entity in Drupal 7.
[10349] => stdClass Object (
[vid] => 10518
[uid] => 1
[title] => Legal Research Community Authority Project - LRCAP
[log] =>
[status] => 1
[comment] => 2
[promote] => 1
[sticky] => 0
[nid] => 10349
@emasters
emasters / linkchecker.php
Created September 27, 2013 19:56
Load this in a browser and give it a page to with a lot of links on it and it will parse the list and check the links. It is hard coded to check 100 links. If you need more, just edit the page. Requires cURL. I found the script at http://www.innvo.com/c/PHP/1278786173-PHP-broken-link-checker.
<?php
class html_parser
{
// A function to convert relative links to absolute links
public function rel2abs($rel,$base)
{
@$p = parse_url($rel);
if(!$rel)
RETURN $base;
if(isset($p['scheme']) && $p['scheme'])
@emasters
emasters / GTWForm.inc
Created September 10, 2013 20:11
This is a basic form for registering for a GoToWebinar webinar. The code can be pasted into a page and it will work. It needs to have the webinar key inserted where indicated. You can get the key from the GTW URL, it is the number that makes up the final element of the registration URL. Some fun styling has been added so the forms look neat on w…
<form action="https://www2.gotomeeting.com/en_US/island/webinar/registration.flow" method="post" name="webinarRegistrationForm">
<div id="regParent" class="regFields">
<input type="hidden" name="Template" value="island/webinar/registration.tmpl">
<input type="hidden" name="Form" value="webinarRegistrationForm">
<input type="hidden" name="WebinarKey" value="##INSERT WEBINAR KEY HERE##">
<input type="hidden" name="ViewArchivedWebinar" value="false">
<input type="hidden" name="registrant" value="">
<input type="hidden" name="RegistrantTimeZoneKey" id="RegistrantTimeZoneKey" value="64">
<div class="formRow">
<span class="error">*</span><label for="Name_First">First Name: </label> <input type="text" name="Name_First" id="Name_First" value="" maxlength="128" class="fis">
@emasters
emasters / CommentPressOnClasscaster.md
Last active December 17, 2015 04:59
Using CommentPress on CALI Classcaster

Using CommentPress on Classcaster

CommentPress is a special theme and plugin for Wordpress that allows you to create a Classcaster blog with social commenting features.

CommentPress Core is an open source theme and plugin for WordPress that allows readers to comment paragraph-by-paragraph, line-by-line or block-by-block in the margins of a text.

Annotate, gloss, workshop, debate: with CommentPress Core you can do all of these things on a finer-grained level, turning a document into a conversation. It can be applied to a fixed document (paper/essay/book etc.) or to a running blog.

Please note that because CommentPress is a complex theme and plugin combo it should be used with a new blog. If you activate CommentPress on an existing blog bad things will happen.