Infinity Community Manager

(Note:I’m not entirely sure this it the right section, but oh well)

So, what’s this about eh?

A few years ago I embarked on a side project to both provide something of use to the Infinity Community and simultaneously teach myself a bit about website programming. This project was the Infinity Corp Manager, and the intent at the time was to replace the no longer operational Infinity Community Network.

So, what does it do?

The aim of the ICM was to allow people to join, register or join their “corporation”, and for those corporations to be able to display their disposition towards other corporations. Most of this functionality already existed on the ICN and I simply wanted to replicate it.

So, where is it?

Whilst this is somewhat of a personal project, it is open source, and those interested will find it on my Github profile somewhere. At the moment, I’m not going to link to my demo site, as it’s not currently operating as I would expect. I intend to update this thread when it is ready to show off again. The furthest I got was enabling registering for a corporation, but there’s still a lot of work that needs doing and plenty of bugs that need fixing.

For those that already knew about this project, it is still alive, but getting very little of my time. I do still intend to get something out that works, and if there’s enough interest I may hijack the old Infinity Community Network “brand” when it’s ready to go live. :smile:

EDIT: Might as well have the bloody link, as people seem to have found it already :stuck_out_tongue: <-- Take a looksie
If anyone’s interested in taking part in building this let me know and I’ll add you to the org when the code’s in better shape. (BTW, if for some reason I-Novae need this account then I will willingly surrender it and move to an alternate org)


Taking at look at the repo, it looks like you’ve put in a lot of work to build the system from the ground up, but have you considered using a framework like CodeIgniter as a foundation?

There are a corp or two I mite like joining. Would your product make it easier for us fence sitters to make an informed choice?

Possibly. I quite like the approach of [this website][1]. However I’m fairly adamant about having a membership system on this, as I feel it’s a better way to keep accurate size counts. I’d possibly want to expose membership to a public API at some point and allow people to put modules on their websites/forums to automatically make them a member of their clan if they’re a member of their site, but that’d be quite a way off.
[1]: “Guildex”

I hadn’t, to be honest. I initially took this very much from the point of view that I wanted to actually learn the language somewhat properly (which I doubt that I did). I also had the secondary concern that I want my project to be easily deployable on any hosting, even fairly restrictive hosting, and more importantly that it works on my hosting.

1 Like

Sorry for dropping out of the blue and since it’s a first post common politeness dictates to say hi, so Hello All! =)

As a hobby web developer I found this post interested and by being carious being I given your project a shot. While I don’t really want to go into too much of technical mumbo jumbo I would like to give you few pointers, things you should sort at very start before going any further.

  1. Get rid of mysql_ calls, they will be deprecated. I really suggest you take a look into prepared statements. There are various methods, my personal choice is PDO. I suggest you give it a shot as it’s not really that complicated it may seem, as well as much more secure in preventing SQL injects.

  2. Create some modularity. While OOP programming may be a little overwhelming for you at the moment, you can start addressing the concept by separating files and place them in correct folders. That will help you in overview of the project, give you better perspective as well as along the way, slowly force you to start addressing the code the same way (OOP practice & patterns).

  3. Before going any further with your code you should solve the very basic stuff. You need to sort relative location of your project as currently it breaks if it’s not in root of a domain. Putting it in a sub-folder breaks the links. If you don’t start addressing it, you’ll have problems along the way, in e.g. file uploading (logos) etc.

  4. Centralize your work. One of first and most important things any developer learns is; Keep things simple and individual as you can. Start with simple things- keep one file that handles database connections and session starts. At start just dump it in in current shape. Later on you will realize your self that it should be in class and self controlled rather then procedural written with no error checking etc but that’s something you’ll learn along the way so no rush.

  5. Stay away from any frameworks for time being. Framework is a great way to speed up your development process if and when it suits your needs and desires. It is completely useless to go into framework if you do not understand the basics and either weren’t yet faced with, or you can’t solve the most basic problems that framework addresses. One needs to fool around with the code, encounter the general problems and figure out how to solve them. Frameworks are meant to solve that common and general problems, so if you never solve them on your own and don’t understand them, you’ll have hard time understanding fundamentals of the framework and end up chasing your tail in circles when going gets though.

