Project:userlink
Version:6.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Anybody knows if userlink will be port to 6.0?

Comments

#1

I needed to find a solution to replace userlink after I upgraded to Drupal 6.2.

The method I used turned out to be very simple and affective in the end.

Install the cck module and create a content type

Name: userlink, Type: userlink

I've attached the exported content type for your reference.

The Node for the original userlink's are still there in the node table, and also the body and teaser are in the node_reversions table.
There is no need to touch these.

The original URL links are in the userlink table.
It has the following columns: nid, vid, url, private

The new userlink content type definition defined using the CCK is stored in table content_type_userlink
The has the following columns: vid, nid, field_url_url, field_url_title, field_url_attribute

Example data: 177, 108, 'http://www.yourdomain.com/', 'http://www.yourdomain.com/'', NULL

All you need to do is copy the content of the original table into the other as follows:

nid > nid
vid > viv
url > field_url_url
url > field_url_title
private discard
Put NULL into field_url_attribute

I exported the data using MyAdmin, edited it in my text editor (you could use Excel) and import it back into the content_type_userlink table.

Now when you display your userlink content types it shows the URLs with url title the same as the url reference.

This is not intended to be a "blow by blow" list of instructions as I assume most of you know how to use MyAdmin and set up custom content types.

Have fun, David

AttachmentSize
Export Content Type userlink.txt 3.06 KB

#2

Thanks for this, David. Some variation on this is definitely the way forwards with userlink.

I hope others will chime in on this thread with their experiences, and if anyone is able to automate this, I suspect you'll make some folks happy.

#3

Worked like a dream :)

Make sure you have the Content Copy CCK module enabled to be able to import - then grab the attachment and import it.

To port the content - I ran

insert into content_type_userlink (vid, nid, field_url_title, field_url_url, field_url_attributes) select vid, nid, url, url, null from userlink;
drop userlink;

#4

Great! I'd like to keep this thread open for anyone else who needs to move their userlink data to 6.x.

Has anyone who's done this also replicated any of the stock blocks that userlink.module provides in 5.x? It should all be pretty easy to do with Views, so I'm hoping folks will post their experiences with this here.

Thanks for contributing this useful information back to the community -- often I find myself just moving on after something like this worked out for me, but posting success stories like this in the right place will definitely help save other folks time.

#5

Done one.

The page:

http://test.longship.org/links

(note - when I get it finished then this will move to http://www.longship.org/links replacing the 4.7 install there - so if the above link is dead - try this one).

has the following view (grouped by a taxonomy so you'll have to massage it a bit):

$view = new view;
$view->name = 'links';
$view->description = 'Links';
$view->tag = 'Longship';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_url_url' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'url',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_url_url',
    'table' => 'node_data_field_url',
    'field' => 'field_url_url',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'name' => array(
    'label' => 'Term',
    'link_to_taxonomy' => 0,
    'exclude' => 1,
    'id' => 'name',
    'table' => 'term_data',
    'field' => 'name',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'userlink' => 'userlink',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => 'name',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'field_url_url' => 'field_url_url',
    'name' => 'name',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_url_url' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'name' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler->override_option('row_options', array(
  'inline' => array(),
  'separator' => '',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('title', 'Lenker');
$handler->override_option('path', 'links');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Links',
  'weight' => '0',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));

#6

Version:5.x-1.2» master
Status:active» needs review

I started to port this module to drupal 6.

I hope for it I prepared the patch correctly.

AttachmentSize
userlink.patch 33.01 KB

#7

Thank you, antal.istvan, for the patch.

If anyone is able to apply this and test it, I'd appreciate the feedback. If the community can put together a working port of this, I'll commit it and make a 6.x release.

- Marc

#8

I'm totally new to Drupal, but it looks good. Assuming this module is for bookmarking external links (Among other things? Categorizing / labeling them? Internal links, too?), this is one feature I definitely foresee needing and am not aware of other modules for.

What I'd like to be able to do is to basically bookmark and categorize a TON of news site articles that I've run across in my field of interest (astronomy), so that I and my friends / colleagues can have a way of easily browsing / searching for them, as well as a central repository. It might even be nice if there was a mechanism for other users to "suggest" links for an admin to "approve" / "add" (if that's not already part of the module). So friends could inform me of new articles they run across.

Is there any way to turn such a bookmarking tool into an RSS-ish distribution list? Can such a thing also interface with Drupal's RSS aggregator (to fill in the blanks on OLD articles, from before one turned on the aggregator)? Don't know if such a thing would work or not.

Really, I guess what I want is a [semi-?] collaborative database of bookmarks that can serve as a knowledgebase. Doesn't have to be anything like caching copies (though that would be nifty), so much as a link-management and categorization system. If such a thing exists or could exist, I'd be all about it (despite being new and having no programming experience; though I've used databases & SQL, etc. for several years now). Just noting what I'm looking for, at the moment.

Regards,
~Michael

#9

Version:master» 6.x-1.x-dev
Status:needs review» fixed

Many thanks to antal.istvan for providing the patch that got this most of the way there. I wasn't planning on porting to 6.x but the patch was so good that I had to get it out there.

There will be a 6.x-1.x-dev version available for download soon. Ideally a few folks will be able to look at it and I'll cut a 6.x-1.0 release in a few days.

@mgmirkin and others -- I'm closing out this issue since we've got a 6.x port. Please open new support issues if you would like.

#10

Status:fixed» closed (fixed)

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

nobody click here