Posts

Post Update: VBScript String Clean Functions -3 Methods to Remove or Replace Characters in a String

The following post has been updated to include a number of different methods to remove characters from strings in VBScript. Remove or Replace Characters using regular Expressions Remove or Replace Characters using the Replace Function Remove or Replace Characters without using the Replace Function Details are also provided to remove from a specified set of charcters if found in the input string, or to remove all character expept a rage, such as 0-9, a-z, and A-Z. VBScript String Clean Functions -3 Methods to Remove or Replace Characters in a String - Code-Tips.com

Apache mod_rewrite (.htaccess) - Rewrite or Redirect Request URLs if page not found, or no www

Apache mod_rewrite ( .htaccess ) - Request rewrites & redirects to site root if page or directory not found There are many scenarios where mod_rewrite can be used on a web server to improve usability, optimise for search engines, perform redirects based of specific criteria and much more. The following are some examples of how to configure .htaccess files on an Apache web server to alter requests and actions taken by the web server, including configuring the server to redirect to the site root (or other specified page) if a page or directory is not found, configuring the server to convert components of a http request into query string parameters to be passed to a specific page/script for processing and display (without altering the original address entered into the browser).

Php RSS2Writer (v2.1) - Generate RSS 2.0 Feed - Usage Instructions & Download

Image
RSS2Writer v2.1 has been updated to v3.0 beta.  The new version can be downloaded at the Php FeedWriter website:  http://phpfeedwriter.webmasterhub.net/ Php FeedWriter (v3.0 beta) now provides the ability to output to various feed formats.  Php FeedWriter can currently generate Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92 and RSS 0.91 compatible feeds .  View more information about Php FeedWriter , including online documentation .  For information about the latest update and release, see the article Php FeedWriter 3.0 (beta) Released . A tutorial demonstrating how to build a feed using Php FeedWriter is also available on this blog: How to Generate Feed Using Php (Atom 1.0 and RSS 2.0 Compatible) Generate RSS 2.0 Compatible feeds in Php, using the Free Php RSS2Writer Class. The Php RSS2Writer class has been updated. Recently implemented v2.1 updates allow CDATA to be incorporated if required. Version 2.0 included improved usability when using the RSS2Wri...

Php Date Time - 7 Methods to Calculate the Difference between 2 dates

Calculate the difference between two Dates (and time) using Php. The following page provides 7 methods for calculating the difference between two dates using Php, as well as some additional related resources to help with Date/Time calculations and manipulation using Php. Depending on the type of server running Php (Windows/IIS/Apache, Unix/Apache), standard date methods provided by Php can sometimes produce inconsitent or incorrect results. The various methods provided on the page below cater for different scenarios where date/time calculations need to be made using Php to calculate the difference between dates. See Php Date Time - 7 Methods to Calculate the Difference between 2 dates for details.

Improve Performance for Websites with a Database Back-end & Dynamic Content

Improve Performance for Websites with a Database Back-end & Dynamic Content How to improve the performance of web pages, and the overall performance of a website by minimise front-end processing and additional server/client DNS requests required to fully load each page. Identify the areas/scripts for a website which are frequently used Identify scripts which take the longest time to process or load Identify DNS Requests that can be removed from front-end pages Create scripts to perform background processing, then store website content (HTML) in a database table. Replace code in scripts to retrieve the pre-formatted content from a database The techniques described below focus on reducing the processing requirements and DNS requests required to generate and load a page for both the server-side and client-side aspects of a web application or website. The steps explain how to identify, and reduce the amount of processing required by the front-end server of a website by perfo...

SEO Tips: Keyword Research, Target Key Phrases, Site Navigation

Image
SEO Tips for Website & Database Application Development I wanted to share a few of my experiences with developing websites and database applications in relation to optimising the structure, navigation, layout and content of websites to help increase rankings in popular search engines, including Google, Bing and Yahoo. Some key areas covered include designing and developing a website to have a logical page hierarchy and navigation paths. I have developed a range of websites both static and interactive with a database or sometimes file system back-end to enable content to be published and maintained dynamically. The Search Engine Optimisation techniques described below are based on my own personal experiences with various methods of building a dynamic website. They are basic in nature, and provide an idea of just some of the many techniques to optimise a website for Search Engines. Any concepts or conclusions reached are a result of my own research, experimentation and opinio...

Web Programming, SEO & SharePoint Resources

