You are hereDrupal 7
Drupal 7
Drupal patching - How to apply patch on Linux
I constantly forget how to properly applay patches to drupal modules and often some patches can be a life saver before official release is made. So if you are on some VPS or Dedicated server, you use your SSH access and go to module directory you wish to patch, then check also if you need to go to this module subdirectory like some "/components" or something, then download file with WGET command from source of the patch, you can copy the source by right clicking on patch and copying location of the link, then just write
User import/Node Import, UTF characters and Excel
Many have encountered this unicode/utf encoding problems in their programming life. It is just a drag to make it right and without knowing all the stuff around it and understanding it you will have bugs and problems. You will usually import data to drupal with CSV files. It's fine until you start using non english alphabet. You will usually export your database as CSV from phpmyadmin which should do it fine and preserve unicode chars and save your csv file as UTF-8 file. So here is everything fine and if you import data like that it should import nicely.
Node loading, simple variable passing to flash banner
So in previous post with made drupal custom block now lets make custom block with flash banner where data to banner is passed from node that has CCK fields.Make content type with 4 cck text fields, or just use one field, even body can do and then you can manauly manipulate string with PHP, just have some separator in your input. In this example we will use 4 cck fields.So in the block template, block-block-4.tpl.php we add this code
Custom field available data - Views
To find out which fields are available in custom fields in views, put following code in custom PHP field.
Online site when transfered to offline(localhost) doesn't work
Few times i transfered online site to my localhost and site wouldnt work, no response form page. What i realized is that main problem were cache tables in database. After clearing them everything was fine. Best way to do that would be to use backup and migrate module and just select all cache tables to be emptied in advanced settings and then backup database and import it to your localhost.
Views and Global:Null argument
Today I made a view from which 3 menu links derive, problem was that all had the same title as it was only one view. Way to solve this was to pass argument to view trough Global that would be ignored in query. So i made it www.mywebsite.com/view/Sport/32+31+30 so Sport is used for title then and those other numbers are passed to second argument to make query. To top all that i made URL alias to make it look nice and clean, so i made www.mywebsite.com/view/Sport/32+31+30 into www.mywebsite.com/sport.
Setting a form value with jQuery
If you want to select form value, for example hidden field for subject in mail form you can set the form values with jQuery using the val() function.
If the form element is <input id="subject" name="subject" type="hidden" value="someweb.com" /> you set it with $('#subject').val(itemId);
so put it in function
function toggleDescription(itemId) {
$('#subject').val(itemId);
window.alert( $('#subject').val() );
}
</script>