garvinhicking wrote:...viewing entry by author is a core functionality of serendipity. The plugin only addresses core functionality, it is not responsible for any entry output; the sole purpose of the plugin is to create a linklist to all existing authors, there are no functions provided by the plugin, as the core does the job of this, just like printing usual entries.
I think I understand that the core functionality exists. I just don't understand how to access the data that causes that particular functionality.
You can use the link you have, even when the sidebar plugin is not installed.
I see two distinct links, both of which are creating a link that includes a reference to "authors" and the identification of a single author.
In entries.tpl there's a link,
Code: Select all
{$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a>
that causes only the entries of the single author shown to be printed.
In serendipity_plugin_authors.php the link,
Code: Select all
echo '<a style="white-space: nowrap" href="' . $entryLink . '">' . $entry['realname'] . '</a><br />';
also causes only the entries of the single author to be printed.
When index.php loads the actual s9y framework it then checks multiple regular expressions on the URL to see what matches. It seems to me that those to lines of code are setting some variables in the serendiptiy superglobal to values equal to the name and id of the author. Then when entries.tpl is displayed again, only the entries for that author are displayed.
I was able to follow the code in index.php to figure out where those regular expression evaluations actually take place. I lost the trail, but it seems like the values make their way into an array called $entry, which is used in the entries.tpl to display data about the entries, having already been filtered in index.php using the values passed in the URI.
What I want to do is to be able to access those same values from the superglobal, or wherever they are, to be able to do more work with them. Does that make sense?
Right now I'm using
Code: Select all
{if $view == "start" AND $staticpage_pagetitle == ""}
{serendipity_fetchPrintEntries limit=9999 template="intro.tpl"}
{else}
{$ENTRIES}
{$ARCHIVES}
{/if}
to trap the flow from content.tpl to entries.tpl and redirect it to my new page, intro.tpl, when the site's base URL is used. In intro.tpl I display only a list of entries without the entry body. I'd like to extend the functionality of content.tpl to also capture the flow when the URL includes a specific author or category name or id. I'm not yet sure how to do that. I can then use intro.tpl to list only the entries of the specific author or category that's been passed.
The intro.tpl is being used as an index; a list of entries. When a link to an entry is selected in intro.tpl, the flow through content.tpl should follow the else clause and go to the entries.tpl where the entry is then displayed as it normally would be. You can see what I've done so far at
www.codetwists.com/Blog.
I'm learning a bit more about the constructs each time I delve into one of these. I think it would be easier if my search capabilities were better, but I don't think Macromedia Dreamweaver is searching all of the files correctly (maybe it's just me).
Thanks for your patience with me and for your help.
Myron
[/code]