Hi,

this option, under Biblio Settings -> Links, does nothing at all.

I know there was a patch for version 7.x-1.x-dev https://drupal.org/node/1185084 , but in version7.x-1.0-rc7 the patch isnt working at all.

CommentFileSizeAuthor
#6 biblio-author-link-settings.png85.04 KBAlan D.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Twinhand’s picture

Issue summary: View changes
Twinhand’s picture

Issue summary: View changes
rjerome’s picture

That patch shouldn't be required at all since the functionality was incorporated into the module years ago.

What exactly is the problem you are having?

Twinhand’s picture

Well, how to put this straight. If I hit the option "Hyperlink author names to author profile page", it does nothing at all. It doesn't even create a Link. (The " Hyperlink author names " is working though.)

It doens't even create a Link if i set the "path to profile" to "frontpage" (was just for a test) instead of "user/[user:uid]".

No error was given so far.

I honestly don't know which Informations you need, so i put a bunch of them right here:
-Biblio-Version: 7.x-1.0-rc7
-The running version has no changes (no patch from a thread etc.)
-Drupal Version: 7.25
-OS: Ubuntu 13.04
-Webserver: Apache 2

Don't know which of them is helpfull. If you need to know other stuff, just tell me, and i'll collect the informations.

anyway, thanks beforehands.

Twinhand

rcodina’s picture

Try this module without enabling links to nodes:

https://www.drupal.org/project/biblio_author_node

I think the problem is located on biblio_handler_field_contributor class of Biblio module (I have customized this class on my module).

Alan D.’s picture

Title: "Hyperlink author names to author profile page" does not work » "Hyperlink author names to author profile page" does not work without also checking "Hyperlink author names"
Component: Code » Miscellaneous
Category: Bug report » Support request
Status: Active » Fixed
FileSize
85.04 KB

This conditionally requires both author link settings, which was what I was hoping to avoid.

Simple solution, override the theming function to allow the author profile links but not biblio author filter links. My initial modified version that accomplishes this, see theme_biblio_author_link() for the full code.

  $author = $variables['author'];
  if (variable_get('biblio_author_link_profile', 0) && isset($author['drupal_uid'])  &&  $author['drupal_uid'] > 0) {
    $base  = variable_get('biblio_base', 'biblio');
    $options = isset($variables['options']) ? $variables['options'] : array();

    $uri = drupal_parse_url(request_uri());
    $uri = array_merge($uri, $options);
    if (!isset($uri['attributes'])) {
      $uri['attributes'] = array('rel' => 'nofollow');
    }
    $path = $uri['path'];
    if (variable_get('biblio_links_target_new_window', null)){
      $uri['attributes'] +=  array('target'=>'_blank');
      $uri['html'] = TRUE;
    }
    $uri['attributes'] += array('class' => array('biblio-local-author'));
    $alias = drupal_get_path_alias($path);
    $path_profile = variable_get('biblio_show_profile', '0') ? "$path/$base" : $alias;
    return l(trim($author['name']), $path_profile, $uri);
  }
  else {
    return check_plain(trim($author['name']));
  }

Check that both settings are checked for this to work and the caches are flushed :)

Flagging fixed, reopen if I was completely off track (I'm not the maintainer).

Status: Fixed » Closed (fixed)

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