Web-Resource.org - SharePoint, Web Programming & SEO Resources Web-resource.org provide a range of resources from around the web for Web Development & Programming, SharePoint & InfoPath Development and Search Engine Optimisation. Resources have been hand selected by the team at Web-Resource.org, and suggested by users. Some of the many resources include:

InfoPath Code - Loop through items in a secondary data source from a SharePoint List

The article linked below demonstrates using JScript or VBScript, how to loop through items in a secondary data source until one is found which either contains a specific value, or has a specific value for a known attribute. InfoPath - Update Repeating Elements in a Secondary Data Source

Fix Corrupt Table in PhpBB3 MySQL Database - Grant Administrator/Founder using PhpMyAdmin

How to fix corrupt table in PhpBB3 Database using PhpMyAdmin (phpbb_users table corrupt in PhpBB3 forum). How to add a forum administrator/founder using PhpMyAdmin. PhpBB3 is used for a forum application. The forums were all working fine until I started receiving the following SQL error when trying to access the forum website: Can't open file: 'phpbb_users.MYI'. (errno: 145) [1016] The users table in the database had become corrupt or deadlocked.

Affiliates

 Affiliates of Code-Tips.com:

InfoPath - Programming Tips - InfoPath Form Development

When should code be used in an InfoPath form and when should it be avoided? There is no simple answer to this question, as it comes down to a matter of personal preference. This article is aimed at reducing the development time for InfoPath forms of various scales. The following are some tips to help you make the right decision.

Php XML-RPC Bulk Ping Sites and Directories - FREE SEO

WebmasterHub.net - FREE SEO - Submit to Directories Only recently launched, WebmasterHub.net provide FREE SEO including a bulk ping service to submit sites, blogs and/or RSS feeds. The bulk ping service uses XML-RPC and the weblogUpdates.ping, or weblogUpdates.extendedPing method if available. The service currently pings around 100 popular directories, but is still evolving. Free Bulk Ping Tool - Bulk Ping Sites & RSS Feeds

SEO Tips for Beginners

A few SEO (Search Engine Optimisation) tips for webmasters and bloggers. SEO (Search Engine Optimisation) Tips and Tools

WebmasterHub.net - Webmasters Developers and Designers

Image
WebmasterHub.net is live!! WebmasterHub.net offers a directory of resources, tools and tutorials for webmasters, web developers and designers. Register for free to receive free Search Engine Optimisation (SEO) including access to submit a site or resource to the resource directory and the Webmasterhub.net Bulk Pinger to bulk submit your site or blog to many popular sites and directories.

Php: Manage session times using code - Expiration / Timeout script

The following article demonstrates how to take control of php session times by including a php script into pages on your site. This can be useful if you don't have access to the php installation and the php.ini configuration file, as it gives you the flexibility to choose the length of php sessions on your site without requiring access to the server or config.

IE / Firefox Alignment Issues Solved

When testing the layout of a website template that I was creating in Internet Explorer (IE) and Firefox, I had a lot of trouble getting both browsers to display the content as required. The main content is a fixed width, which is in a panel (div) that should be centered. Setting the css property text-align to "center" works for IE, but not Firefox. After doing some research, I found that FireFox has a specific CSS attribute to center align content: "-moz-center ". This fixed the problem for Firefox, but the everything was left aligned in IE. After a bit of playing around with combinations of styles and attributes I managed to have both Internet Explorer and Firefox render the page properly using the same style sheet and set of styles. My solution: Set the alignment for Firefox in the attached stylesheet for the required div elements: text-align: -moz-center Set the alignment for Internet Explorer using the align attribute of the div element: <div align="cen...

Search Engine Optimization (SEO) for Blogger

Looking to increase visits to your blog? While doing a little research around SEO for my own blogs, I came accross the following article by Mike which offers a method of adding keyword and description metatags . Blogger SEO Tip: Use Post Labels as Meta Keywords The code incorporates conditions to show the labels / tags for a post as keywords if a post page is being viewed. If the blog homepage or a search page is being viewed, the blogs keywords abd description are used.

XML-RPC Blog Ping

