DLE 9.4 (datalife engine) Modification

Completado Publicado Nov 5, 2011 Pagado a la entrega
Completado Pagado a la entrega

Version 9.4 of Datalife Engine you can add a " {image-x} " tag in [url removed, login to view] & topnews.tpl. this displays an image upload on the news post. So for example, if you add "{image-1}" it will display the first image from the post.

I need someone who is familiar with Datalife Engine, or PHP& Smarty PHP who could modify the script so that I could add the tag " {image-x} " on [url removed, login to view] and fullstory.tpl.

The sauce is from [url removed, login to view]

if (stripos ( $tpl->copy_template, "{image-" ) !== false) {

$images = array();preg_match_all('/(img|src)=("|')[^"'>]+/i', $row['short_story'], $media);$data=preg_replace('/(img|src)("|'|="|=')(.*)/i',"$3",$media[0]);

foreach($data as $url) {$info = pathinfo($url);if (isset($info['extension'])) {$info['extension'] = strtolower($info['extension']);if (($info['extension'] == 'jpg') || ($info['extension'] == 'jpeg') || ($info['extension'] == 'gif') || ($info['extension'] == 'png')) array_push($images, $url);}}

if ( count($images) ) {$i=0;foreach($images as $url) {$i++;$tpl->copy_template = str_replace( '{image-'.$i.'}', $url, $tpl->copy_template );}

}

$tpl->copy_template = preg_replace( "#{image-(.+?)}#i", "", $tpl->copy_template );

MySQL PHP

Nº del proyecto: #1279377

Sobre el proyecto

2 propuestas Proyecto remoto Activo Nov 5, 2011

Adjudicado a:

Svetoslav92

Thanks.I hope i will work more for you.

$70 USD en 0 días
(39 comentarios)
4.9

2 freelancers están ofertando un promedio de $55 por este trabajo

rushimehta

hi, please check pmb.

$40 USD en 0 días
(0 comentarios)
0.0