Keyword

Image identification

  • Antonio
  • Antonio's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 11 months ago #76168 by Antonio
Image identification was created by Antonio
I need to construct a script that reads the title, introtext and the IMAGE from the k2 items but I can´t find how to relate the k2´s item Id to the corresponding image in the /media folder, since there are no references in the k2_items table.
How can I find the image knowing the item ID?

Please Log in or Create an account to join the conversation.

  • Antonio
  • Antonio's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 11 months ago #76169 by Antonio
Replied by Antonio on topic Image identification
I found it myself.
The images are in the /media/k2/items/cache folder.
The the filename is md5 encrypted.
To show the image SMALL related to an item, use:
(see attachment - This windows do not allow php codes)
(Change "_S" particle to "_XS" to show Extra Small, or whatever. )
(Change "$itemId" variable with your variable containing K2 item ID.

Please Log in or Create an account to join the conversation.

  • Antonio
  • Antonio's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 11 months ago #76170 by Antonio
Replied by Antonio on topic Image identification
Image showing the code.
Attachments:

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum