Skip to content

Instantly share code, notes, and snippets.

View mustafakucuk's full-sized avatar
💻
coding...

Mustafa KÜÇÜK mustafakucuk

💻
coding...
View GitHub Profile
@chrisl8888
chrisl8888 / drupal-views-share-global-text-field
Last active April 23, 2024 04:07
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>
@codee
codee / image_autorotate.php
Last active January 24, 2025 13:23
CodeIgniter: Automatic image rotation library
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* @file application/libraries/Image_autorotate.php
*/
class Image_autorotate
{
function __construct($params = NULL) {
if (!is_array($params) || empty($params)) return FALSE;
@mynameispj
mynameispj / Props
Created July 24, 2012 14:55
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
@claudiosanches
claudiosanches / functions.php
Created July 24, 2012 03:22
Wordpress Related Posts function
<?php
/**
* Related Posts.
*
* Usage:
* To show related by categories:
* Add in single.php <?php dfw_related_posts(); ?>.
* To show related by tags:
* Add in single.php <?php dfw_related_posts('tag'); ?>.
@fritids
fritids / gist:2209319
Created March 26, 2012 20:11
Change WordPress Author Url Base
<?php
//http://w4dev.com/wp/change-wordpress-author-url-base/
function my_custom_author_base(){
$author_base = "profile" ; //Your desired author base.
global $wp_rewrite ;
$wp_rewrite->author_base = $author_base ;
$wp_rewrite->flush_rules() ;
}
body {
background: #222;
color: #ddd;
white-space: pre;
font-family: monospace;
}
a {
color: #6482c8;
}