Page 1 of 1

Other 2k11 smarty templates

Posted: Thu Feb 12, 2015 12:42 am
by Don Chambers
I'm seeing smarty templates in 2k11 and next which I have never seen before. Would someome please explain where these are used:

comments_by_author.tpl
media_showitem.tpl
plugin_commentsearch_searchresults.tpl (is this serendipity_event_commentsearch?)
plugin_staticblock.tpl

Thanks!

Re: Other 2k11 smarty templates

Posted: Thu Feb 12, 2015 9:31 am
by yellowled
* comments_by_author.tpl – see http://www.optional-necessity.com/comments/Don+Chambers
* plugin_commentsearch_searchresults.tpl (is this serendipity_event_commentsearch?) – I think so.
* plugin_staticblock.tpl – That's by serendipity_event_includeentry.

All of these were at some point requested by users of 2k11 during the test phase. As for

* media_showitem.tpl

I literally have no idea why it has that. I'd have to dig deep in the git logs. Might have something to do with the way larger versions of images from the media db are displayed in a popup in the frontend or something like that.

I don't recommend adding all of these to any theme in the future, though. This was only done for 2k11 because it was intended to become the new standard theme.

YL

Re: Other 2k11 smarty templates

Posted: Thu Feb 12, 2015 6:02 pm
by Don Chambers
yellowled wrote:* comments_by_author.tpl – see http://www.optional-necessity.com/comments/Don+Chambers
In all these years i didn't know that was even possible!

Re: Other 2k11 smarty templates

Posted: Thu Feb 12, 2015 7:05 pm
by yellowled
Don Chambers wrote:In all these years i didn't know that was even possible!
I'm pretty sure 90% of the people using s9y don't know that. :lol:

YL

Re: Other 2k11 smarty templates

Posted: Fri Jan 22, 2016 5:21 pm
by Don Chambers
yellowled wrote:* comments_by_author.tpl – see http://www.optional-necessity.com/comments/Don+Chambers
I find myself looking at this template again....

Questions:

1) I have found comment urls are also availalble for /.../comments/2016/ (a specific year) and /.../comments/1-category-one/ (a specific category). Are comments available for any other parameters other than author, year and category?

2) This is a valid url: mydomain.com/comments/. Note the missing author, year or category parameters... this produces a $head_title" of "Comments from", which makes no sense - at least, in English. Perhaps the word "from" should be a prefix to the author/year/category name only when that parameter is part of the url? Or does this not work in other languages?

Re: Other 2k11 smarty templates

Posted: Tue Jan 26, 2016 12:18 pm
by Timbalu
Don Chambers wrote:I have found comment urls are also availalble for /.../comments/2016/ (a specific year) and /.../comments/1-category-one/ (a specific category)
I don't have that!
I only ever knew of /comments/ and then stacking through the pagination. I'd think this is based to Configuration -> Permalinks -> Path to Comments value.
About the pages title: It is

Code: Select all

<title>Comments from  | John Doe's personal blog</title>
which is totally ok for me... maybe you just did not set a Blogtitle?
yellowled wrote:All of these were at some point requested by users of 2k11 during the test phase. As for

* media_showitem.tpl

I literally have no idea why it has that. I'd have to dig deep in the git logs. Might have something to do with the way larger versions of images from the media db are displayed in a popup in the frontend or something like that.
The template file 'media_showitem.tpl' is solely used by deployment -> serendipity_admin_image_selector.php -> within a "shared installation" (still marked experimental though - old as 10 years now) frontend template.

Re: Other 2k11 smarty templates

Posted: Tue Jan 26, 2016 3:06 pm
by yellowled
Timbalu wrote:within a "shared installation" (still marked experimental though - old as 10 years now)
Well, the experimental part about shared installations is the fact that not many people have practical experience with them. :mrgreen:

YL

Re: Other 2k11 smarty templates

Posted: Tue Jan 26, 2016 5:05 pm
by Don Chambers
Timbalu wrote:
Don Chambers wrote:I have found comment urls are also availalble for /.../comments/2016/ (a specific year) and /.../comments/1-category-one/ (a specific category)
I don't have that!
I only ever knew of /comments/ and then stacking through the pagination. I'd think this is based to Configuration -> Permalinks -> Path to Comments value.
I am using the default value for Path to Comments of "comments".... but I do not think there is anything wrong with that.
Timbalu wrote:About the pages title: It is

Code: Select all

<title>Comments from  | John Doe's personal blog</title>
which is totally ok for me... maybe you just did not set a Blogtitle?
This isn't really what I meant. Let me see if I can do a better job of asking my question:

1) YL introduced me to the ability to show a page with just comments - and in his example - comments for a specific author. The url to show that is http://blog.s9y.org/comments/Garvin.
Through trial and error, I THOUGHT I HAD discovered that a specific year and a specific category can also be provided to that "/comments/" url to list comments for those items too: ie .../comments/2015 to provide comments for that specific year, or .../comments/1-my-category to provide comments for a specific category. THIS DOES NOT WORK... Please disregard my prior post on this.

2) Views in s9y modify $head_title. $head_title is used by <title>, but was nearly always used in the Blog title and subtitle ($head_subtitle) in templates prior to 2k11. The s9y blog still uses this method, ie:

Code: Select all

<h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle|truncate:50:" ..."}</a></h1>
<h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>
$head_title is set for comments by author (http://blog.s9y.org/comments/Garvin) to "Comments from Garvin"... which is what I would expect.

I also noticed that .../comments/ can be provided as a url without an author name... such as http://blog.s9y.org/comments/. In this instance, $head_title is simply "Comments from"... In the <title> element, this might make sense as "Comments from $blogTitle"... but alone as $head_title, it doesn't make much sense.

Re: Other 2k11 smarty templates

Posted: Tue Jan 26, 2016 6:01 pm
by Timbalu
Oh - /commenty/authorname was new to me :)

Well yes, I checked that with 2k11 - the "new" Standard. This is different from such old themes prior to 2k11. But they do:
Comments from Garvin
Serendipity
Comments from
Serendipity
which is OK too, since it is "all" comments from serendipity, isn't it?!

So actually what do you want to have?

Why not remove it with

Code: Select all

{if $view != 'comments'}{$head_title|default:$blogTitle|truncate:80:"&hellip;"}{/if}
or vice versa

Code: Select all

{if $view == 'comments' AND empty($blogTitle)}{* do not show anything/or/say where you are *}{else}{$head_title|default:$blogTitle|truncate:80:"&hellip;"}{/if}