Page 4 of 5

Posted: Wed 30. Aug 2006, 23:42
by tsl
Hello and thanks for this MOD.

I'm just trying it out and have a few questions:

1. I get wierd dates on my news. They do always get set to 1999.11.30. Has anyone else had that problem?

2. Can I use some sort of REP TAG for this. I would like the news listings to go into a right block on the startpage.


TIA
-tsl-

Posted: Thu 31. Aug 2006, 23:46
by tsl
Ok, I see I have a major problem with dates with this MOD.
In table phwcms_news I get the following in the columns for every news I've added today:

news_datepublish article_begin article_end
-------------------- --------------- -------------
0000-00-00 00:00:00 2006-08-31 00:00:00 2006-08-31 00:00:00

When adding the news from within backend I have:
Published: 2006.08.31
Begins: 2006-08-31 00:00:00
Ends: 2006-09-14 00:00:00

After they are saved they all shows a date of 1999.11.30 in backend and as 1999/11/30 in frontend.

Please, if someone have a clue i'd be very happy.
I have tried to understand news.editcontent.inc.php but I'm lost.

Thanks
-tsl-

Posted: Thu 7. Sep 2006, 12:02
by checco
Hi,
I have a question...
Does this work in 1.2.8 ?

Thanks for this mod

Posted: Thu 7. Sep 2006, 12:34
by tsl
I'm not sure...but I run 1.2.8 and have the above problems (with dates)

Posted: Thu 7. Sep 2006, 22:53
by netsraC85
Hallo Zusammen,

ich komme mit der Installation nicht ganz mit. Ich habe mir den Mod von hier runtergeladen: http://www.swissalpine.ch/phpwcms/downloads.phtml

Dann habe ich das zip File entpackt.

Den Ordner include und somit den weiteren inhalt habe ich ins Hauptverzeichnis meiner phpwcms installation getan. Das Verzeichnis template in "phpwcms_template".

den Ordner MOD_News ? Wozu ist der überhaupt dabei.
In keinem Ordner ist was drin naja ich habe ihn erstmal dahin gepackt
"include\inc_module", weil dort der Ordner mod_graphical_text auch war.

So dann bin ich weiter nach der INSTALL.TXT vorgegangen.

Als ich damit fertig war, erschienen im Backend unter Module
3 Pfeile jedoch ohne Link. Mit der Änderung hier aus dem Forum in der
lang.inc.php wurde dann wenigstens schonmal ein link angezeigt.
Aber bei klick auf den Link passiert nichts.

In der Install.txt stand noch was von Anpassen der template sachen aber was soll ich dort anpassen? ich will ja erstmal was sehen.

Hat jemand eine Idee?

Posted: Fri 8. Sep 2006, 11:31
by markoehl
tsl wrote:
Please, if someone have a clue i'd be very happy.
I have tried to understand news.editcontent.inc.php but I'm lost.
I discoverd a bug in the sql_datetime function. Please replace existing code with:

function sql_datetime($datumtest) {
if ($_SESSION["wcs_user_lang"] == "de" AND !stristr('[/-]', $datumtest)) {
list($tag,$monat,$jahr)= split ('[.]', $datumtest);
if (strlen($jahr) > 4) {
list($jahr,$zeit)= split (' ', $jahr);
} else {
$zeit = "00:00:00";
}
if ((!$tag)and(!$monat)and(!$jahr)) {
$back = "0000-00-00 00:00:00";
return $back;
} else {
if (intval($jahr) <= intval(date("y"))) {
$jahr = $jahr + 2000;
} elseif (intval($jahr) > intval(date("y")) AND intval($jahr) < 100) {
$jahr = intval($jahr) + 1900;
}
if (($jahr>1799) and (checkdate($monat,$tag,$jahr))) {
if (($monat<10)and(substr($monat,0,1)!="0")) { $monat = "0".$monat; }
if (($tag<10)and(substr($tag,0,1)!="0")) { $tag = "0".$tag; }
$back = $jahr."-".$monat."-".$tag." ".$zeit ;
return $back;
} else {
$back = "0000-00-00 00:00:00";
return $back;
}
}
}
return $datumtest;
}

Posted: Fri 8. Sep 2006, 13:19
by tsl
Thanks a bunch!
I will give it a shoot...

-tsl-

Posted: Fri 29. Sep 2006, 04:21
by zed
hi all

I have a problem with the dateformat.

What's the syntax for {DATEPUBLISH:FORMAT} var in the templates?
I tested several "php date" syntaxes but none of them worked.

Any ideas?

thx for help

Posted: Sat 7. Oct 2006, 17:44
by webflo
zed wrote:hi all

I have a problem with the dateformat.

What's the syntax for {DATEPUBLISH:FORMAT} var in the templates?
I tested several "php date" syntaxes but none of them worked.

Any ideas?

thx for help
Ich hab das selbe Problem.. Wie kann man das formatieren. Nach phpSyntax funktioniert das auf keinen Fal...

Posted: Sun 8. Oct 2006, 21:09
by jmansa
I'm not so good at german, but I get this error...
error while updating or inserting news: INSERT INTO test_phpwcms_news SET news_title='fgdg dfg dfg dfg', news_text='dfg fdg dfg dfg df gdf g', news_datepublish='08-10-2006', news_day='', news_linktext='', news_alink='', news_calink=0, cimage_name='', cimage_id=0, news_cid='0', news_aid='0', article_begin='2014-03-29 00:00:00', set_begin=1, article_end='2028-03-28 00:00:00', set_end=1, news_type=1 ;
Did you have a soulution for this???

Posted: Tue 10. Oct 2006, 10:30
by markoehl
zed wrote:What's the syntax for {DATEPUBLISH:FORMAT} var in the templates? I tested several "php date" syntaxes but none of them worked.
This function is beta. I have planed to implement that. Will do that soon ;-)

Posted: Tue 10. Oct 2006, 10:32
by markoehl
jmansa wrote:I'm not so good at german, but I get this error...
error while updating or inserting news: INSERT INTO test_phpwcms_news SET news_title='fgdg dfg dfg dfg', news_text='dfg fdg dfg dfg df gdf g', news_datepublish='08-10-2006', news_day='', news_linktext='', news_alink='', news_calink=0, cimage_name='', cimage_id=0, news_cid='0', news_aid='0', article_begin='2014-03-29 00:00:00', set_begin=1, article_end='2028-03-28 00:00:00', set_end=1, news_type=1 ;
Did you have a soulution for this???
Check your date of publishing: "news_datepublish='08-10-2006'". you have entered a invalid date '09-10-2006'. Try '2006-10-08'

Posted: Tue 10. Oct 2006, 10:34
by markoehl
checco wrote:Hi,
I have a question...
Does this work in 1.2.8 ?

Thanks for this mod
It should work. Please let me know if not...

Posted: Tue 10. Oct 2006, 10:36
by markoehl
tsl wrote:Ok, I see I have a major problem with dates with this MOD.
In table phwcms_news I get the following in the columns for every news
Wrong dateformat:

Published: 2006.08.31

Use 2006-08-31 or 31.8.2006

Posted: Tue 10. Oct 2006, 10:39
by markoehl
tsl wrote: 2. Can I use some sort of REP TAG for this. I would like the news listings to go into a right block on the startpage.
try this: http://www.swissalpine.ch/phpwcms/newsmod.phtml