This is written in Thai but the code should explain itself. The idea is to use hook_form_alter() to set the value of "recipient" field explicitly.
How to Limit Privatemsg Recipients to Specific Users
Hi All,
We are currently developing a website, which has membership and classifieds section. We want to set expiry of advertisements based on the membership status. Example, anonymous user can create ads but will expire in 14 days. Authenticated (Registered but not a member) can create ads but will expire in 21 days. A Member user can create ads but will expire in 30 days. I have checked...
I am using Ubercart to assign the role of a Member user from authenticated once the user buys the subscription. But posting ads doesnt involve money. Its free of cost, but the expiry of the ads varies based on the type of role assigned to the user. How can Ubercart roles solve this for me?
There are many approaches. It really depends on how much specific functionality you need.
You could re-purpose a node's comments for this, use a big form-building module like Webform, find special-purpose modules like Shoutbox ( http://drupal.org/project/shoutbox ), create a special content type & a View ( http://drupal.org/project/views ), or ultimately build the form yourself.
There are ...
thanks both of you!!!! I just create a form by webform, but one more question, how can i do the checking the field is a number not a text? (like the email field)
Thanks so much
hi all,
iam a newbie in drupal, and i just tried to paly with drupal development , like creating simple modules but now i want to spacify for each user different location to my module (i.e for user x :--> he will see the block module in the content ,but for user y :--> he will see the module in the right block ...and so on)..where and how i can do this ..?
thanks for advance
ora se eu adicionasse manualmente no list box seria algo como $form['add_category']= array( '#title' => t('Category'), '#type' => 'fieldset', '#description' => t('Algorithm Category'), '#collapsible' => TRUE, '#collapsed' => FALSE ); e depois faria algo como $form['add_category_options'] = array( '#type' => 'value', '#value' => array(t('x'),t('y'),t('z')); );
Its not clear what you are after, fieldsets are containers for other form fields. Form fields of type 'value' are fixed values, they could be an array, but generally they are not used to hold fixed values. That you call the field 'add_category_options' makes me think this is meant to be a form field where the user selects a value, in that case the type would be 'select', 'checkboxes' or ...
For the "standard" case of only caring about paths of the form node/{nid} your approach is potentially more expensive as it walks the menu path for all pages. You code also use $node = menu_get_object(); if ( !empty($node) ) { // Have a node object } Side note: Calling node_load() when the load has already been loaded will used a cached copy (if the node was loaded by nid).
I get this error when i try to add a node (custom node) Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 244215 bytes) in C:\xampp\htdocs\drupal\includes\form.inc on line 2120 If i click refresh, it appears that only the first 150 or something fields got stored in the database. My forms contains about 800 textfields (in a table) (input is 3 character numbers only). How can i solve this problem? SOLVED: increase...
Here is the line (26) from the above referenced file: function pc(a,b){var c=a.style;c[$b]=b.getWidthString();c[Nb]=b.getHeightString()} The offending character appears to be the ";" after "a.style".
Obviously you can do whatever you want for your project, I'm just letting you know that the functionality is already available. Not sure what you mean by "tweaking" -- you just install and configure the location and gmap modules, create a view, and there you have it. Also, the gmaps module (not to be confused with the 'gmap' module) also does this as well as the geo module--so there are already several options...
that displays the info correctly thanks however how would i use my own table format to display the output if possible i have a table that has 3 collums and inside each collum for a user there will be a few items to display ie for user 1 in first collum there id and name then second collum some other info's and in last some more for example i used to use while ($row = $db->sql_fetchrow($R01)) { echo "<td...
"Access All Areas" feature in the House of... "Access All Areas" feature in the House of Representatives Magazine. With contribution from Equal Access. Link from www.equalaccess.com.au 11:21 PM Jun 11th from TweetDeck
Thread profile page for "Module access link" on http://drupal.org.
This report page is a snippet summary view from a single thread "Module access link", located on the Message Board at http://drupal.org.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity