/[drupal]/contributions/modules/bookmarks2/bookmarks2.module
ViewVC logotype

Diff of /contributions/modules/bookmarks2/bookmarks2.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11, Fri Dec 21 12:15:25 2007 UTC revision 1.12, Sat Jul 26 18:04:16 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: bookmarks2.module,v 1.10 2007/12/21 12:04:03 sanduhrs Exp $  // $Id: bookmarks2.module,v 1.11 2007/12/21 12:15:25 sanduhrs Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 122  function theme_bookmarks2_block() { Line 122  function theme_bookmarks2_block() {
122      // Print bookmarks list as an item list      // Print bookmarks list as an item list
123      $output = (count($bookmarks) ? theme('item_list', $bookmarks) : t('You have no bookmarks.'));      $output = (count($bookmarks) ? theme('item_list', $bookmarks) : t('You have no bookmarks.'));
124      $links = array(      $links = array(
125        array(        'bookmarks2_quick_link' => array(
126          'title' => t('quick link'),          'title' => t('quick link'),
127          'href' => "bookmarks2/$user->uid/add/quick",          'href' => "bookmarks2/$user->uid/add/quick",
128          'attributes' => array(          'attributes' => array(
129            'title' => t('Bookmark the current page.'),            'title' => t('Bookmark the current page.'),
130              'class' => 'bookmarks2_link',
131          ),          ),
132          'query' => 'title='. urlencode(drupal_get_title()),          'query' => 'title='. urlencode(drupal_get_title()),
133        ),        ),
134        array(        'bookmarks2_manage' => array(
135          'title' => t('manage'),          'title' => t('manage'),
136          'href' => "bookmarks2/$user->uid",          'href' => "bookmarks2/$user->uid",
137            'attributes' => array(
138              'title' => t('Manage your bookmarks.'),
139              'class' => 'bookmarks2_link',
140            ),
141        ),        ),
142      );      );
143      $output .= '<div class="links">'. theme('links', $links) .'</div>';      $output .= '<div class="links">'. theme('links', $links) .'</div>';
# Line 766  function bookmarks2_overview() { Line 771  function bookmarks2_overview() {
771        }        }
772        if ($link_display) {        if ($link_display) {
773          $rows[] = array(_bookmarks2_get_link($data->url, $data->title, $data->description, $data->options, $link_display), $data->uname, $decrypted_pword, '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/edit", null, 'url='. urlencode($data->url)) .' '. l(t('delete'), "bookmarks2/$user->uid/delete", null, 'url='. urlencode($data->url)));          $rows[] = array(_bookmarks2_get_link($data->url, $data->title, $data->description, $data->options, $link_display), $data->uname, $decrypted_pword, '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/edit", null, 'url='. urlencode($data->url)) .' '. l(t('delete'), "bookmarks2/$user->uid/delete", null, 'url='. urlencode($data->url)));
774        }        }
775        else {        else {
776          $rows[] = array($data->title, _bookmarks2_get_link($data->url, $data->title, $data->description, $data->options, $link_display), $data->uname, $decrypted_pword, '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/edit", null, 'url='. urlencode($data->url)) .' '. l(t('delete'), "bookmarks2/$user->uid/delete", null, 'url='. urlencode($data->url)));          $rows[] = array($data->title, _bookmarks2_get_link($data->url, $data->title, $data->description, $data->options, $link_display), $data->uname, $decrypted_pword, '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/edit", null, 'url='. urlencode($data->url)) .' '. l(t('delete'), "bookmarks2/$user->uid/delete", null, 'url='. urlencode($data->url)));
777        }        }
778      }      }
779      else {      else {
780        if ($link_display) {        if ($link_display) {
781          $rows[] = array(_bookmarks2_get_link($data->url, $data->title, $data->description, $data->options, $link_display), '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/edit", null, 'url='. urlencode($data->url)) .' '. l(t('delete'), "bookmarks2/$user->uid/delete", null, 'url='. urlencode($data->url)));          $rows[] = array(_bookmarks2_get_link($data->url, $data->title, $data->description, $data->options, $link_display), '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/edit", null, 'url='. urlencode($data->url)) .' '. l(t('delete'), "bookmarks2/$user->uid/delete", null, 'url='. urlencode($data->url)));
# Line 882  function bookmarks2_folder_overview() { Line 887  function bookmarks2_folder_overview() {
887    
888    while (list($key, $value) = each($folders)) {    while (list($key, $value) = each($folders)) {
889      $fname = (strlen($value) > 50) ? substr($value, 0, 47) .'...' : $value;      $fname = (strlen($value) > 50) ? substr($value, 0, 47) .'...' : $value;
890      $rows[] = array($value, '&nbsp;'. t(t('edit'), "bookmarks2/$user->uid/folderedit", null, 'fid='. $key) .' '. l(t('delete'), "bookmarks2/$user->uid/deletefolder", null, 'fid='. $key));      $rows[] = array($value, '&nbsp;'. l(t('edit'), "bookmarks2/$user->uid/folderedit", null, 'fid='. $key) .' '. l(t('delete'), "bookmarks2/$user->uid/deletefolder", null, 'fid='. $key));
891    }    }
892    
893    $output .= (count($rows) == 0) ? t('You have no folders.') : theme('table', $header, $rows);    $output .= (count($rows) == 0) ? t('You have no folders.') : theme('table', $header, $rows);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.2