Theme function correction if "clean URLs" is off

Peter Santavy - November 15, 2006 - 01:10
Project:Subscribe
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

A problem with drupal setting: clean URLs=off (disabled).

Some code to change in function theme_external_node():

...
  $item[] = t('<a href="%remote-url">Visit this page</a>', array('%remote-url' => $remote_url. "node/$node->remote_nid"));
  $item[] = t('Authored by: <a href="%remote-author-url">%remote-author</a>', array('%remote-author' => $node->remote_author, '%remote-author-url' => $remote_url. "user/$node->remote_uid"));
...

To add "?q=" for clean URLs=off:

...
  $item[] = t('<a href="%remote-url">Visit this page</a>', array('%remote-url' => $remote_url. "?q=node/$node->remote_nid"));
  $item[] = t('Authored by: <a href="%remote-author-url">%remote-author</a>', array('%remote-author' => $node->remote_author, '%remote-author-url' => $remote_url. "?q=user/$node->remote_uid"));
...

 
 

Drupal is a registered trademark of Dries Buytaert.