php and drupal developing
nikitas - May 10, 2009 - 17:50
Hi i am new to drpl and i'm just wondering which is the best method for building custom modules or changing code inside the core drupal php files etc.Do i need to go OOP and the classes way/methodology or is it just fine to stick with the functions and the arrays ? Thnx in advance .

Well the "best" approach is
Well the "best" approach is to see if Drupal or one of the contributed modules will do what you want.
As for writing code, modify core is generally a bad idea since it makes updating Drupal a challenge.
As for writing a module, the APIs are not OOP though one can chose to write a module that is (views is a good example).
More specific questions are more likely to produce more specific answers.
basically what i want to know
is . . .if i have to learn OOP in order to build a 6.x drpl module and as for the core i've read and i understand that all changes/modules installations etc must be done inside the sites/ folder which i think it's totally well structured for farther developing.Oh about Views . .. u mean 'views 2' not the previous version right?Sorry for the misunderstaning but when i'm saying 'modifiing the core' i mean the hook_functions that i still dont have a clue about them but as i slight understand provide a core override or not?
_
No, you don't need to learn oop to write drupal modules.
As for changing core-- if you find yourself trying to do that you're more than likely approaching the problem the wrong way. Drupal is architected to be easily overridden / modified without having to hack core. If you find yourself in a situation where that is not the case, a patch to core is probably in order.
As for learning how to code for drupal I found the 'pro drupal development' book to be excellent as well as the information at Developing for Drupal.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
ok thanx . . .
i'll try to catch up with those 'books' :D . . . as soon as possible . . .
but my major problem with drupal is the multilingual support that has a lot of problems when it comes to taxonomy and voc's support.I'm searching for weeks now for a solution about how 2 translate taxonomy terms and vocs but with no luck at all.If i use a translated version of a voc. i stumble into other probs and so forth ( both voc's show up english-greek version).As i've checked at the forum/issue etc threads no one seems to know how to solve for sure probs like this.If you translate the terms you come up with no voc. translation.So basically my needs in customizing drpl have 2 do with stuff like that.I believe that the problem begins with the luck of a built-in taxonomy-voc module.It's a pitty that an awesome open cms like drpl where you can do almost anything to stack with prblms like this.Anyway thnx again.
p.s : excuse my poor english.
p.s 2: i asked for the oop programming cause of the user module .
p.s 3: oh and no messing with the core ;) . . . i'll try to remember this :D
_
I've yet to tackle my first multilanguage site-- are you using the i18n module? Perhaps asking over there and/or searching the module's issue queue might be fruitful. I'm sure you're not the first to stumble across such a problem.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
yeap
i've searched almost anywhere . . . but the problem remains . . . i'm using both the l10n_client-6.x-1.7.tar and the i18n-6.x-1.0.tar plus the translation_table-6.x-1.0-beta1.tar module but with no luck.
p.s : I've sent posts there 2 :D . . . but with no luck.The issued queue give answers about taxonomy terms but not about voc's.