I am developing a Php script which uses the Weblog_Pinger class written in php by Rogers Cadenhead. The script currently logs all pings to a MySQL database table, but is controlled using a single php script which calls the ping_ping_o_matic function for each site. I noticed that once more than about 20 sites were being pinged, the script sometimes timed out. Instead of adjusting settings in php.ini or the web server, I decided to implement the Weblog_Pinger class with a controller which uses a MySQL database to store addresses to servers which support XML-RPC pings. The database will also store details of the blogs / rss feeds being submitted. When commencing the bulk ping, a dialog will allow a selection from the list of blogs / rss feeds, and the "changes url" for each selection to be specified. The php interface will also allow XML-RPC servers and additional blogs or rss feeds to the database.

SEO - Crawler interpreting external links

The following is in relation to my previous post Php: Log Clicks on Links to External Sites . The post demonstrates how to log a clock on a link pointing to an external address. This may cause some search engines to get confused when crawling the page, as the link will be pointing the the load.php script on your site, when it actually reads and takes the user to an external site. A solution for this would be to use the actual address of the external site as the value for the href attribute, and call a javascript function which changes the href value to toint to the redirect script which logs click / hit statistics. Links would then appear to search engine crawlers to point to the correct address, and not a page on your site. If javascript is not enabled, the user will still reach the required destination, but statistics for the click will not be logged.

Php: Log Clicks on Links to External Sites

The following demonstrates a method of logging clicks on hyperlinks to external sites using Php and MySQL. This can be used to generate statistics for content on your site such as "Popular links/sites", or keeping track of a frequent user or member's actions (ie. Recently Browsed). The Php uses the PEAR MDB2 Package to create a connection to the database. For information on installing or using PEAR and the MDB2 package, see http://pear.php.net/ . Once the processing has completed for the item/link, the user is redirected to the address of the selected url.

XML Parser

The following php code processes an xml file and displays contents in the browser. Each element is displayed, followed by the name and value of any attributes. The text value will be disaplyed on if the element is not empty. It uses various methods from the XMLReader class (php), to move through each element and attribute of the xml document displaying each element and attribute name, and any values.

Free online webmaster, web development and web design tools and resources

The following is a set of free tools and resources which can be used to help create valid and attractive websites in a short amount of time.

VBScript String Clean Functions -3 Methods to Remove or Replace Characters in a String

VBScript String Clean Functions -3 Methods to Remove or Replace Characters in a String Original Post: 21st April 2009 Updated: 16th March 2010 The following VBScript / VBA function removes special (illegal in file names) characters from a string and returns a clean string. Illegal/special characters are replaced by a space by default, but can be set to replace specific characters with another string/character. The function can be used to remove characters not supported in filenames and directory names of the file system, SharePoint lists, etc.

Free Php RSS 2.0 feed generator class (RSS2Writer)

RSS2Writer v2.1 has been updated to v3.0 beta.  The new version can be downloaded at the Php FeedWriter website:  http://phpfeedwriter.webmasterhub.net/ Php FeedWriter (v3.0 beta) now provides the ability to output to various feed formats.  Php FeedWriter can currently generate Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92 and RSS 0.91 compatible feeds .  View more information about Php FeedWriter , including online documentation .  For information about the latest update and release, see the article Php FeedWriter 3.0 (beta) Released . A tutorial demonstrating how to build a feed using Php FeedWriter is also available on this blog: How to Generate Feed Using Php (Atom 1.0 and RSS 2.0 Compatible) [Edit: 9th January 2010] This Class has now been updated to Version 2. The information provided in this post is now out of date . Please see the Php RSS2Writer Class page for information about the updated version (Version 2.0). Updated Version (2.0): Php RSS 2...

Microsoft Outlook: Calling VBA Class Module function using VBScript

Although it is not recommended by Microsoft (see below), a procedure can be created in VBA (Visual Basic for Applications) and called using VBScript (Visual Basic Scripting Edition). By default, VBA is not initialised disabled when Outlook is started for performance reasons. If Outlook is started and an item opened (containing VBScript which calls a VBA procedure in the ThisOutlookSession Class Module), an error will occur as the required VBA procedure/function will not be available. For procedures to be called from the ThisOutlookSession module, security settings need to be adjusted to allow the macros to run. To call a VBA procedure in the ThisOutlookSession module from VBScript, create an Outlook. Application object, which will then allow the procedure to be called.

Privacy Policy

Third-party advertising companies are used to serve ads when you visit this blog. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here .

New Web Development Blog

This is my new web development blog location. Posts will be related to web development, php application development, general html javascript and css. Please have a look at my SharePoint Administration and Development blog.