Credit system module for Drupal 7

I'm creating a site where some users (let's call them clients) will be able to create a gallery (photos or videos), publish and set a price (in number of credits) for other type of users (customers) to view it. So, for the users (customers) be able to view these galleries they'll have to buy credits (through PayPal) and use the credits to view different galleries. Is there a module (free or paid for) that could achieve that? Including the PayPal payment bit?

Migrating a database

I have a development server and a production server. All code and modules are stored in SVN. Both servers use SVN.

how to use #footer vs. #footer .section selectors in Zen 7

I just started using Drupal, so I'm not sure if this is a Zen-specific question, a Drupal-wide question, or just some css I have not encountered before.

What's the difference between the #footer {} and the #footer .section {} selectors? (Or #navigation {} vs. #navigation .section{}, etc.)

I see comments in the css advising to modify one or the other for certain attributes, but I'm not sure why. How do the two work differently?

Thanks.

-Thess

Taxonomy/Drupal 7

In Drupal 6 you could assign a taxonomy vocabulary to content types.

I can't see this option in Drupal 7 so I'm not sure how to assign a taxonomy term to content. I have the ability to assign tags to an article, but not any of the vocabulary/terms that I've created.

Any help appreciated, thanks.

Field variables in node.tpl.php

Template node.tpl.php gives you the possibility to access fields vial $field_name. So if I have a node reference field named field_lieder, I can access it with $field_lieder.

doing

foreach ($field_lieder as $lied) {
  print_r($lied); //prints the below output
} 

returns

hook_block_view - how to change the theme function

Hi there, how to alter a block?

I like to change the theme function of this block. How to to that??


/**
* Implements hook_block_view().
*
* Generates blocks for the latest news items in each category and feed.
*/
function aggregator_block_view($delta = '') {
if (user_access('access news feeds')) {
$block = array();
list($type, $id) = explode('-', $delta);
switch ($type) {
case 'feed':
if ($feed = db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid', array(':fid' => $id))->fetchObject()) {
$block['subject'] = check_plain($feed->title);
$result = db_query_range("SELECT * FROM {aggregator_item} WHERE fid = :fid ORDER BY timestamp DESC, iid DESC", 0, $feed->block, array(':fid' => $id));
$read_more = theme('more_link', array('url' => 'aggregator/sources/' . $feed->fid, 'title' => t("View this feed's recent news.")));
}
break;

case 'category':
if ($category = db_query('SELECT cid, title, block FROM {aggregator_category} WHERE cid = :cid', array(':cid' => $id))->fetchObject()) {
$block['subject'] = check_plain($category->title);

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x