This file contains 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
p.interact a { | |
background:url("twitter-sprite.png"); /* Obviously make sure that twitter-sprite.png is included in your template! */ | |
display: inline-block; | |
height: 20px; | |
width: 20px; | |
text-indent: -9999px; | |
} | |
p.interact a.twitter_reply_icon, | |
p.interact a.twitter_retweet_icon, | |
p.interact a.twitter_fav_icon { |
This file contains 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
<? | |
/** | |
* Some custom code written by Fred that will pull in all the photos in given photosets | |
*/ | |
// First we Add some custom styles! Not ideal, and not compliant but quick and easy! ?> | |
<style> | |
ul.flickr-photos, | |
ul.flickr-photos li { | |
list-style:none; |
This file contains 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 | |
/** | |
* Update Custom Terms | |
* | |
* @author Fred Bradley <@fredbradley> | |
* @version 1.0 | |
* @since Since Release 1.0.0 | |
*/ | |
function update_station_tag_list($post_id) { | |
This file contains 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 | |
/** | |
* get youtube video ID from URL | |
* | |
* @param string $url | |
* @return string Youtube video id or FALSE if none found. | |
*/ | |
function youtube_id_from_url($url) { | |
$pattern = | |
'%^# Match any youtube URL |
This file contains 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 | |
/** | |
* How this works: While writing content in the Wordpress editor. Simply add a twitter handle without a link but with the @ symbol. | |
* EG: "Here is some content written by @FredBradley" would turn into "Here is some content written by <i class="fa fa-fw fa-twitter"></i><a href="https://twitter.com/intent/user/?screen_name=@FredBradley">@FredBradley</a>" | |
* | |
* Notes: For this snippet to work 100% as intended it requires two things. | |
* 1. You need to have Font Awesome working on your site. (http://fontawesome.io/) | |
* 2. You need to have called the Twitter Widgets.js javascript for Web Intents to work. More details here: https://dev.twitter.com/web/intents#user-intent | |
* | |
* How to implement: Simply add this snippet into your theme's functions.php file! |
This file contains 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
<div class="readme file wiki-content"> | |
<h1 id="markdown-header-student-radio-association-wordpress-installation">Student Radio Association Wordpress Installation</h1> | |
<p>Welcome! This is the repo for all the custom scripting of the Student Radio Association's website (Version 3 "Wordpress").</p> | |
<h3 id="markdown-header-history">History</h3> | |
<p>The <a href="http://www.studentradio.org.uk">SRA</a> started development of this project with Jason Slack (then Web Officer) building the initial template in 2013. Development halted for a period at the end of 2013. This was then picked up again by Fred Bradley, adapting Jason's original theme to bring it more inline with core Wordpress functionality and adding some new development practices to help aide faster progress.</p> | |
<h3 id="markdown-header-development-principles">Development Principles</h3> | |
<h4 id="markdown-header-the-basic-rules">The Basic Rules</h4> | |
<ol> | |
<li>Comment as much as possible, so your gran could understand what the cod |
This file contains 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 | |
/** | |
* FBputcsv class. | |
*/ | |
class FBcsv { | |
private $filename; | |
private $fp = false; | |
This file contains 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
<input type="hidden" name="instId" value="213881"> | |
<input type='hidden' name='accId1' value='CATCH'> | |
<input type="hidden" name="cartId" value="1430823944"><!-- This is a unique identifier It's actually a UNIX Timestamp! --> | |
<input type="hidden" name="award_id" value="21" /> | |
<input type="hidden" name="invoice_amount_inc_tax" value="342" /> | |
<input type="hidden" name="invoice_amount_ex_tax" value="285" /> | |
<input type="hidden" name="MC_entries[]" value="e87z0xvf" /> | |
<input type="hidden" name="amount" value="342" /> | |
<input type="hidden" name="currency" value="GBP"><!-- Choose appropriate currency that you would like to use --> | |
<input type="hidden" name="desc" value="Entry/Entries for The PR Week Awards 2015" /> |
This file contains 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
if ($_POST['email']) { | |
$email = $_POST['email']; | |
$message = "Hello this is a test! It worked!"; | |
mail($email, 'My Subject', $message); | |
echo 'Mail Should Now Be Sent!'; | |
} |
This file contains 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
// Database Connection Stuff | |
define('DB_HOST', 'localhost'); | |
define('DB_USER', 'user'); | |
define('DB_PASSWORD', 'password'); | |
define('DB_NAME', 'databasename'); | |
// Global Definitions that are needed for both entry and judging system | |
define('GROUP_INCLUDES_PATH', '/var/www/html/webvid-awards/group-includes/'); | |
define('PATH_TO_JUDGING', '/var/www/html/judging/'); | |
define('PATH_TO_ENTRIES', '/var/www/html/entries-dev/'); |
OlderNewer