Fork me on GitHub






Koivi news
Supporter Xoops
Inscrit: 17/02/2005 20:25
Messages: 404
Moi j'ai un problème avec koivi et news 1.1
Il y a deux storyform.inc.php, dont un comme ça :

Citation :

if ( !preg_match("/index.php/", $HTTP_SERVER_VARS['PHP_SELF']) ) {
exit("Access Denied");
}
include XOOPS_ROOT_PATH."/include/xoopscodes.php";

if(!isset($submit_page)){
$submit_page = $HTTP_SERVER_VARS['PHP_SELF'];
}
?>
<table><tr><td>
<form action='<?php echo $submit_page;?>' method='post' name='coolsus'>
<?php
echo "<p><b>"._AM_02_TITLE."</b><br />";
echo "<input type='text' name='title' id='title' value='";
if(isset($title)){
echo $title;
}
echo "' size='70' maxlength='80' />";
echo "</p><p>";

echo "<b>"._AM_02_TOPIC."</b>&nbsp;";
$xt = new XoopsTopic($xoopsDB->prefix("topics02"));
if(isset($topicid)){
$xt->makeTopicSelBox(0, $topicid, "topicid");
}else{
$xt->makeTopicSelBox(0, 0, "topicid");
}

echo "<br /><b>"._AM_02_TOPICDISPLAY."</b>&nbsp;&nbsp;<input type='radio' name='topicdisplay' value='1'";
if ( !isset($topicdisplay) || $topicdisplay==1 ) {
echo " checked='checked'";
}
ECHO " />"._AM_02_YES."&nbsp;<input type='radio' name='topicdisplay' value='0'";
if (empty($topicdisplay)) {
echo " checked='checked'";
}
echo " />"._AM_02_NO."&nbsp;&nbsp;&nbsp;";
echo "<b>"._AM_02_TOPICALIGN."</b>&nbsp;<select name='topicalign'>\n";
if ( "L" == $topicalign) {
$sel = " selected='selected'";
} else {
$sel = "";
}
echo "<option value='R'>"._AM_02_RIGHT."</option>\n";
echo "<option value='L'".$sel.">"._AM_02_LEFT."</option>\n";
echo "</select>\n";
echo "<br />";

if(isset($ihome)){
puthome($ihome);
}else{
puthome();
}

echo "</p><p><b>"._AM_02_INTROTEXT."</b><br /><br />\n";
xoopsCodeTarea("hometext", 60, 15);
xoopsSmilies("hometext");
echo "<br /></p><p><b>"._AM_02_EXTEXT."</b><br /><br />\n";
xoopsCodeTarea("bodytext", 60, 15, 2);
xoopsSmilies("bodytext");
echo "</p>"._MULTIPAGE;
if ( !empty($xoopsConfig['allow_html']) ) {
echo "<p>"._AM_02_ALLOWEDHTML."<br />";
//echo get_allowed_html();
echo "</p>";
}
echo "<p><input type='checkbox' name='nosmiley' value='1'";
if(isset($nosmiley) && $nosmiley==1){
echo " checked='checked'";
}
echo " /> "._AM_02_DISAMILEY."<br />";
echo "<input type='checkbox' name='nohtml' value='1'";
if(isset($nohtml) && $nohtml==1){
echo " checked='checked'";
}
echo " /> "._AM_02_DISHTML."<br />";

echo "<br /><input type='checkbox' name='autodate' value='1'";
if(isset($autodate) && $autodate==1){
echo " checked='checked'";
}
echo "> ";
$time = time();
if(isset($isedit) && $isedit==1 && $published >$time){
echo _AM_02_CHANGEDATETIME."<br />";
printf(_AM_02_NOWSETTIME,formatTimestamp($published));
echo "<br />";
$published = xoops_getUserTimestamp($published);
printf(_AM_02_CURRENTTIME,formatTimestamp($time));
echo "<br />";
echo "<input type='hidden' name='isedit' value='1' />";
}else{
echo _AM_02_SETDATETIME."<br />";
printf(_AM_02_CURRENTTIME,formatTimestamp($time));
echo "<br />";
}

echo "<br /> &nbsp; "._AM_02_MONTHC." <select name='automonth'>";
if (isset($automonth)) {
$automonth = intval($automonth);
} elseif (isset($published)) {
$automonth = date('m', $published);
} else {
$automonth = date('m');
}
for ($xmonth=1; $xmonth<13; $xmonth++) {
if ($xmonth == $automonth) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xmonth' $sel>$xmonth</option>";
}
echo "</select>&nbsp;";

echo _AM_02_DAYC." <select name='autoday'>";
if (isset($autoday)) {
$autoday = intval($autoday);
} elseif (isset($published)) {
$autoday = date('d', $published);
} else {
$autoday = date('d');
}

