Hello everyone,

To start off with, I've never used Drupal and am very interested to see if it will (easily) do what Joomla! wont. I'm aware that D has it's own modules, and therefore, I presume it has it's own MVC structure for them. However, I'm not looking to create a module, I'm looking to use a php script I wrote and have it displayed in the main-content area. Simple stuff.

In other words, I have a web application I wrote; can I use D to create a new menu item called "Home" and have it link to myscript.php, so that it will be the default page without having to do even more coding?

This was my first major project (with PHP) and I'm burnt out on coding (for the time being); the last thing I want to do is unfactor my refactoring, convert it to an extension so that it can be executed from within a CMS, then refactor my code (again), just so I can finally package and install it...

I mean, shit, that's just too much for something so basic as displaying myscript.php as the homepage! Can I simply upload the file to my dir and create a basic link to it through the CMS and set it as the home page? That's all I need to do and Joomla did not want to make it easy on me (albeit, I love Joomla; I hate Joomla extension development, lol).

And, worst case scenario, say that isn't possible. Are there any quality guides / video tuts / other reference materials for developing D extensions? My extension requires using simplexml_load_file(); will I have to use some B.S. class and over complicate my already working script just so I can integrate this into the D CMS?

::prays he doesn't have to write even more code::

This project has taken me six months and one (1) day already; I just want to be done with it!

Well, I look forward to hearing your responses. Hopefully, the D community will be able to provide better feedback that I usually get on the J! Forums; such as:

"I dunno why that doesn't work... Try reading php.net..." (when the question doesn't have to do with PHP syntax, but J! classes... Umm.. Wtf?!), and,

"I dunno how to do that",

"That's possible?!",

or, the one I hate the most, "I don't even know what that is, so it's unlikely anyone else does. Are you sure that's something common?"

Unfortunately, I've received all of those (maybe not verbatim) on the J! forums when I was trying to figure out how to use Joomla's framework to iterate xml. After a few months of being patient and persistent, I'm finally on the verge of giving up... Hence, why I'm looking into D. I don't want to learn a framework and rehaul my code just so I can use it on a CMS. Well, atleast, not until I have a better understanding of PHP...

Sincerely,

~Dro Buddy

P.S.
Sorry for the lamenting. It's been a long night full of a lot of, "I dunno..." 's.

Comments

papile’s picture

Hello and welcome. You certainly can override your front page with content generated from your php script, but generating modules is so easy that it would be better to roll your script into your own module. I mean in the in the simplest way you can make page-front.tpl.php and then call your php code, but then again, you said you are into MVC architecture, and if you do things the drupal way you will have MVC architecture. The drupal way to get model/controller level things into your code is to have a module. views are handled by themes and theming functions.

Look at the example modules on api.drupal.org and I am sure that whatever you have being outputted by your php code can be rolled into a module. I have found with drupal I can do whatever I want, but there are better ways of doing things than others.

WorldFallz’s picture

I'm not sure I completely understand what you're trying to accomplish but with drupal you can add php pretty much anywhere you like. Once you enable the 'php code' module (for d6, not necessary with d5), you can add php to any page simply by choosing the php code input format. That will put the code in the content area of the page (it will still be surrounded by drupal). If you want it to take over the entire page, you can create a page-front.tpl.php file and handle your script and the php elements of drupal any way you like.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

DroBuddy’s picture

Excellent! You both have just made my day; if I could I'd hug ya! ;-)

lol... I haven't been this happy since I was a little kid on xmas. Jeez, this just saved my from losing the rest of my hair (I'm only 23...) and... well, lets just say, a lot of other bad things... ::grins::

So, it's that easy? God, I love it...

Unfortunately, I have Hughes Net for internet (I'd call them an IAP, as opposed to ISP, but I doubt anyone would understand what that means), so, anyways, I can only use 425 Mbs in 24 hours, without exceeding my bandwidth limits... And, I'm already on the verge of going over, so I have to wait until 1 AM CST just so I can download Drupal. But, I tell you what, I can hardly wait!

So, I guess that really does settle it; I'm gonna start shuffling my sites on over to Drupal. Who woulda thought that'd be my happiest day of the year? ;-)

wr5aw’s picture

Without giving too much personal info, I've been deeply involved in both J! and M for several years (former core developer but wont say where). I recently had to redesign a static site in anticipation of some database driven apps. I wound up using Drupal and was blown away at how easy it is to hook into. I'm doing things that would have taken core hacks and multiple extensions/bots with the other packages but what impressed me the most is how lightening fast Drupal is once things are setup. I literally can not tell the difference between the old static html site and the Drupal one.

Did I have to write code? Yea. And it took some getting used to. Drupal is different. Completely. But I have to say I like it. Very easy to modify and customize.