Ik wil graag werken met de module YJ news slider 8.0. Nu heb ik de php al een beetje aangepast omdat deze module alleen werkt met 1 category, alleen ik wil al het laatste nieuws uit alle categorie laten zien. Dit is mij nu gelukt ik zit alleen met het volgende:
De module neem afbeeldingen mee die intern is opgeslagen, nu werk ik met externe afbeelding en nu vroeg ik mij af of iemand weet hoe ik dat in de php kan aanpassen.
Ik heb 1 bestand waarvan ik vermoed dat ik die moet aanpassen.. als dat niet zo is hoor ik dat graag.
Code: Select all
<?php
/*======================================================================*\
|| #################################################################### ||
|| # Youjoomla LLC - YJ- Licence Number 62KI033
|| # Licensed to - Neo
|| # ---------------------------------------------------------------- # ||
|| # Copyright (C) 2006-2009 Youjoomla LLC. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- THIS IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.youjoomla.com | http://www.youjoomla.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// no direct access
defined('_JEXEC') or die('Restricted access');
/**
* Image detection inside article. Searches in intro text and if not found, in full article text
*
* @param object $row
* @return string - image path
*/
function article_image8 ($row)
{
$img = search_image8( $row->introtext );
if( $img ) return $img;
$img = search_image8( $row->fulltext );
return $img;
}
/**
* Searches for all images inside a text and returns the first one found
*
* @param string $text
* @return string
*/
function search_image8( $text )
{
preg_match_all("#\<img(.*)src\=\"(.*)\"#Ui", $text, $mathes);
return isset($mathes[2][0]) ? $mathes[2][0] : '';
}
?>