1
SMEDrieben
New Image manager in Xoops 2.5.0: help or torture ?
  • 2011/3/6 15:09

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


In Xoops 2.5.0, the image manager works differently from 2.4.5:
1) For new categories, there is no choice for storage in the database or the uploads folder (only storage in the uploads folder is possible)
2) Images already stored in the database (2.4.5. an earlier) are not previewed correctly in the admin Image Manager. I reported this earlier:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=73081&forum=74&post_id=335374#forumpost335374

I also reported these two issues in the Sourceforge bug tracker. Trabis answered that "Images stored in the database are deprecated in Xoops 2.5.0". Is it true ? If it is, then:

1) It is not stated in the release notes of 2.5.0 !
2) There is no script to convert categories stored in the database to categories storing images in the uploads folder.
3) Images from "Categories stored in the Uploads folder" are inserted in in modules, e.g. News, in a very unfriendly way.

Let my explain issue 3):
- If you insert an image using the Image Manager button of the tex editor from a category stored in the database, it looks like:

[img align=left id=1]Image Name[/img]


This code always works, on your test site, after moving your site to another domain.

- If you insert an image from a category that is stored in de uploads folder, using the Image Manager Insert button of the text editor, this image is inserted as:

[img align=left]http://yourdomain/uploads/images/img4d29c79cb6ceb.jpg[/img]


This is a full URL !! If you move your website to another domain (e.g. a testdomain) the links don't work any more. I think it should be:

[img align=left]{XOOPS_UPLOAD_URL}images/img4d29c79cb6ceb.jpg[/img]

or
[img align=left]{X_SITEURL}uploads/images/img4d29c79cb6ceb.jpg[/img]


or

[img align=left]<{$xoops_url}>/uploads/images/img4d29c79cb6ceb.jpg[/img]


However, these (smarty) codes don't work in e.g. news issues.

In summary, 4 issues:
- The deprecation of "images stored in the database" should be added to the release notes of 2.5.0
- Categories storing images in the uploads folder generate user-unfriendly urls in modules such as "News"
- There is no conversion script to convert image categories storing in the database to categories storing in het uploads folder.
- Not converting is an option, but then the "database-images" cannot be previewed in the image-manager

Wouldn't it be better to continue support for images stored in the database in Xoops 2.5 ?

SMEDrieben

2
SMEDrieben
Re: New Image manager in Xoops 2.5.0: help or torture ?
  • 2011/3/10 20:26

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


I've sent a mail to Mamba:

Quote:

Dear Mamba,
Trabis informed me that images stored in the database are deprecated in Xoops 2.5.0. This issue is not mentioned in the release issues of 2.5.0. I opened a thread on this topic in the support forum:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=73391&forum=74

In my view, you are supervising the release notes of 2.5.0. Please, can you respond to this topic or - at least - inform Xoops how they can get rid of "images stored in the database" and convert to "images stored in the uploads folder". Furthermore, please update the release notes of 2.5.0 !

Thanks a lot ! Kinds regards,

SMEDrieben



Mamba answered on March 7th, 2011:

Quote:

The release notes for XOOPS 2.5.0 have been updated yesterday.

I have to investigate what is the best way to convert existing images in the database to those in uploads. I don't have an answer right now.


3
SMEDrieben
Re: New Image manager in Xoops 2.5.0: help or torture ?
  • 2011/3/10 20:49

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


Dear Mamba,

This issue is different from the templates overriding issue: the latter could easily be converted.

I think that the conversion from "database images" to "uploads-folder-images" cannot be done manually. We need a conversion script. This script has to execute three steps:

1) store the database images in the uploads folder. The easiest way is to use image_name from the image-table in the database for the file name.

2) remove the imagebody table from the database. The image table must be left intact.

3) adapt the script of image.php or /class/textsanitizer/image/image.php or related scipts in such a way that xoopscodes like

[img align=left|center|right id=nr]Image nicename[/img]


keep functioning. When you were using database images, you will have hundreds of these codes in your module's databases. They cannot be changed in the codes that are regulare for uploads-folder-images. Therefore, the new textsanitizer should - using information from the image table in the database- convert the above given xoopscode to:

<img align="left|center|right" src="{Variable_referring_to_uploads_folder}/imagename"
title="Image nicename" />


I think this issue cannot be solved manually in 2.5.0. I think we need a 2.5.1-patch that executes this conversion.

Kind regards,

SMEDrieben

Login

Who's Online

407 user(s) are online (302 user(s) are browsing Support Forums)


Members: 0


Guests: 407


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits