Jump to content

No "global" reviews / comments template


Makoto

Recommended Posts

Whenever writing apps that support reviews or comments, it seems like we're supposed to just copy and paste our own template for what is really the same core logic throughout most of the suite.

Specifically, this is what I mean:

image.png.d351ad455d822d4d8fda6f5e36dcfe8b.png

Every application has their own reviews.phtml template. Is there a specific reason for this? Couldn't this be standardized to just use one base reviews template that third-party applications can then reference instead of having to do the same thing within our own apps?

There's a lot of logic in these templates that could break between versions and this likely could mostly be avoided by just maintaining a single base template for comments and reviews.

Link to comment
Share on other sites

reviews.phtml especially is hard to do because it can have some special situation. Downloads, for example, there's the Users must download before reviewing? that will have this option in the template:

		{{elseif $file->mustDownloadBeforeReview()}}
			<p class='ipsType_reset ipsType_light ipsType_normal'>{lang="no_download_review"}</p>

I use in a couple of apps something similar. Unless they make a way to pass as parameters somehow.

But I agree about comments. comments.phtml uses a different lang bit (item locked) but that can easily be a parameter.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...