[support] force users to enter path alias

Mohammed@atexplorer.com mohammed at atexplorer.com
Mon Jun 22 13:30:17 UTC 2009


hello William and Fred,

thank you very much for the explanation! if only I can write code I will 
use this power of drupal extensively. any more hints or a skeleton 
module that I can try? unfortunately I won't be able to write this on my 
own, even though the code is only few lines long.

thank you both very much, and I am sorry for the miss understanding.

Mohammed.

On 6/22/2009 4:19 PM, William Smith wrote:
> Hi Mohammed -
>
> I think you misunderstand the hook system.  It is designed so that you 
> *don't* have to hack core files.  You would implement this in your 
> site's custom module space (if you don't have one, you can create one 
> easily).  You would then implement the hook as 
> /your_module_name_/form_alter(&$form, $form_state, $form_id)
>
> This is the way that Drupal is designed to be extended and is not at 
> all a hack.  You can read more here: 
> http://api.drupal.org/api/group/hooks/6
>
> Best,
> William
> *||*
> On Mon, Jun 22, 2009 at 9:07 AM, Mohammed at atexplorer.com 
> <mailto:Mohammed at atexplorer.com> <mohammed at atexplorer.com 
> <mailto:mohammed at atexplorer.com>> wrote:
>
>     hello William,
>
>     thanks for the answer. I don't prefer to use this method as I need
>     to hack core files. any other thoughts?
>
>     thank you.
>     Mohammed.
>
>
>     On 6/22/2009 3:09 PM, William Smith wrote:
>>     I don't recall if there is a direct way (ie. config option) to
>>     make the path alias textfield mandatory, but if nothing else you
>>     could use hook_form_alter
>>     (http://api.drupal.org/api/function/hook_form_alter/6) to make
>>     the field required.
>>
>>     On Mon, Jun 22, 2009 at 7:13 AM, Mohammed at atexplorer.com
>>     <mailto:Mohammed at atexplorer.com> <mohammed at atexplorer.com
>>     <mailto:mohammed at atexplorer.com>> wrote:
>>
>>         hello.
>>
>>         is this at all possible? I want users to fill in the path
>>         alias field and make it obligatory. it sounds simple, but
>>         searching drupal.org <http://drupal.org> didn't yield
>>         anything relevant.
>>
>>         -- 
>>         All The Best,
>>         Mohammed Al-shar'
>>
>>         --
>>         [ Drupal support list | http://lists.drupal.org/ ]
>>
>>
>>       
>>     -- [ Drupal support list | http://lists.drupal.org/ ]
>
>
>     -- 
>     All The Best,
>     Mohammed Al-shar'
>
>
>     --
>     [ Drupal support list | http://lists.drupal.org/ ]
>
>
> ------------------------------------------------------------------------
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]


-- 
All The Best,
Mohammed Al-shar'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090622/e8995064/attachment.htm>


More information about the support mailing list