New "sticky" concepts?
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Garvin - fetching stickies is now based on the the value of a custom user field???? .... or is your example above supposed to be something like my previously mentioned concept of "was_sticky"???
I can see you have also been editing the tech docs for this. Suggestion: include what happens by default (ie, option not specified).
I can see you have also been editing the tech docs for this. Suggestion: include what happens by default (ie, option not specified).
=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Only entries that do not show up in the same chronological timeline will then not be fetched.
You can use that for 'was_sticky' as well, yes.
Regards,
Garvin
Exactly. The "useSticky" value before actually only says: Do not fetch old stickies. If your blog entry was posted on the date that would include that entry in the usual entry list, the sticky entry would still be fetched (and put into the 'Sticky' group).Don Chambers wrote:Garvin - fetching stickies is now based on the the value of a custom user field????
Only entries that do not show up in the same chronological timeline will then not be fetched.
[/quote].... or is your example above supposed to be something like my previously mentioned concept of "was_sticky"???
You can use that for 'was_sticky' as well, yes.
I'm doing that for the book, the effort for doing that online is too heavy for me.I can see you have also been editing the tech docs for this. Suggestion: include what happens by default (ie, option not specified).
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Thanks again Garvin. My apologies - I do not understand how this works, and do not understand any practical application of the description you provided. An entry is either sticky, or it isn't. Most entry pages are not displayed for date ranges.... they are usually fetched in date order, showing X number of entries per page. Perhaps I just need more coffee to understand!!garvinhicking wrote:Exactly. The "useSticky" value before actually only says: Do not fetch old stickies. If your blog entry was posted on the date that would include that entry in the usual entry list, the sticky entry would still be fetched (and put into the 'Sticky' group).Don Chambers wrote:Garvin - fetching stickies is now based on the the value of a custom user field????
Only entries that do not show up in the same chronological timeline will then not be fetched.
However, assuming there is actually some advantage of this old vs. not old, how about these options:
oldSticky: true/false: which seems to be what currently exists.
allSticky: true/false: Include all stickies/exclude all stickies.
onlySticky: true/false: Only sticky entries fetched.
Or perhaps a single variable (string or int) that is set for each type of condition:
useSticky: 0=old stickies, 1=all stickies, 2=only stickies 3=no stickies.
This final method seems to have an advantage - you can update in the future to include 4, 5, etc if there are scenarios that have not been anticipated at this time.
It just seems very burdensome IMHO to use an extended custom field for every entry to identify entryprops="ep_is_sticky=true" when the "mark as sticky post" has already been checked.
It IS, however, great that you were able to work in fetching based on custom user fields... that will likely come in real handy.
I meant something like:I'm doing that for the book, the effort for doing that online is too heavy for me.I can see you have also been editing the tech docs for this. Suggestion: include what happens by default (ie, option not specified).
Code: Select all
full
(boolean)
Indicates if the full entry will be fetched (body+extended: TRUE),
or only the body (FALSE). If not specified (or "Default"): true.=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
A sticky entry has an entry date, despite of it being sticky. You can see that if you edit the blog entry - you'll see the original date in the edit screen.
Let's say you have 5 entries:
Entry #1, 2007-01-01
Entry #2, 2007-02-01
Entry #3, 2007-03-01
Entry #4, 2007-04-01
Entry #5, 2007-05-01
Let's say you make entry #1 sticky. Let's say you configure your startpage to show 3 entries.
This means, you will see this rendering:
Entry#1 (Sticky, no date shown)
Entry #5
Entry #4
Now, assume you use the smarty_fetchPrintEntries code to show 3 items. With the default no Sticky setting, you get Entry 1, 5 and 4.
If you now set the "no sticky setting" for the fetchPrintEntries function, you will get entry 5, 4 and 3 instead. This is, because Entry #3 is more recent than Entry #1. It gets hidden, because the sticky-fetching is unfunctional.
However, if you made entry #3 sticky, you will see entry #3 on the "non sticky" output as well, because entry#3 is the most recent third entry of the three items you want to show.
You can only forcible exclude sticky entries by using this new filtering mechanism I introduced. noSticky simply means: "Do not treat entries as sticky, interpret their date as usual". It does not mean "Treat sticky entries as invalid entries and remove them completely".
Once the stickyness is ignored, a blog entry resumes to be a usual blog entry. It does not get removed from the "flow".
However, because of the way that entries.tpl formats entries which have the "sticky" attribute (this is still attached to the entry, because you actually did not remove the sticky attribute, only the way they are fetched), the entry will still be rendered as a sticky entry. So you only get the same display because your entries accidentaly are within the same daterange - not because the function does not work properly.

