Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

NMS ajustements...
#15

Bon, je viens d'ouvrir le module action.showmessage.php

Code :
[== Indéfini ==]
if( !isset($gCms) ) exit;

if( !isset($params['msgID']) ) {
  $this->_DisplayErrorPage($id,$params,$returnid,
               $this->Lang('error_insufficientparams'));
  return;
}

// display a particular archived newsletters, but only pull out public messages
$query = 'SELECT * FROM '.NMS_MESSAGES_TABLE.' WHERE messageid=? AND archivable = 1';
$row = $db->GetRow($query,array($params['msgID']));
if( !$row ) {
  $this->_DisplayErrorPage($id,$params,$returnid,
               $this->Lang('error_itemnotfound'));
  return;
}

//
// Setup Smarty
//
$obj = new StdClass();
foreach( $row as $key => $value )
{
  $obj->$key = $value;
}
$obj->entered = $db->UnixTimeStamp($obj->entered);
$obj->modified = $db->UnixTimeStamp($obj->modified);

$this->_archive_view = 1;
$smarty->assign('nms_archive_view',1);
$smarty->assign('messageinfo',$obj);
$smarty->assign('subject',$row['subject']);
$smarty->assign('uniqueid','{literal}{$uniqueid}{/literal}');
$smarty->assign('username','{literal}{$username}{/literal}');
$smarty->assign('email','{literal}{$email}{/literal}');
$smarty->assign('unsubscribe','{literal}{$unsubscribe}{/literal}');
$smarty->assign('preferences','{literal}{$preferences}{/literal}');
$smarty->assign('confirmurl','{literal}{$confirmurl}{/literal}');
$smarty->assign('msg_permalink','{literal}{$msg_permalink}{/literal}');
$smarty->assign('textmessage',$this->ProcessTemplateFromData($row['message']));
$smarty->assign('messageidtext',$this->Lang('message_id'));
$smarty->assign('subjecttext',$this->Lang('subject'));
$smarty->assign('messagetext',$this->Lang('text_message'));
$smarty->assign('htmlmessagetext',$this->Lang('html_message'));
$smarty->assign('modifiedtext',$this->Lang('modified'));
$smarty->assign('enteredtext',$this->Lang('entered'));
$smarty->assign('templatetext',$this->Lang('template'));

foreach ($this->GetModulesWithCapability('nms_vars') as $one_module)
{
  cms_utils::get_module($one_module)->SetSmartyVars($id, -1, $params['msgID'], '', $smarty, 'view');
}

$template = $this->GetPreference('curdeflt_archivemsg');
if( isset($params['archivemsg_template']) ) {
  $template = trim($params['archivemsg_template']);
}
echo $this->ProcessTemplateFromDatabase('archivemsg_'.$template);

#
# EOF
#
?>

Alors, là, pour moi... c'est un peu du "javanais" ! Sad
Je vois bien {literal} un peu partout entourant toutes les "requêtes" !?
Mais bon, dois-je les éliminer ?
Elles sont bien là pour quelque-chose ces "{literal}", non ?
La nuit porte conseil

Bonne nuit et merci...

Rolleyes
Répondre


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)