Filepath variable not being loaded

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].

Allowing users on your site

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.

3b) Remote Access Quickstart: Easy remote desktop with RDP

Remote Access Quickstart

Easy remote desktop with RDP

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.

See this for information on installing the extensions.

Configure VirtualBox

  1. Shut down the Quickstart virtual machine
  2. Click on the Quickstart virtual machine on the manager windows
  3. Click the Settings icon
  4. Click Display in the left menu
  5. Click the Remote Display tab
  6. Check Enable Server
  7. Change the other settings as needed
    • Note the setting for port, the default usually works (3389)

Now you can connect with a RDP client to this virtual machine.

Using RDP to View Quickstart Desktop

General Connection information

To connect, use the IP of the Host computer.

SSL Setup on D7

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.

ubercart

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 drupal site isn't reading my php.ini values.

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..

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x