Active
Project:
Image Assist
Version:
6.x-2.0-alpha4
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Reporter:
Anonymous (not verified)
Created:
30 Jun 2010 at 13:42 UTC
Updated:
23 Mar 2022 at 15:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Scott J commentedMedia module comes with a media browser and filter, and is being used at drupal gardens to do the job on Drupal 7.
Comment #2
Anonymous (not verified) commentedThanks for the suggestion; I will have a look. One of the issues of switching over would of course be that all the Image Assist code (we at least did not insert HTML directly) would have to be converted. But then moving to D7 and image in core will mean changes anyway. Still, it would be good to know what, if any, future Images Assist will have.
Comment #3
alanburke commentedSubscribe
#2. One option might be to convert the IMG assist macros to straight HTML in the db directly.
Comment #4
Anonymous (not verified) commentedConverting in the DB directly may not be too difficult; it would also mean taken the right bits of the CSS from Image Assist and adding it to your theme. It would still be good to have similar functionality to Image Assist provided in Drupal 7...
Comment #5
Anonymous (not verified) commentedEven if there are alternatives, it would still be good if the developers would tell us what their plans are for Drupal 7. If Image Assist is not to be continued it would be helpful to know so that we can prepare to move to another solution. If there are plans to port it to Drupal 7 it would be very interesting to hear details.
Comment #6
Scott J commentedTrue. Especially for people wishing to upgrade a site from D6 to D7.
Comment #7
smls commentedsubscribe
Comment #8
heyyo commentedsubscribe
Comment #9
loyukfai commentedInterested in this as well. Regardless, an upgrade path to Drupal 7 is needed.
BTW, is there any inline image module in Drupal 7 core? Or which inline modules have #D7CX?
Comment #10
Scott J commentedloyukfai,
No, not in core, but see my post at #1 above.
Media module has made the pledge, and in fact already works.
Comment #11
loyukfai commentedThanks!
Now, we only need something to convert Image Assist tags to something compatible with the Media module.. . (btw, does it insert html tags or something else?)
Comment #12
Scott J commentedDefinitely something else ;-)
You have to turn on a filter in your chosen Text format.
Comment #13
parasolx commentedor there is way to convert all filter tag to html tag?
cause i used filter tag for all my image
Comment #14
Anonymous (not verified) commentedWe should remember that Image Assist does more than just display the images. I'd assume it would not be too hard to find/write a script that changes the Image Assist codes in the nodes into proper HTML (after all Images Assist can also insert HTML). However, leaving the - in my opinion - easy to use way of managing and adding images to posts aside, Image Assist also provides links from the node the image is embedded in to the actual image node (via blocks). This very nice feature (for one of my sites it is highly important) would be lost.
Now, for all of these things there may be workarounds. But then I do wonder why there is no port for a module that is used by over 20.000 sites. I am very happy to help with testing etc. and I am sure others would too.
Comment #15
nubeli commentedI agree it's hard to replace img_assist. I've found it quite useful in its simplicity and there doesn't seem to be a good replacement yet. I've got Imagefield Assist (a fork of img_assist) working on a newer site - it works fairly closely but not exactly. It references the fid instead of the nid so it's not automatically associated with a particular node. It can, however, work with a particular node type with imagefield on it.
Comment #16
Anonymous (not verified) commentedThanks for your comment, nubeli. Sadly it seems that Imagefield Assist is also not available for D7...
Comment #17
the fatman commentedsubscribe
Comment #18
fonant commentedIt looks like the Media module requires a WYSIWYG editor. I prefer to use Textile as a lightweight markup system using standard plain text fields.
So a port of img_assist would be nice, unless there's a way to get Media to work with plain textareas?
Comment #19
xetrokis commentedI made a PHP script to convert Image Assist Tag into HTML tags :
This script must be run on D7 database (after the update from D6 to D7).
Comment #20
parasolx commentedso the script need to be run on D7 database or D6?
meaning, it must be upgrade to D7 first, then run the script?
Comment #21
xetrokis commentedThe script must be run on D7 database, so you must upgrade to D7 first.
Comment #22
wcweb commentedI tried running this script after upgrading to Drupal 7, but img_assist tags still appear in the nodes. (Perhaps the .php file needs to be ignored in .htaccess or something?)
Also, I was still running with an alpha release of image, and hadn't enabled views when I ran the script, but I kinda expected the operation to happen at a database level to convert the tags to html.
Sorry, but I'm a just an average Drupal user, and not programmer; but please will you stipulate dependency modules or any other information you can?
At this point I'm considering trying to migrate from the image module to imagefield on Drupal 6.20, and then upgrading to D7. At that point I imagine to try and work out a database update script to replace img_assist inline images with HTML.
Don't really know where to start though. It's one thing being caught out with the image module, but then I'm doubly confounded with img_assist.
Any advice or pointers gratefully appreciated, as I am really confused.
Comment #23
xetrokis commentedHave you modified these lines with your server's information ?
Comment #24
fax8 commentedsubscribe
Comment #25
jessicakoh commentedsubscribe
Comment #26
Encarte commentedsubscribing
Comment #27
aaronpinero commentedSadly, Media module falls down in many respects and is unusable in the way that it needs to be most usable: for users who don't have coding skills and rely on the WYSIWYG tools to create content and post images. Image Assist is the only module out there I've been able to find that:
(1) manages a library of images
(2) allows users to apply additional information to image (captions, photo credits)
(3) allows users to select image size presets
(4) allows users to place image (float left, float right, etc.)
And does all of this from a single interface within a WYSIWYG tool.
(To be fair, I think the image upload module can also do most of this in D6)
Media doesn't offer the image placement, captions or other additional information, or provide any more than the hard coded image styles available in the default installation.
These seem like really basic needs for content publishing. All of the users for whom I manage Drupal websites need to be able to do these tasks when publishing content, and they can't be the only ones who do. Image Assist is the single best module available for providing these functions. I really hope the effort to port the module to D7 hasn't been completely abandoned in favor of the inadequate Media module.
Comment #28
Anonymous (not verified) commentedLike you, I so far have not found a module that can replace Image Assist. This is really surprising seeing how many people use the D5+6 versions and that there is a clear gap in functionality. It would be really good to get a statement from the maintainers about the future of Image Assist. If they have no intention and no one else steps up, we need to start talking to related D7 modules and see if we can get the functionality included. I hope there will be a D7 Image Assist though! I have taken the liberty to increase the priority to "major" as without that feature the days of Image Assist are counted.
Comment #29
jeffwidman commented+1
Comment #30
rondev commentedI changed a little the script #19 by xetrokis http://drupal.org/node/841568#comment-4093474 to make it run as I have some prefix in my database. like this:
$prefix = 'd6x_';...
$query = "SELECT * FROM ".$prefix."field_data_body WHERE body_value like '%[img_assist%'";...
I think it is not related to my prefix but I can't make it run. I have errors like this:
It maybe something wrong with the initialization of the loop
while ($start = strpos($tmp, "[img_assist") !== FALSE)as I noticed that $start doesn't get the good value. Could it be related to PHP version? I'm a total newbie to PHP.I have to do the same thing with body_summary instead of body_value. And at the moment I get the same kind of error.
Comment #31
bcaimano commentedsubscribe
Comment #32
HylkeVDS commentedsubscribe
Comment #33
Pasi commentedsubscribe
Comment #34
xuj commentedI came across the same issues and PHP errors as rondev had when running xetrokis's script. I made a couple of bug fixes to make the script work. It ran successfully on a site with ~1500 nodes and 15 image assist tags that was upgraded from D5 -> D6 -> D7. The modified script is below, taking into account rondev's prefix suggestions. I commented the changes I made.
Comment #35
peetucket commented+1
Comment #36
desierto commentedI concur. Media module does not yet have the ability to replace Image Assist.
As others have stated being able to insert images inline through the WYSIWYG (with captions and ability to easily pick through previously uploaded images) is one of the most basic and often needed attributes of a CMS.
I can't code yet, but encourage anyone who wants to help the Drupal community with something that almost everyone will use, this is a great thing to focus on - maybe through upgrading the Image Assist to Drupal 7 or making a feature or add-on for another module.
Comment #37
Anonymous (not verified) commentedFrom looking at the comments it seems there is a lot of interest in using Image Assist on D7, or at least having a module that provides similar functionality - and that there is no alternative yet. It would be really helpful to get a statement from the maintainers about their plans for Image Assist, although it does not look like they have any interest in making this happen.
Assuming the maintainers don't plan any D7 work, I think it would be up to us to get Image Assist ported to D7. Unfortunately, my skills are not up to the task, but I would be happy to help with testing, logistical support etc. Is there anyone around here who would be prepared to take the lead on the development, or could we perhaps all put a few bucks in as an encouragement to a developer?
Or has anyone found a suitable replacement for Image Assist for D7? See aaronpinero's posting (#27) on Image Assist features.
Comment #38
aaronpinero commentedFor temporary use on a D7 site, I'm using the following mix of modules:
- For uploading images, I have added IMCE (http://drupal.org/project/imce) and the IMCE WYSIWYG API Bridge (http://drupal.org/project/imce_wysiwyg) so that IMCE will work with my editor of choice, TinyMCE. IMCE has been around a while and works well enough. The only issue I have with this arrangement is that I cannot provide 'presets' using image styles (formerly image cache).
- For placing an image, I use the image widget in TinyMCE. You can float an image left or right. The advanced options allow the addition of classes or inline styles.
- For captions, I am using the Image Caption (http://drupal.org/project/image_caption) module. I like the input filter version of this module since it's not dependent on JavaScript/jQuery.
- For placing video from third party websites (YouTube, Vimeo) I am relying on the Media module. As much as I dislike the current state of the Media module, I know it's probably the future of media handling on the website. These same folks created the very useful embedded media modules so I think they'll get the issues worked out eventually. It's just they seem currently focused on things that have nothing to do with the UI. There also seem to be a lot of cooks in their kitchen.
I'm very interested in learning about other ways folks are using contrib modules to fill the image assist gap in D7.
Comment #39
Anonymous (not verified) commentedIt is an awful lot of modules just to replace a single one (okay, the video is there too - btw. I use Video Filter for that purpose as it seems relatively light weight). But then if that is what it takes to make things work... I am still stuck with D6, because of being unwilling to give up on Image Assist just yet.
Comment #40
nickistre commentedsubscribing
Comment #41
ñull commentedsubscribing
Comment #42
akejoha commentedSubscribing. Badly needed.
Comment #43
BeaPower commentedsub
Comment #44
Rasa-1 commentedSubscribing.
Comment #45
jboeger commentedsubscribing. maddening. I have begun 2 Drupal 7 sites and they are such a drag to work with. I have since started my new projects in Drupal 6 for reasons such as this.
Comment #46
davycw commented+1
Comment #47
sprintstar commentedDrupal is now on 7.8, and I still cannot use it because I need my content editors to be able to insert pictures into their copy. I have argued for like 5 years that this sort of stuff should be bread-and-butter to a CMS, eg built right into core. Oh well, at least there is v6.. :|
Comment #48
vivianspencer commented+1
Comment #49
ro60 commentedI found myself in this exact position recently but I had all of my old image data in a drupal 6 database and all of the nodes in a drupal 7 database. So I modified the script post above to use 2 databases. Reposting in case someone finds themselves in the same position.
Just a couple general suggestion, backup your database before you run this script (or any of the above). Also there are some debug statements peppered through the code from previous authors. I suggest doing a dry run by tossing in an exit() after the debug output and before the update query is run to make sure the img tags and update queries look logical.
Comment #50
amysragbag commentedsubscribing
Comment #51
colling2 commentedI've done a bit of work on a drupal 7 port. Its not perfect but its nearly there.
You need to convert image nodes using the drupal 7 development version of the old image module and the Field Convert module.
As image sizes from old module have gone and been replaced with image styles in drupal core that is what image assist now uses. But only if the style has size only transformations - anything else and that style isn't available. Image assist now also includes 3 styles based on the old 3 sizes from the image module. You can't alter these through the front end but you can always add more styles with the sizings you need.
The attachment includes the altered image assist and the modules needed to convert the old image nodes - the development image_legacy module and Field Convert module. Drupal 7 image module is only available via the git repository at the moment. Field Convert is available to download but I've included it here as that's the version thats worked for me.
I don't have much time to offer any support for this. Use at your own risk! Please do a test migration and make sure everything works how you need it to before using this on a production site.
One thing to node when converting the image nodes is to make sure that you don't have any duplicates in your file table. If there's more than one row with the same file name you'll get errors.
Comment #52
bcobin commentedThank you for the D7 port - I'm finding as I attempt my first D7 production site that this is very sorely needed!
But I haven't had luck getting it to work - perhaps someone could provide some guidance.
A few questions/details:
I'm using only the img_assist module insofar as this is a new site and I don't need to upgrade. Are the other modules necessary for this to work?
The included view doesn't find an acceptable content type and it doesn't seem to work with "Photo" (I'm using the OpenPublic distro and that seems to be the only suitable content type.) I don't know if this is the cause of it, but I haven't been able to get a link to show up below the edit form, no matter what I do.
In looking at the D6 version of ImageField Attach, the browser view looks fairly complex - would it be possible to get a content type/view export combination that could be expected to work out of the box in D7?
In D6, I was also able to choose whether the image could open in a Lightbox - my preferred method was to insert an image (with ImageCache preset) that when clicked on would open the original in a lightbox for greater detail. This was really elegant and I'm hoping to be able to do the same in D7. Would this be possible?
Anyway, it's good to see there's some motion here - thank you! Pretty painful transition so far, but I remain ever hopeful... assistance greatly appreciated!
Update: It looks like TinyMCE recognizes Image Assist as is (there's a little camera icon) - I get the following error, though when I try to invoke it (I'm in a sandbox):
Notice: Undefined property: stdClass::$node_image in img_assist_display() (line 1337 of /Users/[user]/sandbox/openpublic/sites/all/modules/img_assist/img_assist.module).Perhaps this will help - thanks!
Further testing:
Using this with TnyMCE, Image Assist invokes via a camera logo in the TinyMCE toolbr (good) and offers to browse through My Images (0), of which there are none. When I try to upload a new images, I get the following error:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'image_node_form' was given in drupal_retrieve_form() (line 785 of /[site]/includes/form.inc).Looking at the view, it finds no suitable content type. So I changed it to "photo" (which exists). Cleared caches and got the same result.
I think I could be missing something small - any ideas? The lack of Image Assist (particularly when it worked so nicely in D6) really is a showstopper for D7.
Thanks for any suggestions!
Comment #53
naught101 commentedfor trackers
Comment #54
pedrochristopher commentedHaving trouble here. I believe I have followed the instructions properly, yet I am getting errors in the field_convert step. Not understanding d7 super well yet, my guess is that field_convert should be adding many, many lines to files_managed for each of the nodes, but this is not happening. This is my error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=5163&op=do StatusText: error ResponseText: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://images/Sarah-McLachlan-pic.jpg' for key 2: INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => Sarah-McLachlan-pic.jpg [:db_insert_placeholder_2] => public://images/Sarah-McLachlan-pic.jpg [:db_insert_placeholder_3] => image/jpeg [:db_insert_placeholder_4] => 377528 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1273717667 ) in image_legacy_field_convert_object_pre_load() (line 229 of /var/www/html/samaritanmag.com/site/sites/all/modules/image/image_legacy.field_convert.inc).
Happy to pay a bounty of 200 for anyone who will screenshare over my shoulder and talk me through getting this fixed and getting the img_assist d7 working on my d7 site. Pls email me asap!
Comment #55
colling2 commented"One thing to node when converting the image nodes is to make sure that you don't have any duplicates in your file table. If there's more than one row with the same file name you'll get errors."
You sure you haven't got more than one row in your file table that has the same file name?
Comment #56
colling2 commentedSome things that don't work at moment.
When resizing the images using a custom size the javascript is incorrectly setting the width same as height / height same as width so you'll end up with a square image.
When uploading images there's an upload button next to the browse button. This doesn't work. If you submit the whole page using the save button at the bottom though the image should be uploaded and created.
Comment #57
aaronpinero commentedThank you colling2 for your initial efforts. I'm looking forward to hearing how this shapes up. I don't have any other comment. Just gratitude.
Comment #58
firepug commentedsubscribing
Comment #59
firepug commentedIMCE + IMCE WYSIWYG API Bridge with TinyMCE is working great as an alternative for me. The installation effort was minimal.
P.S. We really need a way on drupal.org of promoting best or summary solutions to the top of these posted questions. The only solution for someone who doesn't want to get involved in PHP coding is at number #38!
Comment #60
Anonymous (not verified) commentedIs IMCE + IMCE WYSIWYG API Bridge really a full replacement? First of all it seems to require a WYSIWYG editor (please correct me if that is wrong) whereas Image Assist does not - and I don't want to use an editor. Also, from the TinyMCE demo I have seen there was no way to centre an image (only left, right, bottom, middle, etc.)? What your solution also does not seem to do is to automatically insert links from the image node to every other node the image is embedded in - and while I may come to terms with issues one and two and having to install several modules where so far one does the trick I cannot do without those links.
So unless I am missing something (which I hope I do) there still is no real replacement for Image Assist?
Comment #61
bcobin commented+1 for #60. I was actually using ImageField Assist in D6 and you could easily insert an image to taste that would open up when clicked in a lightbox (with the full-size version) and if you wanted to get into Custom Formatters, you could have a caption on the image too.
Very slick - and all without using a WYSIWYG editor, which can really be more trouble than it's worth.
I really miss this functionality in D7.
Comment #62
colling2 commentedThis should fix the issue with the aspect ratio. This is just the module to replace the one from my earlier zip.
Comment #63
Balbo commentedI think line:
in #34 should be replaced with:
It didn't work for me but with this change it now does!
Comment #64
aaronpinero commentedIMCE with the WYSIWYG Bridge is a solution, but not a complete solution. It doesn't address the addition of captions. It also stores images in a way that is outside of the Drupal entity system. It also doesn't work with Image Styles. But yeah, you can get by with it.
Comment #65
theropodx commentedWow, something like nine months after this question was first posted and as far as I can tell the Image Assist maintainers have no reply regarding D7 support.
This is a huge problem for people who want a CMS (like they had with D6!) that will allow easy inserting of inline images, etc. In my case, we're trying to migrate a VERY large site from D6 that had all images inserted with Image Assist. Again, this is a massive problem for me and my client(s)...really shakes my faith in Drupal (not trying to start something here...just extremely frustrated with no simple solution in sight).
Comment #66
Anonymous (not verified) commentedI agree. Obviously, you cannot hold it against Drupal as such when maintainers of a specific module appear to give up on it, and we should also remember that many people here share their work for free - but I think it would be nice if the maintainers would at least tell us what their plans are. As things are we can only conclude that they have given up.
So we have no other choice of either saying goodbye to this module; wait wait wait; or find someone willing to migrate it. I'd be more than happy to help with testing and perhaps also contribute to a bounty for migrating the module, but we need more support.
Comment #67
colling2 commented@TfR75 - have you seen the port from #51 + #62?
This is working fine for one of my previously d5 sites.
The only problem I'm having now is that when uploading images there's an upload button next to the browse button. This doesn't work. If you submit the whole page using the save button at the bottom though the image should be uploaded and created.
Getting the upload button to work shouldn't take much, I just don't have much time right now.
Comment #68
ñull commentedIn the next few months I will have to migrate a medium sized D6 site to D7 and will need to choose a solution. I already decided to use one of the alternative ways of inserting images in D7.
Apparently the reuse of images has less priority for my client than easy of use. img_assist is great for reusing images, but it is annoying that another window opens and you have to submit another node, with all the group membership decisions (when you use groups) and tags etc. This really slows down the work flow. The alternative methods don't allow easy reuse of images, but at least people can upload and insert faster, without pop-ups.
Depending on the complexity of the migration, I might end up with a system where old inserted images are still served and displayed through a patched img_assist module, while all new images are inserted with the alternatives available for D7. Whatever I end up doing, I promise here to keep record and document all the steps I took in the migration process and share them with you.
Comment #69
Anonymous (not verified) commented@colling I saw the first posting but from the comments following that I concluded that it still needed some work - and then missed your follow-on comment with the updated version. I wonder if/how we can get the maintainers to include your code as a dev version. This would be the ideal way to give it the proper testing and ensure that we can all join forces to make this into a proper D7 module, supported through this site.
I will email them...
Comment #70
Rosamunda commentedI´m particularly interested in how to use other module to work with old img_assist images, because times goes by and I need to upgrade my site to D7.
I´m looking forward for your follow up @ñull!
Thanks!
Comment #71
Anonymous (not verified) commentedUpdate: one of the maintainers (Hannes got back to me. Sadly, he is no longer involved with the module. No response so far from the second maintainer, Daniel. I wonder if someone new was interested in becoming a maintainer?
Comment #72
boftx commentedsubscribe
Comment #73
farald commentedThe script in #34 does not work with russian characters. It renders the rest of the body field unreadable.
Comment #74
olleolleolle commentedimage_assist_fix.php is my regex-based take on the problem of fixing the img_assist tags into static IMG elements.
I had fun working on it. Have fun using it.
Comment #75
zietbukuel commentedThank you olleolleolle.
Comment #76
cheese_monkey commentedStop spamming the issues list with "subscribe" posts. Just click "Follow" in the top-right corner of the page.
Comment #77
seehawk commentedHas anyone been able to get this working with just the icon/link, and not in the WYSIWYG? It's not showing up for me, but I haven't had a chance to dig into the cause yet.
Comment #78
ñull commentedThe here posted migration scripts are very helpful, but they are in some circumstances not complete. What if there are revisions and if you allowed img_assist in comments? And what about its use in summary (teaser)? I'll try to add these missing parts to the script and I'll post them back here.
Comment #79
mo-seph commentedI've been using the D7 port, and it's gradually behaving itself.
I had to fiddle with the field convert code - it was falling over because of repeated filepaths. I couldn't reproduce it when querying the database directly, so instead I wrapped the insert code in a try/catch so that it would just skip the repeats. I reversed the order of the list as well, so it should be (vaguely) last-first, so the most recent version is used where there are duplicates. (Code at bottom[1]).
Now things seem to work, which is great, but there are a few issues:
1) loads of warning messages[2]
2) tags seem to *need* width and height, where before they just needed one or the other.
3) popup images are tiny, about 100px wide
4) there's no button on text areas to add an image
1) seems to be strongly related to 2) - I'll see if there's an easy fix.
any thoughts on 3) and 4)?
[1]
Line 204: add:
$files = array_reverse($files);to reverse the file list.Then wrap both insert statements in try/catch
Line 230 change:
to
Line 260ish change:
to
[2]
Errors are all like this:
Comment #80
mo-seph commentedOK, on further exploration it seems that:
* most of the noices are by-design, i.e. using null keys on purpose in expressions
* some of the height/width substitution works by default, some doesn't - I get some gigantic images appearing.
I've hacked my copy a bit to make it work, but it's a bit ugly, and I discovered code in img_assist_render_image that does a similar job, so it's probably not a good idea to share until I understand the design of the module better.
Comment #81
marktompsett commentedThis is the code that worked for me. It converts all of the tags in each page (not just the first one), and it correctly aligns each image (left, right), but you have to be sure that each page is 'Full HTML' (not 'Filtered HTML' as one of mine was) for it to work properly.
Comment #82
iaminawe commentedI found this technique of using the custom filter module worked great for me http://hyperlogos.org/blog/drink/Migrated-D7-displaying-images
Comment #83
trunksy commentedThis is in response to marktompsett, #81. I know this is an old post (7 months old) but this thread seems to be the only migration path for Drupal 6 to 7 for Image Assist. I copied your code into a PHP file after updating the credentials for my web hosting account and put it on my website root. Does this only run in Drupal 6? I already have Drupal 7 loaded and it takes an hour to download or upload Drupal via FTP since I don't have SSH access to my web host. I don't even have SFTP but that's typical for free web hosts that you give up certain things. Either way, I get a blank web page with no messages at all. Can you offer some troubleshooting steps? Usually, with an error, at least I can Google it.
Comment #84
scothiam commentedNot sure if anyone is still on D6 (like me, sad face) but I'll mention anyway: comment #49 worked best in my case, just had to update line 90
Thanks,
Comment #85
kniekel commentedI know this is a VERY old post. I wanted to update my last remaining D6 site straight to D8. So I replaced the img_assist tags BEFORE the upgrade. This is the code from #81 with some adaptions to run it within the D6 database.
I had to run it from the command line using PHP 53.
Comment #86
joporgepe commentedThank you very much Kniekel. This worked very good for me. I just had to deactivate error_report fot deprecated function. Now all my images are available in all the contents migrated :)
Comment #87
rivimeyFor what its worth, because I want to migrate D6-D8, I didn't want to use the D7-required script, so I created this drush command for D6 instead.
I found the 'direct' path didn't translate some of the tags -- I think there is a loop missing-- so have reworked the code using img_assist's own render code, which of course works. One side-effect of this is that the < img > tag regains left/right spans & caption text.
It uses D6 node_load and node_save so should interact well with other modules. I haven't attempted to fix up old revisions. I have used drush_confirm, so use "drush -y" as appropriate.
Instructions:
Download the attached file
Rename it to "img_assist.drush.inc" and put that file in the ../modules/img_assist folder for D6
Clear drush cache: drush cc drush
The new command is called "image-assist-render-nodes" or "iarn" for short. It will find all nodes containing the img_assist tag in either teaser or body. I considered a render by node id option but it wasn't worth it for me.
Hope it helps someone.
Comment #88
joporgepe commentedI've update the code of Kniekel (https://www.drupal.org/node/841568#comment-11494035) to use mysqli, so you could use this script with php > 5.4 and < 7.0
Comment #89
Reach commentedThank you very much for the code, Jorge.catalyst and Kniekel.
I very to run it on my old Drupal 6 site, but what happens is that it only removes the old img assist tags, without replacing it with anything.. Any idea what could be wrong? The first time I run it it reports have changed 36 instances (which it does, by deleting them), and the next time nothing, but all image code is gone (apart from the coding I had around the tags).
Any help would be greatly appreciated!