Archive

Posts Tagged ‘PHP’

Knowing What to Use (or make) for Your Site

May 26th, 2009 admin 1 comment

So it seems quite often new webmasters are at their wit’s end when the question arises: what features does my site need? Well, this common question can be quickly turned into a daunting test of thought to new and experienced webmasters alike. So how can one even begin to approach this question? Well, why am I asking you? That’s what you’re reading this for ;) .

Alright, so you are creating a new site and are not sure what features you should start packing it with. Well, the most important thing to keep in mind is that the site should always be updated. So if at first you forget some features, don’t rush to get them finished right away; save them for future updates. By keeping sites updated, as I’ve mentioned in previous posts, you keep users coming back to your site. Once you have that out of the way, you can move on to deciding site essentials.

Deciding site essential features is an absolutely necessary step to creating a successful site. Consider your site’s purpose, function, and most importantly, what makes it unique. Whatever makes it unique should be the most important feature you first include. Followed by what it does and its purpose. For example, I have created a blog here. So I would not make this site a giant forum and expect people to simply read my blog posts, but rather I setup the blog and add an RSS feed so people can subscribe and stay updated.

So more or less, when a user is trying to figure out what is necessary, those functions that make your site worth viewing are what you need to include. Then, if you feel you’ve forgotten something, add them in for later additions so people have yet another reason to keep coming back to your site! Remember, with the web changing literally every second, one needs to keep their content and sites updated frequently (hmm maybe I should follow my own advice, eh? :p).

Regards,
Dennis M.

Categories: PHP, Software Reviews Tags: , , , , ,

Some Topic Ideas!

May 23rd, 2009 admin No comments

Hey guys, sorry for the long delay in updates, I’ve been taking topic ideas. None have quite struck my fancy (so to speak) where I feel they would make some great discussion topics. So please, send me some suggestions via email (dennis [at] microsonic [dot] org)! If I don’t get any great ones in the next day or so (well, either way really), I’ll be posting my “Deep Links Mod” for phpLD 2.x.x. Since there already is a great working one for phpLD 3.x.x, I will be releasing the one I wrote for a recent project I just finished up!

Regards,
Dennis M.

Categories: Other Tags: , , , , ,

The For(); Loop

May 13th, 2009 admin No comments

Many new programmers are perplexed by the “for” loop. However, it is one of the most essential and powerful tools in any developer’s arsenal. Without it, efficient and clean programming would not be as possible. Early on, most developers seem to stick to the while(); loop. I mean sure, while(); is great for some things, but may not exist in some programming languages and not to mention won’t work for everything you need.

Let’s begin by going into the basics about the for(); loop. Well really, a lot depends on the programming language (I will provide both PHP and C++ examples in the source file). But more or less, the for(); loop is simply iteration. It will run until its defined limit is hit providing whatever results you wish. We’re going to do this in more standard languages (e.g.: C/C++ and Java) instead of PHP for mass compatibility. Just note, if you’re looking to do this for php, you do not need to define the type of variable, and your variable will just start with the “$” symbol. So for example, PHP would be for($i=0;…;…){}.

Now we’re going to write a sample program and break it down:

for(int i=0;i<=5;i++){
std::cout<< "This is line number "<< i << std::endl;
}

Now as most of you may have noticed, this is a C++ example, but will effectively explain how the loop works for ALL programming languages!

int i=0; – This simply defines the variable and starting place (0 in this case). In PHP you would simply use $i=0; and so on for the rest of the statements.
i<=5 – This tells the loop when to stop (This <= symbol means less than or equal to). When i>5, the loop will stop and proceed on to the rest of the code.
i++ – This tells what the loop should do after every time it is run. In this case, we’re using i++ which means to add 1 each time around.

Now those are the basics to the loop. What lies within is just simply the code to be executed, which could of course have conditionals and such within it as well (e.g.: if(), etc.). So now we’ll move on to a more complex example.

unsigned int choices=5;
char* choice = new char[choices];
for(int i=0;i<=choices;i++){
std::cout<<"Please enter a value: ";
std::cin>>choice[i];

if(!choice[i]){
std::cout<<"No value for choice "<< i<< std::endl;
}
}
for(int i=0;i<=choices;i++){
std::cout<<"Choice "<< i<<" was "<< choice[i] << std::endl;
}

This will store an array of choices and then after entering them, they will be printed back!

In the source below, all working examples will be provided!
For(); Loop Tutorial

So, that basically wraps everything up! If you need anymore clarification, just let me know.

Regards,
Dennis M.

Categories: C/C++, Java, Other, PHP Tags: , , , , , ,

PHP Link Directory (phpLD)

