Autor Tópico: [Modificações] - News Generator (Adk Portal V2.0 RC6)  (Lida 4543 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline oliveirandre21

  • Moderador Global
  • *
  • Mensagens: 40
  • Rank: 1
  • Sexo: Masculino
    • Musica-Portuguesa
Nome:News Generator
Arquivo:News Generator (Adk Portal V2.0 RC6).ZIP
Autor do Mod:lucas-ruroken
Versões: disponível  2.0 RC 4, 2.0
Discrição: Serve para meter tópicos fixos no portal.


Testado com tema default Funciona 100%




Se der o seguinte erro:

  Click Here To Download




Vão ao ficheiro:
./Sources/Adk-Modules.php

No fim do ficheiro Trocar:
Código: [Seleccione]
?>
Por:
Código: [Seleccione]
function newsgenerator()
{
global $context, $txt;

$context['sub_template']  = 'newsgenerator';

//Set the page title
$context['page_title'] = $txt['adk_news_generator'];
}

function savegenerator()
{
global $context, $txt, $scripturl, $smcFunc;

$autor1 = htmlspecialchars(stripslashes($_POST['autor1']));
$link1 = (int)$_POST['link1'];
$image1 = htmlspecialchars(stripslashes($_POST['image1']));
$title1 = htmlspecialchars(stripslashes($_POST['title1']));

$autor2 = htmlspecialchars(stripslashes($_POST['autor2']));
$link2 = (int)$_POST['link2'];
$image2 = htmlspecialchars(stripslashes($_POST['image2']));
$title2 = htmlspecialchars(stripslashes($_POST['title2']));

$autor3 = htmlspecialchars(stripslashes($_POST['autor3']));
$link3 = (int)$_POST['link3'];
$image3 = htmlspecialchars(stripslashes($_POST['image3']));
$title3 = htmlspecialchars(stripslashes($_POST['title3']));




$value = '
[center]
[table]
[tr]
[td][center]
[url='.$scripturl.'?topic='.$link1.'.0]'.$title1.'[/url]
[url='.$scripturl.'?topic='.$link1.'.0][img width=120 height=180]'.$image1.'[/img][/url]
[b]'.$txt['autor'].':[/b] '.$autor1.'
[/center][/td]
[td][center]
[url='.$scripturl.'?topic='.$link2.'.0]'.$title1.'[/url]
[url='.$scripturl.'?topic='.$link2.'.0][img width=120 height=180]'.$image2.'[/img][/url]
[b]'.$txt['autor'].':[/b] '.$autor2.'
[/center][/td]
[td][center]
[url='.$scripturl.'?topic='.$link3.'.0]'.$title3.'[/url]
[url='.$scripturl.'?topic='.$link3.'.0][img width=120 height=180]'.$image3.'[/img][/url]
[b]'.$txt['autor'].':[/b] '.$autor3.'
[/center][/td]';

if(!empty($_POST['link4']) && !empty($_POST['autor4']) && !empty($_POST['title4']) && !empty($_POST['image4']))
{
$autor4 = htmlspecialchars(stripslashes($_POST['autor4']));
$link4 = (int)$_POST['link4'];
$image4 = htmlspecialchars(stripslashes($_POST['image4']));
$title4 = htmlspecialchars(stripslashes($_POST['title4']));

$value .= '
[td][center]
[url='.$scripturl.'?topic='.$link4.'.0]'.$title4.'[/url]
[url='.$scripturl.'?topic='.$link4.'.0][img width=120 height=180]'.$image4.'[/img][/url]
[b]'.$txt['autor'].':[/b] '.$autor4.'
[/center][/td]';
}

$value .= '
[/tr]
[/table]
[/center]';

$time = time();
$autor = htmlspecialchars(stripslashes($_POST['newautor']),ENT_QUOTES);
$title = htmlspecialchars(stripslashes($_POST['newtitle']),ENT_QUOTES);

$smcFunc['db_query']('',"
INSERT INTO {db_prefix}adk_news
VALUES (NULL,'$title','$value','$autor','$time')"
);

redirectexit();
}
?>

O mod ja esta a funcionar.

Como funciona?

Basta ir ADMIN --» ADK Porta --» Modulos --» News Generator



  Click Here To Download

 

  Click Here To Download

 

Click Here To Download
« Última modificação: 16 de Julho de 2011, 18:10 por DownPTuga »

Offline Webmaster

  • Desenvolvimento
  • *
  • Mensagens: 2236
  • Rank: 113
  • Sexo: Masculino
  • JoomlaMZ !
    • Servidores
Re: [Modificações] - News Generator (Adk Portal V2.0 RC6)
« Responder #1 em: 22 de Julho de 2011, 15:03 »
Muito bom
Ajudar esta casa faz muito bem
Apllic! WebSuporte