Drupal 6 form textfield #default_value not working
Surprisingly textfield #default_value is not working in views exposed form. I have enabled search field exposed form and using hook_form_alter I am setting its #default_value property. But while rendering it doesn't show default value. However I found that inside views_handler_filter_search.inc when I change form type textfield to textarea as shown below:
function exposed_form(&$form, &$form_state) {
if (isset($this->options['expose']['identifier'])) {
$key = $this->options['expose']['identifier'];
$form[$key] = array(
Read more Template adjustments
Hi guys, I wanted to know how to move content in a block to the right hand side. Im a noob in php so it may appear like a dumb question to most of you.
This is the code:
please visit here:
http://i167.photobucket.com/albums/u127/shortex/code.jpg
to view the code (i cant paste it here for some funny reason)
...Where would I place the center tags???
Thanks in advance.
Resizing images within a view
Hi all, I'm fairly new to drupal 6 and had a slight query which I'm hoping somebody can help me with.
I have created a view called "News" and wish to display most recent news(obv). I have enabled the CCK for users to upload images when creating a new news article. The problem being that when user upload images to news articles, they will uploaded in various sizes.
In the view I have created called "News", I wish to use the "Rewrite the output of this field" option to resize the image automatically but this seems to be a big problem as I'm not too familiar with html or php.
Read moreAdvance Search Form with Views and CCK fields
Hi All,
I am looking for Advance search module that'll expose CCK fields for search. I know using Views2 we can expose the CCK fields as a filter. However its not possible to convert CCK text fields as checkboxes. For e.g. I have added and exposed filter of group Search (Search: Search Terms). To assist I want to add 2 check-boxes like search in Title and/or Description which are CCK Text fields. I couldn't find way to change them as check-boxes with functionality search in Title and/or Description CCK fields.
Read morehow to show all the node props in a block view
Explicity rendering of views
Hi, I'm trying to explicity rendering at code level a view defined in my solution.
This is, suppose the name of the view is my_last_comments, and I'd like to show that view in a very specific place in my page template, say, so I'd like to get the view rendered in a preprocess variable such as:
function theme_preprocess( &$vars ) {
$vars['mylastcommentsview'] = view_render( 'my_last_comments' );
}
Got the idea?. I've looked for that in views module function but I couldn't find anything.
I'd appreciate some help in this.
Thanks
Read moreAdding Comment support for an Entity in Drupal 7
Not sure if this is the correct place for this post so if not let me know.
I have started working with D7 and have the need to create a new Entity and a number of sub-types. I want to allow users to post Comments to this Entity but cannot figure out how this can be accomplished. Any help would be welcome.
Read moreModify user filter form in user list page
Hello,
I'd like to hide all the submit buttons in user filter form and submit the form in select onchange event.
I attach js function to role select :
$form['filters']['status']['role']['#attributes'] = array('onchange' => 'myJsFunction();');
And submit the form in javascript like :
$('#user-filter-form').submit();
The form is successfully submitted when I choose value from role select.
The problem is, it won't run user_filter_form_submit() function like clicking submit button.
What do I need to do?
Read moreExtending Custom Subscriptions with Notifications 4.x
Notifications version 6.x-4.x includes the Custom Subscriptions module. It allows for the creation of flexible event notification subscriptions, and exposes to the user a simple, no-nonsense interface for subscription management. Custom Subscriptions is also the recommended method for automatically subscribing users to notifications.
Read moreFree Messaging Service for Drupal
Hi!
I've seen a really nice feature on the BBC mobile site, where you can send a free, short SMS style message direct to the studio and wondered if anyone else thinks this would be an interesting feature to replicate in Drupal.
Read more