04-16-2021, 06:12 PM
Captura gif
Ejecutar esta consulta
c.admin.php --> inc --> class --> c.admin.php
Buscar:
Debajo agregar:
Buscar:
Al lado agregar:
Les queda así:
c.fotos.php --> inc --> class --> c.fotos.php
Buscar:
Debajo agregar:
fotos.php --> inc --> php --> fotos.php
Buscar:
Reemplazar por:
m.admin_configs.tpl --> themes --> default --> templates --> admin_mods --> m.admin_configs.tpl
Buscar:
Debajo agregar:
Creditos: Exedras
[img]Registrate o inicia tu sesión para ver este contenido[/img]
Ejecutar esta consulta
Código PHP:
ALTER TABLE w_configuracion ADD c_puntos_x_fotos INT(11) NOT NULL
c.admin.php --> inc --> class --> c.admin.php
Buscar:
Código PHP:
'offline' => empty($_POST['offline']) ? 0 : 1,
Debajo agregar:
Código PHP:
'puntos_x_fotos' => $tsCore->setSecure($_POST['puntosxfotos']),
Buscar:
Código PHP:
'\', `offline` = \'' . $c['offline'] .
Al lado agregar:
Código PHP:
'\', `c_puntos_x_fotos` = \'' . $c['puntos_x_fotos'] .
Les queda así:
Código PHP:
'\', `offline` = \'' . $c['offline'] . '\', `c_puntos_x_fotos` = \'' . $c['puntos_x_fotos'] .
c.fotos.php --> inc --> class --> c.fotos.php
Buscar:
Código PHP:
// INSERTAMOS
db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `f_fotos` SET f_last = \'0\' WHERE f_user = '.$tsUser->uid.' AND f_last = 1'); // LA ULTIMA DEJA DE SERLO
$_SERVER['REMOTE_ADDR'] = $_SERVER['X_FORWARDED_FOR'] ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if(!filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) { die('0: Su ip no se pudo validar.'); }
if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `f_fotos` (f_title, f_date, f_description, f_url, f_user, f_closed, f_visitas, f_last, f_ip) VALUES (\''.$fData['titulo'].'\', \''.time().'\', \''.$fData['desc'].'\', \''.$img_url.'\', \''.$tsUser->uid.'\', \''.$fData['closed'].'\', \''.$fData['visitas'].'\', \'1\', \''.$_SERVER['REMOTE_ADDR'].'\')')) {
$fid = db_exec('insert_id');
Debajo agregar:
Código PHP:
// Puntos por fotos by memo
db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE u_miembros SET user_puntos = user_puntos + \''.(int)$tsCore->settings['c_puntos_x_fotos'].'\' WHERE user_id = \''.(int)$tsUser->uid.'\'');
fotos.php --> inc --> php --> fotos.php
Buscar:
Código PHP:
$smarty->assign("tsAviso",array('titulo' => 'Foto Agregada', 'mensaje' => "La imagen <b>".$titulo."</b> fue agregada.", 'but' => 'Ver imagen', 'link' => "{$tsCore->settings['url']}/fotos/{$tsUser->nick}/{$result}/".$tsCore->setSEO($titulo).".html"));
Reemplazar por:
Código PHP:
$smarty->assign("tsAviso",array('titulo' => 'Foto Agregada', 'mensaje' => "La imagen <font color='red'><b>".$titulo."</b></font> fue agregada.<i>Has recibido una bonificacion de:</i> <blink><font color='green'><b>{$tsCore->settings['c_puntos_x_fotos']}</b></font></blink> Puntos a tu cuenta.", 'but' => 'Ver imagen', 'link' => "{$tsCore->settings['url']}/fotos/{$tsUser->nick}/{$result}/".$tsCore->setSEO($titulo).".html"));
m.admin_configs.tpl --> themes --> default --> templates --> admin_mods --> m.admin_configs.tpl
Buscar:
Código PHP:
<dl>
<dt>
<label for="ai_max_nots">Máximo de notificaciones:</label>
<br /><span>Cuantas notificaciones puede recibir un usuario.</span></dt>
<dd>
<input type="text" id="ai_max_nots" name="max_nots" style="width:10%" maxlength="3" value="{$tsConfig.c_max_nots}" />
</dd>
</dl>
Debajo agregar:
Código PHP:
<dl>
<dt><label for="puntos_x_fotos">Puntos por Fotos:</label><br /><span>Puntos que recibirá como bonificación un usuario al subir una foto.</span></dt>
<dd><input type="text" id="puntos_x_fotos" name="puntosxfotos" style="width:10%" maxlength="3" value="{$tsConfig.c_puntos_x_fotos}" /></dd>
</dl>
<hr />
Creditos: Exedras
