Better WordPress Rich Text Editor

  • Download this zip file and extract it to view the contents on your computer
  • Copy the advanced-wysiwyg.php file to your WordPress Plugins Directory located here: /wp-content/plugins
  • Copy all the files from the plugs folder (from the file you downloaded) to the TinyMCE Plugins folder located here: wp-includes\js\tinymce\plugins
  • Activate the new editor by opening up the administrator view of your WordPress page
    • Select Plugins (on the left)
    • Activate the Advanced WYSIWYG Editor plugin
  • That’s it! Next time you go to make a post you will have significantly more formatting options.

References:

Extending TinyMCE, the WordPress Rich Text Editor

Change WordPress Logo

[ad]
Changing the WordPress logo really just consists of overwriting the logo.gif in the theme you are using with file with your own logo.gif file – Here are the steps:

  1. Open up the image that you would like to use for your new WordPress logo
  2. Save your file as logo.gif (File->Save As)
  3. Open up your ftp client (or however it is you view the files on your WordPress site)
  4. Navigate to the themes directory (www.mysite.com/wp-content/themes)
  5. Navigate into the images directory of the theme you are using
  6. Delete the logo.gif  or logo.png file that is currently in there (the old logo you want to get rid of)
  7. Copy/upload your file (in place of the old one you just deleted) NOTE: you must have the same file extension as the file you are replacing, (png or gif)

Better WordPress URLs

The URLs that WordPress Generates by default are no good (for humans or search engines.) This guide will explain how to fix that giving you more legible URLs as well as Search Engine Friendly WordPress URLs

  1. Head into the admin section of you WordPress site
  2. Select Settings (bottom right)
  3. Select Permalinks
  4. Choose the custom option and paste this into the text field: /%postname%
  5. That’s it! from now on when you create a new post, it will be given a URL in accordance with the name of the post. For example, check out the URL you are at right now. Before I changed my settings it would have read something like “firstsearchblue.com/?p=7563” (useless…) but now! “firstsearchblue/better-wordlpress-urls” (beautiful)

Query Database with Drupal Form

The Problem

  • By default, there is no way to allow your users to query one of your databases (either internal or external) in Drupal. Additionally, there are no modules that really allow you to do this either.

The Solution

  • With a little pasting and editing, this guide will enable you to let users do a simple search of one of your databases. This information can easily be extended to allow for all kinds of user-database interaction in Drupal.
  • Use Ajax! This is by far the easiest way to get the job done.

Preparation

  • Make sure that you have the PHP code Input Format enabled. To do this simply go to Administer->Site Building->Modules. Scroll Down to PHP Filter, make sure it’s enabled, click ‘Save Configuration’
  • If you have a rich text editor enabled (such as YUI) you should disable it temporarily while we create the form

The Drupal Page/Form

  • Go to Create Content and create a new page (it doesn’t have to be a page, but we’ll use a page for the sake of this guide.)
  • Call the page Database Query
  • Select PHP code from the Input Format dropdown.
  • Paste the following code into your page:

<html>
<body>

