Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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].
Hi, I have posted a forum at me site and people have registered to the site to post their comment. The problem is with my email system. I do not know how long it takes for the users to receive their confirmation mgs and log back on the site. Also how do i let them sign up on the site with their user name and password without going through any hustle. Thanks and counting on you guys....kinda new to drupal as well as learning on my own.
You can enable Remote Desktop to access virtual machines in VirtualBox
This allows access without having to install RDP or VNC on the guest OS or bridging the virtual network card to gain access.
VirtualBox Extensions
VirtualBox Extensions must be installed in VirtualBox on the host.
QuickStart has these extentions installed by default, but the version of the Guest Extensions must match the version of VirtualBox you are using on the host.
I have a fresh install of Drupal 7. I installed it on a Ubuntu Linux 101.10 server.
I also uploaded the module secure pages and secure login.
I installed an SSL certificate however every time I activate secure login my website crashes. I am not sure what is going on.
How do I set up SSL for Drupal 7. I read somewhere I need to edit the .htaccess however I am not sure why I would need to do such a thing. It is very unclear.
I installed ubercart to drupal7 and I am getting this error, "Notice: Undefined index: block_callback in uc_store_admin() (line 37 of C:\xampp\htdocs\drupal7\modules\ubercart\uc_store\uc_store.admin.inc)". what do I need to do to fix it.
My webhost is GoDaddy and they allow you to create your own php.ini file.
I made a file called test.php which runs php.info() so I can check the phpsettings. I just run www.mydrupal7site.com/test.php.
I placed the php.ini folder right in the main drupal site directory.
My drupal site is not sitting in the main directory of my host, but there is no php.ini file in the main directory so drupal should read from the drupal sites directory next..