There are a lot of different methods to modify modules, such as hook the module, theme override function, css alteration, even put your own codes into module itself. As long as "the problem" has solved, it really doesn't matter. (every method is correct)
However, you also need to consider about "future maintenance."
Okay, It is one module, one line that you need to note down for now. But how about several modules, ten lines of codes in different places? and you need to check them every time when modules require upgrade (which happened a lot).
I would suggest other methods instead of putting codes into module itself, because it probably saves more time for debugging in the future.
Re: 如何展開附加檔案
可以的!!
請修改 drupal 模組的原始碼即可!
在 drupal/modules/upload/upload.module 的 227行
'#collapsible' => TRUE
把此行註解或是刪除即可^^
Re: 如何展開附加檔案
感謝
不過我使用
'#collapsible' => FALSE,
也可行呢^^~Re: 如何展開附加檔案
It would be better NOT to change module itself, because you might have problem of upgrading it in the future.
you could check this: http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6
Re: 如何展開附加檔案
哦哦 了解
但是目前只看到改module的方法
所以先這樣用用看
到時要升級時,會記得把它改回來ture再升級…
感謝Jessie的提醒~~
Re: 如何展開附加檔案
感謝 Jessie 大大的提醒!但不知道可否請Jessie大大詳細的說明一下~
為什麼升級時自行修改過後的module會有問題呢?!
是因為有安全性問題?還是?
謝謝
Re: 如何展開附加檔案
一些寫程式的好習慣
利用一些 Drupal 方式去修改,有時候程式代碼更新,也未必影響到顯示效果,也不必每次更新都重做一次修正
---
notaBlueScreen | 訂閱RSS | Plurk | twitter
Re: 如何展開附加檔案
There are a lot of different methods to modify modules, such as hook the module, theme override function, css alteration, even put your own codes into module itself. As long as "the problem" has solved, it really doesn't matter. (every method is correct)
However, you also need to consider about "future maintenance."
Okay, It is one module, one line that you need to note down for now. But how about several modules, ten lines of codes in different places? and you need to check them every time when modules require upgrade (which happened a lot).
I would suggest other methods instead of putting codes into module itself, because it probably saves more time for debugging in the future.