It’s somewhat long so sorry about that. Anyway I hope you don’t take this the wrong way, but I seen your code and it’s a lot similar to my beginnings. When I was starting with php years ago I’ve done things the same way, so pointers that I given too you above are ones I’ve learned the hard way. Hopefully they’ll help you at your journey. :wink:

1 Like

Pssht! Don’t tell him! You’ll hurt Bobby’s feelings.

On a more serious note welcome, great post, and if you think that’s long you obviously weren’t around on the old forums.

1 Like

@nte - Thanks for your reply. Your suggestions are absolutely welcome, and in fact any suggestion that is constructive will go a long way to getting me more motivated and moving this project forwards.

For the things you suggest, any further documentation you can provide (it can be in PM if you don’t have links to material elsewhere) will be very welcome. I had noticed the “not being at root” issue though, much to my displeasure :frowning:. I’ve been scratching my head a little over that, but then I’ve not spend much time with it recently.

I started rewriting it back in March but kinda got bored.

You might want to think about changing the name. If I-Novae appoint a new Community Manager it could cause all sorts of confusion.

It’s somewhat ambiguous when it comes to linking to documentation if there’s no explicit question about what exactly. Net is full of various documents and tutorials which usually cause more confusion due all the terminology used and brief or poorly explained examples. But I guess if you want to start somewhere, you can start with PDO.

Here’s a somewhat generic but quite straight forward resource site:

And here’s a PDO class where you can get more familiar with OOP practices:

Each by itself would probably confuse you but you can use the first link to get basics explained and then second link to see how that can be applied in real world.

If you would want to use a PDO class from second link you would simply include it in each file and invoke the instance of it. Naturally that would require to replace all the mysql_ calls (where it’s used) but you can start with a single file. After you’ll feel more comfortable with it, you’ll probably want to get rid of the include redundancy and look for a way how to auto load file without typing it all the time (hint: spl_autoload_register). Slowly as you’ll try to reduce redundancy you’ll get familiar with more modular way of doing things, which is in essence what objective programming really is (separation of the code blocks in a pseudo nutshell).

-One of the basic things you can start with is sorting out config - just leave in database entries and utilize siteadd as a holder for script location.
-Create new file (i.e. db.php) and in it call config.php, initiate database connection.
-Create another file and for example call it: loader.php In it include db.php and create a new function etc url( $args ).
That function would simply return siteadd + args so you can solve your root problem by replacing hardcoded links adding in href simple “<… php echo url(“index.php/login”); …>” which would basically return $siteadd (set in config.php) + index.php/login etc.

So basically in a nutshell you simply include loader.php in each file and loader (in reverse) loads db connection and db gets it’s parameters (db login, script current location (siteadd) etc) from config.php. Idea is to separate different things so when you want to modify url function you don’t need to change it in all the files but rather in one and change will be reflected in all the other files. You control where script is placed (root, folder) by settings siteadd in config.php etc.

Now this is really a banal example and not one I would recommend as generally you would approach and solve things differently, but it’s a good start to get more familiar with modularization. Idea is to grasp the concept and see why separation makes sense. Then you slowly make your way through rest of the code as things progress…eventually you’ll figure out pitfalls of your own coding practice on your own and by some tinkering and help of google know how to solve them.

Just out of courtesy. If you’ll literally follow example above you’ll probably quite fast realize that including and linking files together is pain taking, boring and error prone task, so you’ll look for a way to automate the process, which is something that (as hinted above) autoloader can solve. But in current shape autoloader wont do you much good as you need to rethink whole approach you’re using. But hey, it’s fun as it’s frustrating and that’s what’s all about.

Hope my mini-novel helps you in some way. :wink:

@Runiat Bobby is a lame friend to have as he has no manners. Always comes unannounced and causes drama. :smiley:

True enough. I’m flexible on names. Perhaps Infinity Community Directory would be more appropriate? It’s difficult though, because I intend on it being more than just a mere directory, yet it’s not really a “network” either, so calling it the same as the ICN of old doesn’t make a great deal of sense. I’m tempted to leave it as is until IN tell me it’s a problem.

@nte - Cheers for the response, I’ll hopefully get to spend some time with it over the holidays at least (but preferably much sooner), and I’ll see how it goes.

I’ve added the link to the new master fork in the OP.

Ah well, don’t say you weren’t warned.

I won’t then :stuck_out_tongue: