cck

Simulate a click in a Google Map

余生颓废 提交于 2019-11-27 22:12:57
问题 I'm trying to simulate a user click on a Google Map, using API v3, after I geolocate their position when they write down their address. I used to do: google.maps.event.trigger(map, 'click', { latLng: new google.maps.LatLng(lat, lng) }); But now I got an error: Uncaught TypeError: Cannot read property 'wa' of undefined main.js:727 I need to simulate the click because I'm using Drupal with a CCK field, and it's doing this on clicks under the hood that are not triggered if I add the location

Drupal 7: how to restrict file access to specific user roles

别来无恙 提交于 2019-11-27 21:53:27
问题 I need to develop a site on Drupal 7. I have some content types with File fields in CCK. And access to nodes of these types should be granted only to specific Drupal user role. And at any moment site administrator should be able to make these Nodes 'public' or 'private'. I can make nodes visible only to specific user roles, but this is not secure enough. If anonymous user knows the path to file ( www.mysite.org/hidden_files/file1 ), he can download it. What is the most elegant way to solve

How to quickly theme a view?

霸气de小男生 提交于 2019-11-27 10:15:52
I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the " field " way and the " node " way. In "edit View", you can choose " Row style: Node ", or " Row style: Fields ". with the " Node " way, you can create a node-contentname.tpl.php which will be called for each node in the view. You'll have access to your cck field values with $field_name[0]['value']. (edit2) You can

How to quickly theme a view?

孤者浪人 提交于 2019-11-27 04:01:48
问题 I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the " field " way and the " node " way. In "edit View", you can choose " Row style: Node ", or " Row style: Fields ". with the " Node " way, you can create a node-contentname.tpl.php which will be called for each node in