Other 2k11 smarty templates

Discussion corner for Developers of Serendipity.
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Other 2k11 smarty templates

Post 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!
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Other 2k11 smarty templates

Post 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
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Other 2k11 smarty templates

Post 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!
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Other 2k11 smarty templates

Post 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
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Other 2k11 smarty templates

Post 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?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Other 2k11 smarty templates

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Other 2k11 smarty templates

Post 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
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Other 2k11 smarty templates

Post 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.
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Other 2k11 smarty templates

Post 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}
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply