Can you make it so that it doesn't have to be named pay per node in the title, urls? Because users won't really understand what pay per node means. So have a variable that changes that in the settings.

Comments

maurizio.ganovelli’s picture

Assigned: Unassigned » maurizio.ganovelli

Hi, i'll try to add this feature in next release: i think it can be useful for module usability.

maurizio.ganovelli’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Fixed

Hi, with http://drupal.org/project/stringoverrides you can easily change strings used by ppn module.
I think that it's not a big problem for an user having urls like /user/[uid]/paypernode: if you want a different path you can use hook_menu_alter and override existing path, using something like

function yourmodule_menu_alter(&$items) {
  unset($items['user/%/paypernode']);
  $items['user/%/contentbalance'] = 
      array('title' => 'Pay per node',
        'page callback' => 'paypernode_user_page',
        'type' => MENU_LOCAL_TASK,
        'weight' => 2,
        'page arguments' => array(1),
        'access callback' => 'paypernode_user_menu',
        'file' => 'paypernode.user.inc'
   );
} 

Hope this helps!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

webdesignovice’s picture

Version: 6.x-2.x-dev » 7.x-1.0
Assigned: maurizio.ganovelli » Unassigned
Status: Closed (fixed) » Active

Is there a way that this can be done on Drupal 7? The code provided doesn't work for Drupal 7.

webdesignovice’s picture

Status: Active » Closed (fixed)

Fixed using the hook_menu_alter function.

markbannister’s picture

Issue summary: View changes

webdesignnovice:
So not a setting somewhere but a file I need to change/add: Fixed using the hook_menu_alter function. ?

maurizio.ganovelli’s picture

You can implement hook_menu_alter in a custom module using something like:

function mymodule_menu_alter(&$items) {
  $items['user/%user/contentbalance'] = $items['user/%user/paypernode'];
  unset($items['user/%user/paypernode']);
}

Hope this helps!