April 29th, 2009 admin No comments

Hey there guys. So my most recent project has been working with the PHP Link Directory, commonly known as phpLD. I’m working with versions v2.2.0 (free) and v3.3.0 (paid). I am creating various mods (unfortunately I cannot post them here, private project so the mods are to the buyer only) for the buyer and have looked through most of the script’s structure. So I’m giving a review.

It is natural for a programmer to look through source code of an open source program and decide for him or herself whether the program is efficient. For the most part, I must admit, phpLD is a great script. I will proceed by version in the next few paragraphs explaining the things I found.

In version v2.2.0 the script is very small. Simply the “barebone” basics of what you could call a program. Even though it gets the job done, there are very few modifications for this free version of phpLD and it makes it difficult to learn a lot about the version without looking through the source yourself. Now for people such as myself, we look through the source code anyway, but someone just taking a quick look to make a few changes, it could be quite difficult and cumbersome if they are unfamiliar with general programming. Normally this would not be the case because modding generally implies that you have a thorough understanding of how the code works in the first place, but sometimes I feel the file names could have been chosen better to describe their function—but then again, every developer has his or her preference. Other than that, there seem to be some minor security holes (haven’t spent too much time looking for large exploits as I’m just simply working on the mods) but this version is outdated, thus the reason it is free.

In version 3.4.0 I must say I’m highly impressed. At a glance, there are no apparent security holes or problems with this feature rich software. I think it actually makes shelling out the extra few bucks for this worth it. The already feature-rich link directory script also has many mods available for it. People who are “on the fence” so to speak about making their final purchase for this software, I recommend purchasing this version. If you’re looking to be a serious link directory and have the cash, this is the way to go. Now that is not to say you cannot have a successful link directory with v2.2.0, but this version is much easier to use and is much more admin friendly. It seems they crafted this version to be more geared toward the average use rather than the webmaster.

Some down falls in all of this is compatibility. I understand how versions work (x.x.x) major, minor, etc. on builds/releases, however, moving from v2.2.0 to v3.4.0 it looks like an entirely different program. Much of the source code from v2.2.0 has been completely outdated. If they are providing a free version, I personally think it should at least use a similar structure and not the primitive structure they use for it. Also, since the program is so widely used, it looks very generic if you do not theme it. Even then, with a custom theme the registration forms are identical on almost every site using it. So beware of losing a sense of “directory uniqueness” to this software.

So overall, the program, in either version, is a worthwhile program to at least take a look at. If you’re serious about creating a link directory and don’t want to, can’t, or don’t have time to create your own, phpLD is the way to go. Again, it may cause a problem that the directory script is so largely used that your site may lose any originality that it could have had otherwise. Also, the compatibility factor (if you start using the free v2.2.0) is horrendous. If you have a modded v2.2.0 and decide later you wish to upgrade to v3.4.0,  you may find great difficulty in transferring these mods over to the newer version. Other than those slumps, either version should suit most purposes well.

Regards,
Dennis M.

Categories: Software Reviews Tags: , , ,

Importance of RSS Feed and What it Is

April 18th, 2009 admin No comments

Well, first thing’s first. Let’s explain what RSS Feed is. RSS stands for Rich Site Summary. It basically allows a user to keep updated on their favorite sites while not actually having to go to them unless they want to read the whole article or object.

Of course, RSS feed is not available for all sites, but why is the number of sites who are using the feed increasing so rapidly? Well, from an end-user’s point of view, RSS feed is a great tool to keep them (users) interested in a website. Without compromising security (like giving your e-mail out to a mailing list then being hit with spam) or any other true commitment, one can easily get the information they need from a site at the time it is available on the site (they know when this is by checking their feed).

Also, for users who subscribe to the RSS feed, it provides more “traffic security” for the website itself. From the owner’s point of view, it makes it more difficult for a user to simply “forget” your site and never return. When a user looks at their RSS feed and sees an interesting article, they will most likely click it and read the full article; thus returning traffic to your site.

Now that we understand the concept of RSS and its importance, if you enjoy the contents of this site, please subscribe to the Microsonic RSS Feed! :) It is the large orange RSS icon in the top right of the page. Or, if you’re using FireFox, click the RSS icon by the URL and hit “Subscribe to ‘RSS 2.0-all posts’”; your efforts are much appreciated!

This has been the last article in the series listed (oh maybe 5 posts ago?) so I’ll be starting on some new topics very soon! As usual, internet related and jam-packed full of useful information! Be sure to come back and check those out if you’re interested. Or better yet, subscribe to the feed here and just keep checking that and read the articles you find useful! ;)

Regards,
Dennis M.

Categories: Other Tags: , , , , ,