for ($xday=1; $xday<32; $xday++) {
if ($xday == $autoday) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xday' $sel>$xday</option>";
}
echo "</select>&nbsp;";

echo _AM_02_YEARC." <select name='autoyear'>";
if (isset($autoyear)) {
$autoyear = intval($autoyear);
} elseif (isset($published)) {
$autoyear = date('Y', $published);
} else {
$autoyear = date('Y');
}

$cyear = date('Y');
for ($xyear=($autoyear-8); $xyear < ($cyear+2); $xyear++) {
if ($xyear == $autoyear) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xyear' $sel>$xyear</option>";
}
echo "</select>";

echo "&nbsp;"._AM_02_TIMEC." <select name='autohour'>";
if (isset($autohour)) {
$autohour = intval($autohour);
} elseif (isset($published)) {
$autohour = date('H', $published);
} else {
$autohour = date('H');
}

for ($xhour=0; $xhour<24; $xhour++) {
if ($xhour == $autohour) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xhour' $sel>$xhour</option>";
}
echo "</select>";

echo " : <select name='automin'>";
if (isset($automin)) {
$automin = intval($automin);
} elseif (isset($published)) {
$automin = date('i', $published);
} else {
$automin = date('i');
}

for ($xmin=0; $xmin<61; $xmin++) {
if ($xmin == $automin) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
$xxmin = $xmin;
if ($xxmin < 10) {
$xxmin = "0$xmin";
}
echo "<option value='$xmin' $sel>$xxmin</option>";
}
echo "</select></br />";

echo "<br /><input type='checkbox' name='autoexpdate' value='1'";
if(isset($autoexpdate) && $autoexpdate==1){
echo " checked='checked'";
}
echo "> ";
$time = time();
if(isset($isedit) && $isedit == 1 && $expired > 0){
echo _AM_02_CHANGEEXPDATETIME."<br />";
printf(_AM_02_NOWSETEXPTIME,formatTimestamp($expired));
echo "<br />";
$expired = xoops_getUserTimestamp($expired);

printf(_AM_02_CURRENTTIME,formatTimestamp($time));
echo "<br />";
echo "<input type='hidden' name='isedit' value='1' />";
}else{
echo _AM_02_SETEXPDATETIME."<br />";
printf(_AM_02_CURRENTTIME,formatTimestamp($time));
echo "<br />";
}

echo "<br /> &nbsp; "._AM_02_MONTHC." <select name='autoexpmonth'>";
if (isset($autoexpmonth)) {
$autoexpmonth = intval($autoexpmonth);
} elseif (isset($expired)) {
$autoexpmonth = date('m', $expired);
} else {
$autoexpmonth = date('m');
$autoexpmonth = $autoexpmonth + 1;
}
for ($xmonth=1; $xmonth<13; $xmonth++) {
if ($xmonth == $autoexpmonth) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xmonth' $sel>$xmonth</option>";
}
echo "</select>&nbsp;";

echo _AM_02_DAYC." <select name='autoexpday'>";
if (isset($autoexpday)) {
$autoexpday = intval($autoexpday);
} elseif (isset($expired)) {
$autoexpday = date('d', $expired);
} else {
$autoexpday = date('d');
}

for ($xday=1; $xday<32; $xday++) {
if ($xday == $autoexpday) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xday' $sel>$xday</option>";
}echo "</select>&nbsp;";

echo _AM_02_YEARC." <select name='autoexpyear'>";
if (isset($autoexpyear)) {
$autoyear = intval($autoexpyear);
} elseif (isset($expired)) {
$autoexpyear = date('Y', $expired);
} else {
$autoexpyear = date('Y');
}

$cyear = date('Y');
for ($xyear=($autoexpyear-8); $xyear < ($cyear+2); $xyear++) {
if ($xyear == $autoexpyear) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xyear' $sel>$xyear</option>";
}
echo "</select>";

echo "&nbsp;"._AM_02_TIMEC." <select name='autoexphour'>";
if (isset($autoexphour)) {
$autoexphour = intval($autoexphour);
} elseif (isset($expired)) {
$autoexphour = date('H', $expired);
} else {
$autoexphour = date('H');
}

for ($xhour=0; $xhour<24; $xhour++) {
if ($xhour == $autoexphour) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
echo "<option value='$xhour' $sel>$xhour</option>";
}
echo "</select>";

echo " : <select name='autoexpmin'>";
if (isset($autoexpmin)) {
$autoexpmin = intval($autoexpmin);
} elseif (isset($expired)) {
$autoexpmin = date('i', $expired);
} else {
$autoexpmin = date('i');
}

