Adding WordPress to Vidiscript site

Adding a blog in vidiscript is not that hard really. It is just a matter of knowing the blog script. In this article, I will be discussing on how we can easily put up wordpress blog along with vidiscript. Although I am not going to cover the login integration, I am confident that this article will indeed help vidiscript powered website owners in adding their blog posts inside the vidiscript pages, or even assign an static page just for the showing of all the blog entries.

For the login integration, I will probably attempt to write an article about this in the future. I have an integration for joomla, wordpress, elgg. However, these integration scripts were written inside the vidiscript .inc files, so the process of going back through the steps I made, when I was writing it is not feasible at this moment, because of the time constraint.

Requirements: vidiscript all versions , wordpress latest version.

Step One
I am assuming that your vidiscript powered site is already installed on your server, and it is installed in the root directory of your domain. For example, yourDomainDotCom.

Download and unzip wordpress latest version on your desktop.

Using your FTP program, connect to your server to view the directory of your vidiscript. Inside this directory create a new directory or folder. Name this directory as blog.

Using the same FTP connection above, upload all of the wordpress unzipped files to the blog directory. Make sure to ONLY upload the content of the wordpress-3.0.1\wordpress and not the wordpress-3.0.1 or wordpress directory. We want the contents ONLY. Otherwise this is not going to work.

Step Two
Upon successful uploading of the files as mentioned above in Step One, we need to prepare the wordpress installation first, so that it can share the existing vidiscript database.

Connect your FTP program to your server. Open the includes directory, and look for the settings.inc. Load settings.inc to your html/text/php editor, and copy the php codes from there. The codes should be something like these ;
$db_host = “localhost”;
$db_user = “yourDatabaseUer”;
$db_password = “passwordHere”;
$db_database = “databaseHere”;
Direct your FTP file browser on the “blog” directory and look for the wp-config-sample.php Load wp-config-sample.php to your html/text/php editor, and on the very top of the page, just right after the <?php

Add;
$db_host = “localhost”;
$db_user = “yourDatabaseUer”;
$db_password = “passwordHere”;
$db_database = “databaseHere”;

Save your changes on the wp-config-sample.php. Please note that you will be asked to rename this wp-config.php during installation.
Step Three
Install WordPress as recommended by the readme file. After the installation, your wordpress and vidiscript should be sharing the same database. This is a lot easier to maintain than having them in separate database.

Step Four
This step will cover on how we can display the blog post on your vidiscript site. There are two options to accomplish this. I will briefly cover these options.

Option One
Right column only integration.
Connect to your server using your FTP program. Load the index.php of your vidiscript site on the editor. On the very top of the page find add;

Scroll down the page and look for these lines of codes

Just right after the codes above, add

 

Save your changes on index.php. The newly posted article title from the blog show appear now on the right column of vidiscript powered site.

Option Two
Static page integration. In static page integration (minimum only), the process is more tedious than the option one above. All the files modifications are in vidiscript files system only, and there is nothing we need from the wordpress side.

Connect to your website, find .htaccess file and index.php, load these files to your editor. Open the includes folder to find content.inc and load this file to your editor as well.

On your text/thml/php editor create a new file, and in this document paste the codes as shown below.

Now, I will leave the styling of the above codes for your own taste. Save this new document as blogentries.module. Upload blogentries.module to your templates/defaulttemplates/modules/ directory. Defaulttemplates is the vidiscript templates your site is currently using. Now we are done with the static page creation. We will just have to include it in our tab menu.

Moving on to your content.inc file. Find this code;

Just below it add;

Save your changes to content.inc.

Moving on to your .htacces file. In .htaccess file find

below it add;

RewriteRule ^blog/?$ index.php?id=39 [L]

Save your changes to .htaccess file

Moving on to the index.php. Just like in option above, open your index.php and add these codes on the very top of the page.

Scroll down the page to find the entries for tab menu. Find,

just below the codes above add;

 

Save changes on index.php

Step Five
In order for the option two to work or become visible on the tab menu, we need to adjust the css file. Open your default template directory. Find skin1.css and load it to your editor.

In skin1.css, find
#tab-menu{
position: absolute;
height: 34px;
left: 15px;
top: 110px;
width: 960px;
overflow: hidden;
font-size: 20px;
font-weight: bold;
}

change the above code this

 

Save your changes  to skin1.css.

Added Later:

If you want to include an excerpt from the blog post, you can change the above codes to this;

 

Spicing up the location on your vidiscript registration page

Ok guys, this article will be dealing with minor improvements on the registration page of your vidiscript powered site. This is the same codes I used, while working on my Brother Michael and Myself edition of vidiscript ( will be out in 8 months from now).

I think the location on vidiscript registration kind of boring, so I just want to add minor features into it. I want to add an select/option country location on the registration page. This way people don’t have to type in their country. Another reason I decided to add this on the script is that, later on, we can add a simple function to simply create a location filter. Here we go..

Step One

Download locations.txt from Here. You can just copy the source of the linked text file and then save it as locations.inc

Step Two

Edit the first line inside the array. By default I placed  ‘US’=>’United States’, on the top. You can change this to your country of your origin. Just Don’t forget to put ‘US’=>’United States’, below ‘UK’=>’United Kingdom’,. When you remove country from the array to put it on top, make sure there is no space in between.

Upload the locations.inc to your site’s includes directory.

Step Three

Edit register.module of your site. This file is located in templates/defaulttemplates/modules directory of your site. Load register.module on your favorite text/html/php editor, and find

Just below the codes above add,

Scroll down the page, and look for these codes

Replace the above codes with these codes

Save changes to register.module, and your are done.

Form Select – Option Selector using PHP

This tutorial focuses on how to use the select – option selector in html forms. As an example, we will be using date of birth selection form. Let’s write the most commonly use html tags for form.

The LONG Way.

The SHORTEST possible way. PoorBoy style. HTML/PHP hybrid

Now that  was really quick and time saver, we only have to write a shorter codes. One important aspects of  this is that you can update your selections  in an instant. Next time, I will utilize the same form in creating an age verification page for vidiscript users running adult oriented websites.