I need a module to control and manage how content is presented.....
So... A user will login and fill out a form such as a user profile and write articles on the website. This content is not suppose to be visable to anyone other than the author and other users that have been approved by the author to view the material.
I want to exclude all anonymous users, general public and logged in users of the system.
So I think I need a couple of modules but I am not sure what is available. I think I need the following:
My company currently has two ongoing contracts which incorporate Drupal 7.0 as the CMS component. Salesforce is implemented as the business logic and data modeling component while Drupal is being leveraged as the view layer (MVC architecture). Drupal will heavily utilize the Forms API and Views 3 Module. jQuery is also being leveraged as forms validation and processing.
I have a custom field that has a hook_field_formatter_view function that is very resource intensive. I would like to cache the output. I have looked at the "#cache" property for render but have been unable to get it to work.
I have tried setting it in theme_preprocess and that caches the output (I can see it in the database) but my hook_field_formatter_view function still runs. I am basically trying to bypass that function unless cache is expired.
As Drupal newbie it took me a couple of days to get to the point where I am presently. With a lot of difficulites I manage to have the different nodes translated to whatever language I needed but still I am stuck with the proper Main Menu translation.
Basically I want to have my site presented in 3 languages. Normally I am always working with English (en) GUI since the translations are almost driving me nuts. The site's basic language should be German (de) thus any german content should have a path like mysite.eu/presentation. A switch to en should lead to mysite.eu/en/presentation and a switch to French (fr) accordingly to mysite.eu/fr/presentation. In addition the main menu should show up differently according to the chosen language.
In order to achieve this result I had to set up the Default Language to German (...Configuration > (Regional and) Language > List Tab) and to edit the path prefix language code from 'de' to 'blank'. BTW in the URL alias settings (... Configuration > Search and Metadata > URL aliases) I did not put any prefix (otherwise it appears twice like /fr/fr).
In the Detection and Selection Tab (location as above) I enabled all the methods (User interface text language detection) in the default order e.g. URL, Session, User, Browser and Default.
So I'm working on a music website, and created a custom module for the playlists. One of the functions is to load the song id of the current song provided its id.
function playlist_menu(){
$items['load/song/%'] = array(
'title' => 'Load Song',
'page callback' => 'load_song',
'page arguments' => array(2),
'access callbacks' => TRUE,
'access arguments' => array('access content'),
'type' => MENU_CALLBACK
);
return $items;
}
function load_song($nid){
$node = node_load($nid);
$songname = $node->title;
$albumid = $node->field_album['und'][0]['nid'];
$album = node_load($albumid);
$file = $album->field_cover['und'][0];
//Loads the album filepath from the file array returned above
$filepath = $file['uri'];
//The path returned is something like "public://file.jpg"
$filepath = str_replace("public://", "http://mysite.com/sites/default/files/styles/thumbnail/public/", $filepath);
//I then set a variable (imgurl) to the formatted filepath
$imgurl = $filepath;
$artistid = $album->field_artist['und'][0]['nid'];
$artist = node_load($artistid);
$artistname = $artist->title;
echo 'I output the variables + formatting here';
}
Lucky, this code works perfectly and I can view the song data by going to mysite.com/load/song/[someid].