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:
- Make catalog link / Administer link (via links_admin)
- Attach to this node / Detach from node
- 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 :)
Comment | File | Size | Author |
---|---|---|---|
#1 | embedded_links.png | 28.83 KB | dman |
links_related_resurrection.patch | 19.85 KB | dman |
Comments
Comment #1
dman CreditAttribution: dman commentedHere's a screenshot to illustrate the interface
Comment #2
syscrusher CreditAttribution: syscrusher commenteddman, 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
Comment #3
syscrusher CreditAttribution: syscrusher commenteddman, 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
Comment #4
dman CreditAttribution: dman commentedGlad 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:
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.
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?
:)