Regards,
Garvin
No apologies required.Thanks again Garvin. My apologies - I do not understand how this works, and do not understand any practical application of the description you provided. An entry is either sticky, or it isn't. Most entry pages are not displayed for date ranges.... they are usually fetched in date order, showing X number of entries per page. Perhaps I just need more coffee to understand!!![]()
A sticky entry has an entry date, despite of it being sticky. You can see that if you edit the blog entry - you'll see the original date in the edit screen.
Let's say you have 5 entries:
Entry #1, 2007-01-01
Entry #2, 2007-02-01
Entry #3, 2007-03-01
Entry #4, 2007-04-01
Entry #5, 2007-05-01
Let's say you make entry #1 sticky. Let's say you configure your startpage to show 3 entries.
This means, you will see this rendering:
Entry#1 (Sticky, no date shown)
Entry #5
Entry #4
Now, assume you use the smarty_fetchPrintEntries code to show 3 items. With the default no Sticky setting, you get Entry 1, 5 and 4.
If you now set the "no sticky setting" for the fetchPrintEntries function, you will get entry 5, 4 and 3 instead. This is, because Entry #3 is more recent than Entry #1. It gets hidden, because the sticky-fetching is unfunctional.
However, if you made entry #3 sticky, you will see entry #3 on the "non sticky" output as well, because entry#3 is the most recent third entry of the three items you want to show.
You can only forcible exclude sticky entries by using this new filtering mechanism I introduced. noSticky simply means: "Do not treat entries as sticky, interpret their date as usual". It does not mean "Treat sticky entries as invalid entries and remove them completely".
Once the stickyness is ignored, a blog entry resumes to be a usual blog entry. It does not get removed from the "flow".
However, because of the way that entries.tpl formats entries which have the "sticky" attribute (this is still attached to the entry, because you actually did not remove the sticky attribute, only the way they are fetched), the entry will still be rendered as a sticky entry. So you only get the same display because your entries accidentaly are within the same daterange - not because the function does not work properly.
We cannot change the way it is currently implemented, that would break BC.However, assuming there is actually some advantage of this old vs. not old, how about these options:
Actually that's the most logical conclusion. You simply add a listing of fields with their expected values you want to fetch. IMHO that's the most clean and lean solution.It just seems very burdensome IMHO to use an extended custom field for every entry to identify entryprops="ep_is_sticky=true" when the "mark as sticky post" has already been checked.
You have coWiki access, right? Could you do that?I meant something like:
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
OK - I am finally understanding it. But I still think it might be valuable to introduce a NEW sticky option with the options I previously described (old, all, only, none).... there would be no BC issue if it were new.garvinhicking wrote: Let's say you have 5 entries......
No access that I know of, but even if I did, I do not know what the defaults are.... otherwise I would be happy to.You have coWiki access, right? Could you do that?![]()
=Don=
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
What kind of things are suppressed by use_footer="false"? I am using the latest 1.3 alpha.
I realize it is this, in entries.tpl:
I just cannot think of an example off the top of my head of what gets fed into this and it is driving me nuts!!! 
Code: Select all
{serendipity_fetchPrintEntries limit="0,5" full="true" use_footer="false" skip_smarty_hooks="true"}Code: Select all
{if $footer_info}
({$footer_info})
{/if}=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
There's some function in include/functions_entries.inc.php that generates this...
Regards,
Garvin
There's some function in include/functions_entries.inc.php that generates this...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Regards,
Garvin
What do you mean with "think of"? $footer_info is that what gets displayed for pagination purposes "(Page X of Y, totalling Z entries)"...?Don Chambers wrote:But can you think of any? I want to trigger it for styling purposes, and I cannot for the life of me come up with anything!!!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
That is what I originally thought Garvin, but here is the bottom of the default entries.tpl, and what most entries.tpl's look like too:
Code: Select all
<div class='serendipity_entryFooter' style="text-align: center">
{if $footer_prev_page}
<a href="{$footer_prev_page}">« {$CONST.PREVIOUS_PAGE}</a>
{/if}
{if $footer_info}
({$footer_info})
{/if}
{if $footer_next_page}
<a href="{$footer_next_page}">» {$CONST.NEXT_PAGE}</a>
{/if}
{serendipity_hookPlugin hook="entries_footer"}=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Yes, exactly - that's where $footer_info is emitted?!?
I'm feeling as if either one of us is standing on a power cord as thick as the atlantic ocean.
Regards,
Garvin
I'm feeling as if either one of us is standing on a power cord as thick as the atlantic ocean.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
$footer_info only contains the Text "Page X of Y, totalling Z entries". The next/back links are part of different $footer_* things, like you pasted in your output. If we would enclose them, all templates that currently exist would have duplicate output...
Regards,
Garvin
$footer_info only contains the Text "Page X of Y, totalling Z entries". The next/back links are part of different $footer_* things, like you pasted in your output. If we would enclose them, all templates that currently exist would have duplicate output...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
In that case, it is definitely not working. I am using the following in my index.tpl to retrieve the 5 most recent entries:
This is using the bulletproof entries.tpl.
Code: Select all
{serendipity_fetchPrintEntries limit="0,5" full="true" use_footer="false" skip_smarty_hooks="true" template="entries.tpl"}=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
What is not working? What do you get/see? What do you expect?
Regards,
Garvin
What is not working? What do you get/see? What do you expect?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/