for ($xmin=0; $xmin<61; $xmin++) {
if ($xmin == $autoexpmin) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
$xxmin = $xmin;
if ($xxmin < 10) {
$xxmin = "0$xmin";
}
echo "<option value='$xmin' $sel>$xxmin</option>";
}
echo "</select><br /><br />";

if(isset($published) && $published == 0 && isset($type) && $type == "user"){
echo "<br /><input type='checkbox' name='approve' value='1'";
if(isset($approve) && $approve==1){
echo " checked='checked'";
}
echo " />&nbsp;<b>"._AM_02_APPROVE."</b><br />";
} else {
if(isset($isedit) && $isedit==1){
echo "<br /><input type='checkbox' name='movetotop' value='1'";
if(isset($movetotop) && $movetotop==1){
echo " checked='checked'";
}
echo " />&nbsp;<b>"._AM_02_MOVETOTOP."</b><br />";
echo "<input type='hidden' name='isedit' value='1' />";
}
echo "<input type='hidden' name='approve' value='1' />";
}
echo "<select name='op'>\n";
echo "<option value='save' selected='selected'>"._AM_02_SAVE."</option>\n";
echo "<option value='preview'>"._AM_02_PREVIEW."</option>\n";
if (!empty($storyid)) {
echo "<option value='delete'>"._AM_02_DELETE."</option>\n";
}
echo "</select>";
if(isset($storyid)){
echo "<input type='hidden' name='storyid' value='".$storyid."' />\n";
}
echo "<input type='hidden' name='type' value='".$type."' />\n";
echo "<input type='hidden' name='fct' value='articles' />\n";
echo "<input type='submit' value='"._AM_02_GO."' />\n";
echo "</p></form>";
echo "</td></tr></table>";

unset($submit_page);

function puthome($ihome="") {
echo "<br /><b>"._AM_02_PUBINHOME."</b>&nbsp;&nbsp;";
if (($ihome == 0) OR ($ihome == "")) {
$sel1 = "checked='checked'";
$sel2 = "";
}
if ($ihome == 1) {
$sel1 = "";
$sel2 = "checked='checked'";
}
echo "<input type='radio' name='ihome' value='0' $sel1 />"._AM_02_YES."&nbsp;";
echo "<input type='radio' name='ihome' value='1' $sel2 />"._AM_02_NO."<br />";
}



Je ne vois pas comment installer koivi...
Sur l'autre storyform qui est pour le submit, ça n'a posé aucun problème.

Posté le : 08/01/2006 11:16
Partager Twitter Partagez cette article sur GG+
Re: Koivi news
Xoops accro
Inscrit: 04/02/2003 01:54
De Le Mans
Messages: 12273
Je ne sais pas si cette antédéluvienne version du module supporte koivi, mais la 1.44 oui cela a été testé.

Une recherche avec le mot koivi donne d'excellents résultants dans les réponses proposées dans les forums

Posté le : 08/01/2006 13:21
Partager Twitter Partagez cette article sur GG+
Re: Koivi news
Supporter Xoops
Inscrit: 17/02/2005 20:25
Messages: 404
Cher Christian,

Tu te doutes bien que si j'avais trouvé la réponse à ma question dans les forums, je n'aurais jamais osé la poser !


Comme je l'expliquais à Kris, ma version est clonée, et je galère pas mal à cloner celle de news 1.44.
Du coup je ne peux pas la mettre à jour. Si quelqu'un a une version clonée de 1.44, je suis intéressé.

Tiens d'ailleurs à tout hasard, si quelqu'un a une version clonée de xfsection, ça m'intéresse aussi à mort !

Je repose donc ma question : quand on a une ligne du genre Citation :
xoopsCodeTarea("hometext", 60, 15);
qui renvoie à un include de ce type : Citation :
include XOOPS_ROOT_PATH."/include/xoopscodes.php";
, comment faire pour installer koivi ?

Merci !

Posté le : 08/01/2006 15:38
Partager Twitter Partagez cette article sur GG+
Re: Koivi news
Supporter Xoops
Inscrit: 09/01/2005 13:37
De Breizh
Messages: 16972
Bonjour,

Regardes ici peut-être

A +

Posté le : 08/01/2006 15:41

La connaissance s'accroît quand on la partage ...
Partager Twitter Partagez cette article sur GG+
Re: Koivi news
Supporter Xoops
Inscrit: 17/02/2005 20:25
Messages: 404
Bin ouais mais non... Y'a bien un module news mais c'est le 1.21, qui est une version évoluée du 1.11 et qui a déjà fondu les deux storyform en un.

Chaleur chaleur...

Posté le : 09/01/2006 18:10
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

53 Personne(s) en ligne (44 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 53 | Plus ...