10 Easy Steps For WordPress MU Installation

PHP, Techniques, Tutorials, WordPress
10 simple steps for installation WPMU are: 1 Download WPMU from http://mu.wordpress.org/download/ and unpack it. 2 If you want your WPMU installation in a subdirectory then rename the “wordpress-mu” folder to whatever you want. Upload the entire folder to your server. If you want your installation directly on the root then don’t worry about the folder. Simply upload all of the files inside (not the directory itself) to your server. 3 Create a MySQL database for WordPress MU on your web server, as well as a MySQL user who has all privileges for accessing and modifying it. 4 Navigate to index.php at your domain and you will be presented with the install script: http://example.com/index.php { Root Installation } http://example.com/subdirectory/index.php { Subdirectory Installation } 5 Delete your .htaccess file and change…
Read More

.passport Client, Authenticate users in a remote server

PHP, PHP Scripts, Tips
This class can be used to authenticate users in a remote authentication Web server. It accesses a remote Web server and pass the encrypted user name and password of an user to be authenticated. The class sets session variables with the user name and id if the authentication succeeds. This class works together with the .passport Server class that handles the authentication requests on the remote server side. Download Script here Source From: http://www.phpclasses.org
Read More

PHP Disqus Comments

PHP, WordPress
This class can be used for integration of blog comments to import in Disqus. It can generate a XML document in RSS 2.0 feed format with comments of a blog or similar platform to be imported in the Disqus platform. The generated feed includes comments with tags used by Wordpress define details like the comment date, author, text, thread comment parent, etc.. Download Script Source From: http://www.phpclasses.org
Read More

Create and manipulate adjacency lists in MySQL

PHP, PHP Scripts
This class can be used to create and manipulate adjacency lists in MySQL. It can perform several types of operations to store and retrieve information in a MySQL table of nodes of an adjacency list. Currently it can: add nodes, retrieve the list of all nodes, get the children of a given node, change the parent of a node, and delete nodes. Download Adjency Model Script Source From: http://www.phpclasses.org
Read More

Ad Rotator, Random ad image list rotator

PHP, PHP Scripts
This is a simple class that can be used to create ads that rotate according to a random order. The class takes an array of image files name strings as parameter but it could also be HTML tags for rich media ads. Then it shuffles the numbers assigned to each ad array position in a way that the shuffled array does not contain repeated ad numbers. It displays randomized images from a group of specified images, without repetition. Finally the class can return a new array of ads sorted by order determined by the shuffled ad numbers array. The returned array can be used to display one or more ads in the same page. PHP Ads RotatorDownload ZIP File
Read More

Offline Access to Google and other OAuth based API – PHP OAuth API – Part 2

PHP, Techniques, Tips, Tutorials, Web Design & Programming
Retrieving Access Tokens from a MySQL database The database_oauth_client_class is just a generic SQL database storage class. It really does not execute SQL queries because that depends on the type of database you want to store your tokens. A more specialized sub-class is necessary to execute the SQL queries to a specific type of database. This package also comes with another sub-class named mysqli_oauth_client_class that is specialized in executing the SQL queries to a MySQL database using the mysqli extension. If you use a different type of database, you can use this sub-class as model to execute SQL queries using the appropriate PHP extension. Lets see how you can make this work in practice to make the tokens be stored and retrieved in a MySQL database. The first thing you…
Read More

Offline Access to Google and other OAuth based API – PHP OAuth API – Part 1

PHP, Techniques, Tips, Tutorials, Web Design & Programming
Some applications require access to APIs on behalf of the user even when the user is not present, i.e. offline access. OAuth is a protocol that allows applications to obtain a token to access an API when the user is not present but when the tokens expire they need to be renewed. Some APIs like Google and Box.net support automatic renewal of expired tokens. Using OAuth Tokens to Access APIs Without the User Presence OAuth is a protocol that was thought to grant external applications the permission to call Web site API functions on behalf of an user. It can be used for instance to get details of the user account like his name or even email address, manipulate personal user information like for instance uploading user pictures, execute tasks…
Read More

10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible – Part 4

PHP, Techniques, Tips, Tutorials
9. Monitor the PHP Error Log File to Quickly Fix Serious Bugs 10. Fix Your Bugs but Never Edit Code on the Production Server 9. Monitor the PHP Error Log File to Quickly Fix Serious Bugs Error logs are useful to discover bugs that may be causing PHP errors but you cannot spend all day looking at your PHP error log files. It would be better if you could be notified when a PHP error occurs. That is the purpose of the Log Watcher class. It can monitor a log file and send an email message to you when new lines that are added to the log file. You can use it for instance from a script started periodically by cron, lets say every 5 minutes, and make it track…
Read More

10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible – Part 3

PHP, Techniques, Tips, Tutorials
7. Send PHP Errors to an Error Log File 8. Add more Error Context Information to PHP Errors Logs 7. Send PHP Errors to an Error Log File If you should not display PHP errors on the Web pages, you should be able to see them somehow. A better alternative is to send the errors to a error log file. This way you can watch what is going on without disclosing sensitive information to your site users. You can enable PHP error logs adding a few configuration lines to your php.ini file. Additionally you also set other useful PHP options. error_reporting = E_ALL log_errors = On error_log = /path/to/php_error_log log_errors_max_len = 0 ignore_repeated_errors = On ignore_repeated_source = Off report_memleaks = On track_errors = On html_errors = Off 8. Add more…
Read More

10 Steps to properly do PHP Bug Tracking and Fixing as Fast as possible – Part 2

PHP, Techniques, Tips, Tutorials
4. Use a Version Control System to Maintain Project files, Except Configuration files5. Track PHP Errors with Assertion Condition Tests6. Do Not Display PHP Errors on your Web pages4. Use a Version Control System to Maintain Project files, Except Configuration filesYou should always use a version control system (VCS) to maintain your application source code, but keep in mind that the configuration/local.php script should never be committed to the VCS repository. The reason for this is that it is not a static file in your project. It is different depending on whether you are in the development, staging or production environment.The default values for the options in the configuration class should be the ones to be used in the production environment, except for sensitive values that are related with the…
Read More