Cancelled

DLE (datalife engine) Modification

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.

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 );

}

I need to use this tag in shortnews.tpl & fullnews.tpl..

Skills: MySQL, PHP, Smarty PHP

See more: dle engine, datalife engine image, tpl, SAUCE, dle, datalife, 400 url, extension post, php post array, engine data, count image, data modification, php tpl engine, topnews dle, php smarty example mysql, src php, add engine, smarty php example mysql, tpl engine php, php mysql modification, image datalife, datalife engine images, dle modification, image dle, smarty image tag

About the Employer:
( 1 review ) Jeffreys Bay, South Africa

Project ID: #1279230

2 freelancers are bidding on average $350 for this job

Svetoslav92

Hi. Please check your PM. Thanks

$400 USD in 1 day
(39 Reviews)
4.9
stevejoseph

HELLO SIR PLEASE CHECK PMB

$300 USD in 4 days
(0 Reviews)
0.0