? custom_title.patch
Index: dopl.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/dopl/Attic/dopl.module,v
retrieving revision 1.1.2.5
diff -r1.1.2.5 dopl.module
31c31
<   return t('Use one of the forms <em>name.module</em>, <em>name.theme</em>, <em>name.translation</em>, <em>name.installprofile</em> or <em>name.project</em>, in order to link to <em>http://drupal.org/project/name</em>. Note that a link will be generated even if a project does not exist.');
---
>   return t('Use one of the forms <em>name.module</em>, <em>name.theme</em>, <em>name.translation</em>, <em>name.installprofile</em> or <em>name.project</em>, in order to link to <em>http://drupal.org/project/name</em>. If update module is enabled the project name will be retrieved and used as link title. In addition you can provide a custom title with the form <em>name.module|"My custom title"</em>. Note that a link will be generated even if a project does not exist.');
36c36,37
<   $pattern = '/(\b)(\w+)(\.(module|theme|translation|installprofile|project))(\b)/';
---
>   $pattern = '/(\b)(\w+)(\.(module|theme|translation|installprofile|project))(\b)(\|"([^"]*)")?/';
>   
43a45
>   dpm($matches);
45,46c47,52
<   // First try to fetch data from cache 
<   if ($link = cache_get('dopl:'. $matches[2])) {
---
> 
>   if (count($matches) == 8) {
>     $link = $matches[1] . '&lrm;<a href="http://drupal.org/project/' . $matches[2] . '">' . $matches[7] . '</a>&lrm;' . $matches[8];
>     return $link;
>   }
>   else if ($link = cache_get('dopl:'. $matches[2])) {
79c85
< }
\ No newline at end of file
---
> }
