Here is a quite large patch that contains what it took to get links_related working again.
It looks like there were a few bits dead there since I dunno when.

Anyway, I've:

  • fixed the old forms into true 5.0 API callbacks
  • rendered the 'edit related links' page that we find as a local task under /node/{nid}/links/edit
  • fixed up the form-in-table rendering to fit with the changes made elsewhere (historically?)
  • added the following 'actions' as things that can be done to the auto-discovered links, either singly or in bulk:
    1. Make catalog link / Administer link (via links_admin)
    2. Attach to this node / Detach from node
    3. Create weblink page / Edit-View the weblink page

Extra things are happening to try and display the status and pre-existing entries of the links, but some UI work can still be done on that.

In the process, I've also streamlined two parts of the API (as mentioned in separate issues) mainly to change the instances of
for ($i=0; $i<count($links); $i++) into a more robust foreach ($links as $i => &$link)
and added a theme_display_url($url) function that turns long URLs into readable short ones (via some intuative truncation)

This update makes the absorbing of Embedded Links work again

It also supports the auto-creation on weblinks pages on-the-fly

Some work may still be done bringing the code closer to how it's done elsewhere (I've not explored the entire suite yet) but I think this is all useful stuff.

This work is all an extension of work I did on my own under 4.7, where I had my own link scanner and remote page status checker and weblink page maker. I'm much happier to be doing this as part of a larger-picture set of cool link tools :)

CommentFileSizeAuthor
#1 embedded_links.png28.83 KBdman
links_related_resurrection.patch19.85 KBdman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dman’s picture

FileSize
28.83 KB

Here's a screenshot to illustrate the interface

syscrusher’s picture

Status: Needs work » Reviewed & tested by the community

dman, this is an awesome patch! You have added several features that I had intended to do and hadn't had time yet. Many thanks! This will be committed as part of release 5.x-1.5. I made a couple of minor cosmetic changes, but the functionality works great.

I haven't reviewed the other two patches from you yet, but will.

You're most welcome to contribute in the future. If you decide to do another large patch like this, please let me know ahead of time so we can sync up on work. It wasn't a problem this time, but I could see a potential for patch collisions in a large update like this. I want to make sure that doesn't happen, because your ideas are good and I want to be able to get them committed ASAP.

Feel free to email me (use my contact form) or Eaton, who also has CVS commit access on Links, to suggest other features. I like your thinking on this.

Again, thanks for a tremendous patch. You've moved the module ahead significantly.

Syscrusher

syscrusher’s picture

dman, this is an awesome patch! You have added several features that I had intended to do and hadn't had time yet. Many thanks! This will be committed as part of release 5.x-1.5. I made a couple of minor cosmetic changes, but the functionality works great.

I haven't reviewed the other two patches from you yet, but will.

You're most welcome to contribute in the future. If you decide to do another large patch like this, please let me know ahead of time so we can sync up on work. It wasn't a problem this time, but I could see a potential for patch collisions in a large update like this. I want to make sure that doesn't happen, because your ideas are good and I want to be able to get them committed ASAP.

Feel free to email me (use my contact form) or Eaton, who also has CVS commit access on Links, to suggest other features. I like your thinking on this.

Again, thanks for a tremendous patch. You've moved the module ahead significantly.

Syscrusher

dman’s picture

Glad it fit OK.
Yeah, I know it was a big change, but it seemed that that part of the code was dead or languishing anyway, so any change was good.
I thought about checking ahead first, but a scan of the current discussion issues seemed pretty inactive, and damn, I just wanted to get it working! As I mentioned, I was about to start porting my 4.7 + weblinks module to 5, but discovered weblinks had gone away.
And I liked the idea of working with a clean fresh API.

Based on my current part-time project, some more thoughts are to:

  • Tag the the created weblinks pages with the parent pages taxonomy terms (optionally of course). This is a big win.
    I started building an ajax subform (to enhance the weblink node creation inline in that table) ... which is why I decided to move up to 5.x in the first place ... and hm. That didn't happen.
  • I originally had this all in the node edit screen, but I liked your tabs version better. Incidentally however, the edit links tab is inaccessible unless the public view links is enabled. Something to do with MENU_LOCAL_TASK with no parent. Can be cured.
  • Auto-discover genuine titles (and descriptions?) from remote pages using cURL get and page-scraping. I've done it already, but need to plug it into the API somewhere.
  • This includes an immediate link-checker also - the auto-discovered links need to be verified before even showing this interface, however it's obviously a bit slow. I'll see what the current code can do for me.
  • Find a way to connect this click-tracker with the banner.module. (unfortunately) my current task is all about rewriting reams of pages that are mostly textlink clickthrough referrals. Although the catalog I'm importing is useful data, the URLs are horrid. If I can plug this links 'goto' into banner.module, or vice-versa I can see some traction.

Further down the track I will maybe add a filter feature to rewrite these found offsite links and/or annotate them with titles, styles and stuff, if it's not already been done. I've already got the code for that too, although it was developed for onsite document downloads etc.

Anyway. What's the status with the admin interface? huh? huh?

:)