Tag Archives: Testing

More PHP Editing

I edited the PHP on the WP-Amazon Plugin for WordPress. I wanted to achieve two things. One, when adding an image, I wanted the text to follow it. Two, I wanted to have it display the name of the product in the title attribute of the link, that is, when one hovers over the link, I wanted the title to display, rather then the default of “View product details at Amazon”.

Here is the new improved code:
[php]function generateHTMLCode(format,prodname,url,imgurl) {
if (format==’link’) {
html = ‘‘+prodname+’‘;
} else {
html = ‘'+prodname+'

+’‘+prodname+’‘;
}
htmlCode = document.getElementById(“htmlcode”)
htmlCode.value = html;
}[/php]

Here is the old code so one can find it. It should be around line 190 or so (for version 1.3.2 anyhow)
[php]function generateHTMLCode(format,prodname,url,imgurl) {
if (format==’link’) {
html = ‘‘+prodname+’‘;
} else {
html = ‘'+prodname+'‘;
}
htmlCode = document.getElementById(“htmlcode”)
htmlCode.value = html;
}[/php]

I am still looking for a way to change the link to a more basic link, so Amazon’s new Product Preview will work properly. However, for some reason I can’t figure out where it is making the full link…

Learning C# (CSharp)

I have taken up the task of learning C#. I like it, it is a nice cross between Visual Basic and C++.
This post is more a test of ways to post code. My modification of the normal “Hello World” application is below:

[csharp]using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1cs
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(” {0}”, DisplayHelloWorld(”Hello”)) ;
}

static string DisplayHelloWorld(string hello)
{
return “Hello World”;
}
}
}[/csharp]

Testing again

The edited the Scripturizer program, so let’s see how it works:

“Ask, and it will be given to you; seek, and you will find; knock, and it will be opened to you. For everyone who asks receives, and he who seeks finds, and to him who knocks it will be opened. Or what man is there among you who, if his son asks for bread, will give him a stone? Or if he asks for a fish, will he give him a serpent? If you then being evil, know how to give good gifts to your children, how much more will your Father who is in heaven give good things to those who ask Him!” Matthew 7:7-11, NKJV

This is a test.

Okay, I am just doing more tests to see that the site is working as it should.

For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. -John 3:16, KJV

Now, in theory, a plugin on WordPress should automatically link that.

Edit: So it linked it, but for some reason will link to the KJV as it supposed to, I try later to see if other translations work.

Edit (30 January 2004, 1:52 am): Got it to link to the KJV finally, error on my end.