Welcome, Guest
Username: Password: Remember me
This is the support for EventList 1.1.x, available here in the downloads section.

For all support requests, please provide your current versions of joomla, and of the extensions.
  • Page:
  • 1
  • 2

TOPIC:

[SOLVED] Add event image to RSS feed (datimage) 6 years 10 months ago #13195

  • mazza
  • mazza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Hi there... I could not find any hint how to add the event image to the RSS feed (datimage) ...
Any idea?
Thx, Mazza

J1.5 + EventList 1.1beta3.2.3-14 + RSSall (sbzsystems.com)

Maybe best way would be with CDATA in <description>

... but how to build the image link?

ex: <![CDATA[<img src=" www.mydomain.com/images/eventlist/events/ ???">]]>

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

Last edit: by Bluefox.

Add event image to RSS feed (datimage) 6 years 10 months ago #13196

@mazza,.

sorry no idea yet.

but just thinking
- for the eventlist the page is com_eventlist/views/eventlist/view.feed.php
- we know how to retrieve the image ($row->datimage)
it will prompt the name of the image but we want to display the whole image so it will require some coding to add the baseurl to it. actually it's not that hard to add. you say it's about the events image so we have to add the image path, for example by adding it to a variable.

perhaps we can use code like:
$description .= JText::_('COM_EVENTLIST_IMAGE').': <img src="'.JPATH_SITE.'/images/eventlist/events/small/'.$row->datimage.'><br />';

pff, i'm willing to try it out but it won't be not earlier then Friday.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

Last edit: by Bluefox.

Add event image to RSS feed (datimage) 6 years 10 months ago #13197

  • mazza
  • mazza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
@Bluefox

Hi, thx for having a look at this. As I said I use RSSall component and I get a very clean RSS feed.

I also managed to pull the datimage into the module_wide and normal list view without any problem.

I think to add the datimage to the RSS feed makes realy sense ... just thinking about sharing and FB (RSS graffiti), etc.



Its about the right queries. In RSSall component they use this query:
if ($com == "eventlist") {
	
$query ='	
SELECT m_menu.id AS itemid, '.$dbprefix.'eventlist_categories.catname as name, title, datdescription as descr, '.$dbprefix.'eventlist_events.id, m_menu.parent, 
'.$dbprefix.'eventlist_events.created AS rssPubDate 

FROM ('.$dbprefix.'eventlist_events, '.$dbprefix.'eventlist_cats_event_relations, '.$dbprefix.'eventlist_categories)

LEFT JOIN '.$dbprefix.'menu as m_menu
ON (m_menu.link LIKE \'%eventlist%\')
and (m_menu.link LIKE CONCAT( \'%id=\', '.$dbprefix.'eventlist_cats_event_relations.catid,\'%\' ))

WHERE '.$dbprefix.'eventlist_cats_event_relations.itemid = '.$dbprefix.'eventlist_events.id
AND '.$dbprefix.'eventlist_events.published =1
and '.$dbprefix.'eventlist_categories.id='.$dbprefix.'eventlist_cats_event_relations.catid
ORDER BY rssPubDate desc limit '.$limit_results;	
}



Outputs that:
if ($com == "eventlist") {
				$rssfeed .='
		<item> 
			<title>'.cleantext($title,0,$showimages,$url).'</title> 
			<link>'.$url .'/index.php?option=com_eventlist&amp;view=details&amp;id='.$id.'&amp;Itemid='.$itemid.'</link> 
			<guid isPermaLink="false">'.$url .'/index.php?option=com_eventlist&amp;view=details&amp;id='.$id.'&amp;Itemid='.$itemid.'</guid>
			<description><![CDATA['.$maintext.']]><![CDATA['.$category.']]></description> 
			<pubDate>'.$rssPubDate.'</pubDate>			  
		</item>
					'; 	
}

NO IMAGE QUERY AT ALL :(

Would be great if you can help me out ... and I give you time until Friday ;)

Thx again, greetings from Portugal
Mazza

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

Last edit: by mazza.

Add event image to RSS feed (datimage) 6 years 10 months ago #13201

hi Mazza,.

As I said I use RSSall component.

am not familiar with it but will try it out. Didn't see a J2.5 version of it but can modify it if needed or i'll just install joomla 1.5.

give you time until Friday

nice B)
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

Add event image to RSS feed (datimage) 6 years 10 months ago #13215

did take quick peak at the code and noticed that there is also an option to strip images from the description. when that option is off (not display images) the img part is stripped from the description.

furthermore there is also a $rssfeed where the layout of xml is been defined. in there is also an image tag, perhaps we can do something with it.

it seems the relevant files of the RSSall package are:
- components/com_rssall/rssall.php (query)
- administrator/components/com_rssall/config.xml (settings)

Within the query, line 84, we do have the query do a retrieving of the datdescription. think that one is seen as the description needed within line 182 (descr). $maintext is used within line 204.

i'm not that familiar with the while statement (line 175) but think we can add an additional variable and call it $image, that variable we can define.


perhaps we can in line 84 this code in the query
datimage as eventimage,

and around line 204
# added so you can do some more things with it
$image = $eventimage;
<description><![CDATA['.$image.$maintext.']]></description>


//
adapting it to J2.5 is not going to happen as it will require to much code changing and think there are better options for that version. Will install Joomla 1.5 to see if we can make the display of images to work but that will be for Friday :)

Just an extra note:
did see it's possible in J2.5 to use JFeedimage to put an image on top of the feed but that's going to be a different story.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

Last edit: by Bluefox.

Add event image to RSS feed (datimage) 6 years 10 months ago #13221

  • mazza
  • mazza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
@Bluefox

**** B I N G O ****

I reconized earlier that, if I put an image into the content (textbox), it is shown in the feed.

So, I added the query you suggested at line 84 ($image = $eventimage;) and created the link to the image location ...
$image = $eventimage;
$maintext="<img src=\"".$url."/images/eventlist/events/small/".$image."\"/>".$maintext;

This will output the eventimage inside the maintext ;)

Voila!

Thank you very much for your hint with the query ... now ... have a great Friday.

Mazza

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

  • Page:
  • 1
  • 2
Time to create page: 0.359 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......