geeky

YOURLS Page – Popular Links

As requested by this comment I have published the code for the Popular Links plugin to appear on the public side.

LIVE DEMO

Copy this code and save it as popularlinks.php

Upload it to the /pages directory of your YOURLS installation.

It will appear on your site as YOURLS-SITE/popularlinks

As with the plugin, you can customize it by editing the values

> show_top(1000,5);

1000 means the number of days you are selecting from the database

5 means the number of links you are selecting.

YOURLS Plugin – Popular Links (1.7+)

UPDATE: This plugin can be public by making it a page http://laaatech.com/yourls-page-popular-links

 

The YOURLS plugin, originally posted here, I have updated to be compatible for YOURLS 1.7.

The plugin shows and admin page of the most popular links created in 1,30,365, and 1000 days on a YOURLS site

Download here, save as plugin.php and upload to YOURLS_DIRECTORY/user/plugins/popular-links

IMPORTANT:  Make sure to remove/overwrite the old version of Popular Links if you have it on your server.

http://pastebin.com/raw.php?i=Ts7sTZVm

Advanced:

At the bottom of the plugin, you can edit the values

> show_top(1000,5);

1000 means the number of days you are selecting from the database

5 means the number of links you are selecting.

 

LogMeIn Alternatives

After LogMeIn screwed over their free customers, and even paid customers who bought their apps, I have put together a list of alternatives.

TeamViewer

[Free for personal use, Pro for business] Probably the best out there. They have apps for Windows/Mac/Linux, and iOS/Google Play.

Google Chrome Remote Desktop Requires Google Chrome. Windows/Mac/Linux, Mobile apps in the works.

RealVNC VNC Viewer

[Free and Paid versions] Windows/Mac/Linux, iOS/Google Play ($9.99 but sometimes free)

TightVNC [Free for Personal or Business use] Open source! Windows/Unix platforms

GoToMyPC by Citrix [Paid, Free Trial] Windows,Mac,iPad & iPhone,Android,Kindle Fire

Mikogo [Free for Private Use]

iTeleport [Paid] Windows, Mac, iOS, Google Play (coming soon)

Fuzebox Free and Paid (See plans)

NoIp Remote Desktop

Crossloop

PocketCloud

Must have Chrome Extensions

I highlighted the extensions I use

  • Adblock Plus for Google Chrome™ – Ad-free browsing! Even YouTube video ads stop. My favorite

  • Imgur Uploader – Upload images & .gifs to imgur with two clicks of the mouse.

  • Reddit Enhancement Suite – A ridiculous amount of options for reddit

  • Craigslist Notification – A really useful extension for craigslist. You can save specific searches and every time there is a posting that matches any of your saved searches it will alert you.

  • Google Dictionary – Double-click words to have Google Dictionary define them for you

  • Hover Zoom – Display a full size image when you hover over a thumbnail

  • Ghostery – Protect your privacy, see who’s tracking your web browsing

  • Speed Dial 2 – Speed dial 2 is fast and clean extension for your favorite pages and quick access to your apps, bookmarks and browsing history.

  • Checker Plus for Gmail – A must have if you use Gmail

  • Hola – Great for non-U.S. residents. Access websites blocked or censored in your country, company or school.

  • Tumblr Savior -If you use Tumblr, download this.

  • LastPass -LastPass is a password manager and form filler.

  • YouTube Options for Google Chrome™ – Various options to configure YouTube like removing annotations and comments, or starting videos at your preferred resolution

  • StayFocusd – Limit the time you can spend on time-wasting websites

  • Tab Wrangler – Automatically close unused tabs

  • SmoothScroll – Add a smooth-scrolling effect, such as in Picasa

  • Smooth Gestures – Enable mouse gestures

  • Scrollbar Hide – Hide the scrollbar until you mouse over it

  • Readability – Reduce articles/pages to a clean, easy-to-read interface

  • Readability Redux – Not sure what the difference is between Readability and Readability Redux…I think Redux was just an unofficial version before the official was released for Chrome. Dunno why OP listed both

  • Docs PDF/PowerPoint Viewer – Automatically preview PDFs, powerpoints and other documents in Google Docs

  • Clock – Add an analog clock to the toolbar (displays time on mouseover)

  • Ads-free Grooveshark – Remove ads from Grooveshark

  • 1-ClickWeather for Chrome – View weather conditions conveniently in the browser

  • YouTube Stop Autoplay – Stops YouTube from autoplaying videos when opened, but allows them to buffer.

  • Better Facebook – A multitude of options for Facebook, like forcing the news feed to be chronological and reverting to the non-sidebar chat

  • AutoPager – Automatically loads the next page of a site inline when you reach the end of the current page for infinite scrolling of content

Best little known useful sites on the internet

Music & Sound

Fix and Creative Commons license code for Wikipedia provider with Jquery Oembed