<script language=”javascript” type=”text/javascript”>
<!–
//Browser Support Code
function ajaxFunction(){
var ajaxRequest; // The variable that makes Ajax possible!

try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject(“Msxml2.XMLHTTP”);
} catch (e) {
try{
ajaxRequest = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch (e){
// Something went wrong
alert(“Your browser broke!”);
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var ajaxDisplay = document.getElementById(‘ajaxDiv’);
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
var lastphp = document.getElementById(‘lastphp’).value;
var queryString = “?lastphp=” + lastphp;
ajaxRequest.open(“GET”, “/php/check.php” + queryString, true);
ajaxRequest.send(null);
}
//–>
</script>

<form name=’myForm’>
<table border=”0″>
<tr>
<td width = 100>Last Name: <br /></td>
<td><input type=’text’ id=’lastphp’> </td>
</tr>
</table>
<br />
<input type=’button’ onclick=’ajaxFunction()’ value=’Search’ />
</form>
<div id=’ajaxDiv’></div>
</body>
</html>

  • There is only one thing we eventually will have to change, but we’ll leave it for now: “/ajax-example.php” (just before the tag. You’ll probably want to keep your php file somewhere else, and will have to update the file location accordingly.
  • For now, just hit the save button to save your page and move onto the next step.

The PHP File

  • We now have to create the PHP file that the above ajax script refers to.
  • Open up your favorite text editor and paste in the following code:

<?php
//Connect to MySQL Server
//connect to your database ** EDIT REQUIRED HERE **
mysql_connect("localhost","MySQLUser","password") or die('Cannot connect to the database because: ' . mysql_error());

//specify database ** EDIT REQUIRED HERE **
mysql_select_db(“databaseName”) or die(“Unable to select database”); //select which database we’re using

// Retrieve data from Query String
$last = $_GET[‘lastphp’];

// Escape User Input to help prevent SQL Injection
$last = mysql_real_escape_string($last);

//Build and run a SQL Query on our MySQL tutorial
$query = “SELECT * from dataTableName”; //just grab every row from our table
$results = mysql_query($query)or die(mysql_error());

//print what the user entered (eventually I’m sure you’ll want to use this data in your query)
echo “You Entered: ” . $last . “<br><br>”;

//print the results
echo “Database Results: <br>”;
while($row = mysql_fetch_array($results)){
echo “$row[lastname]<br>”; //NOTE: Here we are printing all the data from the ‘lastname’ column of our database, either change this name, or make sure you have a lastname column with some data in it
}
?>

  • You will have to make some modifications to this file! These include
    • Server: I used localhost, you might have to change this
    • MySQL User: Change this to your user
    • password: This is the user’s password
    • databaseName: This is the name of your database
    • lastname NOTE: This needs to be changed to the name of a column/field in your database (it is located at the bottom of the code)
  • Save this file as check.php
  • Upload this file to your server/hosting space in a php folder within your Drupal Installation.
    • For example, if Drupal is installed in the root of you web page (like on http://firstsearchblue.com) just create a folder called php and upload your check.php file to it.
  • That’s it! Navigate back to the form you created (we called it Database Query) and try hitting the search button.
  • I’m sure this guide is a little tough to work through PLEASE post any questions or issues below – they will be answered quickly!

drupal mysql query

Watch Unlimited Megavideo | How-To

UPDATE!!

Check out our new guide on The Best Way to Watch Movies and TV Shows Online


Megavideo|vReel|zShare

Illimitux 3.5: Unbridle videos from streaming platforms

Illimitux extension is a FireFox tool that removes limitations imposed by streaming plateforms as Veoh, MegaUpload or MegaVideo. Its purpose is watching without restriction vidoes from those platforms. When your are in one of these websites. Illimitux identifies the video and show a little icon in the sidebar of the browser telling you to remove the limitation. Once you click on it, you’ll be redirected to our website to view the Full video.

For Example, if you are in Veoh, you will be able to watch a video without there 5 minutes limit. That’s the same with MegaUpload and MegaVideo. In the case of MegaUpload (file sharing platform), you can stream a file (watch it in live) or download it without waiting 45 seconds.

http://www.illimitux.net/

Here are other solutions that people have found successful with respect to Megavideo:

Firstly clear your browsers cookies, next block all cookies coming from megavideo.com:

Go to: Tools > Options (in firefox)

Then click “Exceptions” and block “megavideo.com” & “www.megavideo.com” (without quotes)
(IMG:http://i37.tinypic.com/2rwb4m8.jpg)

Method 1
All you do is start the video playing then pause it and let it buffer all the way to the end. Then press standby on your modem (or unplug it if you don’t have a standby button) and watch the movie off/line, then hit play.

(Instead of turning off/unplugging your modem, you can also try clicking File > Work Offline in your browser. But remember to change it back when you want to load another video.)

The obvious drawback is that you are offline but, you can do this all-day if you want to have a marathon Megavideo session without that annoying video limit.

—————————————————————————-

Method 2
Unplug your modem from its power supply. The mailing address you have leased from your carrier will expire, as it will see that you are no longer online, and you therefore do not need an IP Address. Your IP Address currently being used will return to the pool of IPs available to use to your IP.
Clear your cookies. This takes care of the client side monitoring being done on your machine.
Wait 60 Seconds, then plug your modem back in. During the reinitialization of your modem, it will query your IP carrier for another IP Address from the pool of available ones, giving you a new IP Address.
Reconnect to Megavideo by closing your browser and accessing the material again. Your cookies will be cleared, and Megavideo will have no record of your new IP Address on their server log. Enjoy another hour of uninterrupted content.

(Method 2 won’t work if you have a static IP)