May 25, 2013, 12:04:08 AM

Login with username, password and session length

FORUM POSTING GUIDELINES - Please read and follow them.

Pages: [1]
  Print  
Author Topic: Set "Intro_images" with JReviews  (Read 639 times)
sebkun
Sr. Member
****
Offline Offline

Posts: 193


WWW
« on: September 24, 2012, 12:19:40 PM »

Hi,

Here is a thought, I think which is not a lot of work and would be really great for JReviews.

With Joomla 2.5, Joomla finally gets to use the "images" field of #__content with a JSON information :
{"image_intro":"path-to-image","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"path-to-image","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}

I know JR 2.4 is way more flexible. However, there are a lot of great modules which can't be used with it (like RokSPRocket) and I think it would be quite complex to make them do (I tried with this module, and I've been stuck at one time…).

However, I think it would be quite easy to add a step in the setMainMedia() function (or another one if I'm mistaken) :

Each time a MainMedia is set, the function could set the JSON record for Image Intro. Of course, it's duplicate information. But it could ensure a total compatibility to any com_content compliant module !!  Smiley

(Of course, we won't have fields support for RokSPRocket but that should be a work from RT Team that, souldn't it ?  Wink )

Kristian, Alejandro, what do you think ?

I know you're in the middle of debugging but I think of all the people (like me) who will use JR2.4 to migrate to J2.5 ! You could save a lot of headaches I think.
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*
Offline Offline

Posts: 28418


« Reply #1 on: September 24, 2012, 01:41:26 PM »

That's not an option. First, what gets stored in that field are the intro and full text images you can insert via new settings in J2.5 which have nothing to do with images embedded in articles. I find those new settings a bit useless, but that's just my opinion. Most people will be embedding images in articles and I bet you that those are the ones most 3rd party extensions are able to find and display in their modules. Not the ones you add via separate Joomla settings. Also adding those images to the json object in content.images forces them to appear in article detail pages outside the JReviews layout. This isn't an issue of JReviews adding compability for 3rd party component modules. It's the other way around. When someone releases a K2 compatible module, they add code that finds and renders the images for K2. Not the other way around. Now that we have a dedicated media system it will be even more work to make those modules compatibles because they will need to read the JReviews media table to find the appropriate image to display and build the url path. It's not that difficult and if a 3rd party wants to do it they should be able to without too much trouble.
Logged

http://www.reviewsforjoomla.com/testimonials Leave a testimonial for JReviews
sebkun
Sr. Member
****
Offline Offline

Posts: 193


WWW
« Reply #2 on: September 24, 2012, 02:32:52 PM »

I was not aware of the fact that pics in the JSON are compulsory displayed… my master plan is ruined ! Damned !

Too bad, I was sure I had a great idea…  Tongue

However I totally agree with you, I think the choice of the Joomla "board" to use the images kind of surprising now that everyone found a workaround…
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!