new $.fn.oembed.OEmbedProvider(“wikipedia”, “rich”, [“wikipedia.org/wiki/.+”], “http://$1.wikipedia.org/w/api.php?action=parse&page=$2&format=json&section=0&callback=?”,{

templateRegex:/.*\/\/([\w]+).*\/wiki\/([^\/]+).*/,

templateData : function(data){if(!data.parse)return false;

var text1 = data.parse[‘text’][‘*’];

text2 =encodeURI(text1);

var regex = new RegExp(“/wiki/”, ‘gi’);

text3 = text2.replace(regex, “http://en.wikipedia.org/wiki/”);

text = decodeURI(text3);

var css = document.createElement(“style”);

css.type = “text/css”;

css.innerHTML = “.error.mw-ext-cite-error,.metadata.plainlinks.ambox.ambox-content.ambox-Refimprove,.dablink { display: none; } .infobox{float: right; }”;

document.body.appendChild(css);

return ‘<div id=”content”><h3><a class=”nav-link” href=”http://en.wikipedia.org/wiki/’+data.parse[‘displaytitle’]+'”>’+data.parse[‘displaytitle’]+'</a></h3>’+text+'<br /></div><ul>Text is available under the <a href=”//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License”>Creative Commons Attribution-ShareAlike License</a><a href=”//creativecommons.org/licenses/by-sa/3.0/” “></a> additional terms may apply.</ul>’;

}

}),

YOURLS Plugin – Popular Links

UPDATE: This version only works for 1.5-1 and below. Version 1.6 and 1.7 you should go here http://laaatech.com/yourls-plugin-popular-links-1-7

 

Short post, but I have thrown together a short plugin for YOURLS (using a lot of the code from http://gkurl.us/popular) that shows the most popular links created in 1,30,365, and 1000 days on a YOURLS site. It’s based on code from Mrtech, but is now in the form of a plugin.

Download here, save as plugin.php and upload to YOURLS_DIRECTORY/user/plugins/popular-links

 

http://pastebin.com/raw.php?i=NmM9D2Pi

Advanced:

At the bottom of the plugin, you can edit the values

> show_top(1000,5);

1000 means the number of days you are selecting from the database

5 means the number of links you are selecting.

Download: XChat Popup Menu (Works with Hexchat too)

For any/all who constantly use the right click popup menu, I  have a very powerful one I wanted to share.

Requires Hexchat or Xchat

Make sure you you have done the command below for proper ban control.

/set irc_ban_type 1

Save this as popup.conf 

 

(Replace xchat below with hexchat or vice versa if you are using a different app)

Linux:
Copy popup.conf to:
/home/$user/.hexchat/

Windows XP
Copy popup.conf to:
C:\Documents And Settings\$user\Application Data\Hexchat\
Windows Vista /7/8
Copy popup.conf to:
C:\Users\$user\AppData\Roaming\Hexchat

Enjoy!

How to Make a URL Shortener Site with YOURLS and Drupal

YOURLS is a simple and easy to use URL shortener, but leaves much needed when it comes to page layout and usefulness as compared to a Content Management System.

For this reason, I believe that Drupal is great for being used in combination with YOURLS.

Setting Up YOURLS

  1. Unzip the YOURLS archive
  2. Copy includes/config-sample.php to includes/config.php
  3. Open includes/config.php with a raw text editor (like Notepad) and fill in the required settings
  4. Upload the unzipped files to your domain public_html or www folder
  5. Create a new database (see Configuration – you can also use an existing one)
  6. Point your browser to http://yoursite.com/admin/

Installing Drupal in a subdirectory

  1. http://drupal.org/requirements
  2. Download Drupal
  3. Extract
  4. Upload it to a subdirectory, such as /content or /pages
  5. Grant write permissions on the configuration file
  6. Create the database
  7. Run the install script
  8. Clean URLs

Drupal + YOURLS

Now that you have them both installed, add the following to your .htaccess

DirectoryIndex content

replace content with the name of the subdirectory you used.

Rename /sample-public-front-page.php to something like url.php

Go to your drupal install, login, and go to /subdomain/node/add/page

Create a new page titled URL, make sure to select PHP as the Input Format, and insert the following code

<?php
require_once( dirname(__FILE__).’/includes/load-yourls.php’ );

// Part to be executed if FORM has been submitted
if ( isset($_REQUEST[‘url’]) ) {

$url = $_REQUEST[‘url’];
$keyword = isset( $_REQUEST[‘keyword’] ) ? $_REQUEST[‘keyword’] : ” ;

$return = yourls_add_new_link( $url, $keyword );

$shorturl = $return[‘shorturl’];
$message = $return[‘message’];

echo <<<RESULT
<h2>URL has been shortened</h2>
<p>Original URL: <code><a href=”$url”>$url</a></code></p>
<p>Short URL: <code><a href=”$shorturl”>$shorturl</a></code></p>
<p>$message</p>
RESULT;

<?php yourls_share_box( $url, $shorturl ); ?>

} else {

echo <<<HTML
<h2>Enter a new URL to shorten</h2>
<form method=”post” action=””>
<p><label>URL: <input type=”text” name=”url” value=”http://” size=”50″ /></label></p>
<p><label>Optional custom keyword: <input type=”text” name=”keyword” size=”5″ /></label></p>
<p><input type=”submit” value=”Shorten” /></p>
</form>
HTML;

}

?>

Now publish it as sticky to the front page.

That’s it!

Now of course there will be lots of things you need to customize, and make look nice, and maybe some things I forgot. But remember, Google is your friend.