next | previous

Hi gang,

All my articles are date-related, a kind of past events diary. I usually write these after the event, then backdate the ‹ publish date › to the date of the event itself. I want to be able to navigate from one day to the next, so I’ve tried using some code which gives me a very satisfactory next/previous article function, as follows:

<? $id="#ID_ARTICLE"; ?>

<BOUCLE_avant(ARTICLES){par date}>

<? if ($id==#ID_ARTICLE) { echo $lien_prec; } $lien_prec = "<< previous"; ?>

</BOUCLE_avant>

<BOUCLE_apres(ARTICLES){par date}{inverse}>

<? if ($id==#ID_ARTICLE) { echo $lien_suiv; } $lien_suiv = " | next >> "; ?>

</BOUCLE_apres>

This is great if you want to go from one ARTICLE to the next - my problem is that I sometimes have 4 or 5 articles on one day and I want to be able to skip these and go from one DAY to the next. I’ve tried using the code example from the ‹ Managing Dates › section of the SPIP website, but this just seems to jumble my articles up. I’ve also enabled the ‹ date of earlier publishing › option in the hope that might be the answer … but it isn’t.

Any help gratefully received as ever.

g

Read this:

it's about monthly articles but perhaps it can be applied to daily articles.

George

Gerry Warner wrote:

Hi gang,

All my articles are date-related, a kind of past events diary. I usually write these after the event, then backdate the 'publish date' to the date of the event itself. I want to be able to navigate from one day to the next, so I've tried using some code which gives me a very satisfactory next/previous article function, as follows:

<? $id="#ID_ARTICLE"; ?>
<BOUCLE_avant(ARTICLES){par date}>
<?
if ($id==#ID_ARTICLE) {
echo $lien_prec; }
$lien_prec = "<a href=\"#URL_ARTICLE\"><< previous</a>";
?>
</BOUCLE_avant>

<BOUCLE_apres(ARTICLES){par date}{inverse}>
<?
if ($id==#ID_ARTICLE) {
echo $lien_suiv; }
$lien_suiv = " | <a href=\"#URL_ARTICLE\">next >></a>&nbsp;";
?>
</BOUCLE_apres>

This is great if you want to go from one ARTICLE to the next - my problem is that I sometimes have 4 or 5 articles on one day and I want to be able to skip these and go from one DAY to the next. I've tried using the code example from the 'Managing Dates' section of the SPIP website, but this just seems to jumble my articles up. I've also enabled the 'date of earlier publishing' option in the hope that might be the answer ... but it isn't.

Any help gratefully received as ever.

g

--

Gerry Warner
Ten Storey
gerry@tenstorey.com
+33 632 906 125

------------------------------------------------------------------------

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Thanks George - I’ve managed to crack the ‹ previous › link as follows:

<BOUCLE_art(ARTICLES){id_article}>
<BOUCLE_previous(ARTICLES){jour_relatif>=1}{par date}{inverse}{0,1}>
previous
</BOUCLE_previous>

I would have thought that the same logic would apply to the ‹ next › link, hence:

<BOUCLE_art(ARTICLES){id_article}>
<BOUCLE_previous(ARTICLES){jour_relatif<0}{par date}{0,1}>
previous
</BOUCLE_previous>

but unfortunately it just takes me to the last article I published instead of the next day relative to this article.

I’ll keep trying, but am open to suggestions!

Thanks again,

g

George Kandalaft wrote:

hi,

this morning, when i wanted to continue working on our new website at www.filmmagie.be/spip, an error message came up:

« site under construction. a technical problem (mysql server) is keeping you from accessing this part of the website » (or something like that, it came up in dutch)

did anyone get this before? if so, what does it mean? should i start worrying (i didn’t back up the mysql db myself)? does it mean the hosting is doing some maintenance works (i just posted a ticket)?

any info is most welcome (reassuring or not),
thanks,
/bruno


Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.

Hi Bruno,

        this morning, when i wanted to continue working on our new
        website at www.filmmagie.be/spip, an error message came up:
        
        "site under construction. a technical problem (mysql server)
        is keeping you from accessing this part of the website" (or
        something like that, it came up in dutch)
        

This is the message that SPIP gives when the MySQL server is
unavailaable AND it has no cache to show and old version of the page.

        did anyone get this before? if so, what does it mean? should i
        start worrying (i didn't back up the mysql db myself)? does it
        mean the hosting is doing some maintenance works (i just
        posted a ticket)?
        

Clearly, it depends on your hosting.
and if you try to access SPIP backoffice:
http://www.filmmagie.be/spip/ecrire/
you see a quite more explicit message.

Most likely the MySQL server of your provider is down, but the data not
lost. If you have valuable data, this will certainly make you start
periodical backups :wink:

good luck,

daniel

indeed, the host's server was down..

it's up again, and another spip driven site is at

www.filmmagie.be .

best,
/bruno

--- Daniel <dani@belvil.net> wrote:

Hi Bruno,

> this morning, when i wanted to continue
working on our new
> website at www.filmmagie.be/spip, an error
message came up:
>
> "site under construction. a technical
problem (mysql server)
> is keeping you from accessing this part of
the website" (or
> something like that, it came up in dutch)
>
This is the message that SPIP gives when the MySQL
server is
unavailaable AND it has no cache to show and old
version of the page.

> did anyone get this before? if so, what
does it mean? should i
> start worrying (i didn't back up the mysql
db myself)? does it
> mean the hosting is doing some maintenance
works (i just
> posted a ticket)?
>
Clearly, it depends on your hosting.
and if you try to access SPIP backoffice:
http://www.filmmagie.be/spip/ecrire/
you see a quite more explicit message.

Most likely the MySQL server of your provider is
down, but the data not
lost. If you have valuable data, this will certainly
make you start
periodical backups :wink:

good luck,

daniel

__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com