News: April 7th, 2019, The Tinyportal team is pleased to announce the release of ~~ TinyPortal 1.6.3! GET IT NOW!!!

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

August 21, 2019, 09:28:04 AM

Login with username, password and session length

Recent

Members
  • Total Members: 3751
  • Latest: tom888
Stats
  • Total Posts: 188690
  • Total Topics: 20745
  • Online Today: 68
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 23
Total: 23

Author Topic: Article Intro in Custom Template and "Read More" link.  (Read 4729 times)

0 Members and 1 Guest are viewing this topic.

Offline DistantJ

  • Jr. Member
  • **
  • Posts: 16
Article Intro in Custom Template and "Read More" link.
« on: October 19, 2010, 11:17:56 AM »
OK, I just wanted to know what {tag} you use to display the article intro in a custom template instead of the full thing? I've twigged that the custom template for a category is for when you view the category, and the front page custom template is used when viewing the full article (that works for me, I want the category to show a preview and the main article to show the whole thing)

Also, how would a 'Read More' link be done?

Finally, I want to actually change one of the built in templates (so I can select that template for the front page previews but keep the full article showing the front page's custom template as it currently does), which file should I edit?
« Last Edit: October 19, 2010, 10:50:42 PM by ZarPrime »

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Article Intro in Custom Template and "Read More" link.
« Reply #1 on: October 19, 2010, 12:19:50 PM »
Hi DistantJ,

First of all, about a 'Read More' link, this issue is being worked on for a future update of TinyPortal.  Read about it here  --> http://www.tinyportal.net/index.php?issue=29.0

On the other 2 questions, I'm not sure exactly what it is you are trying to do.  Maybe you could give a little better explanation.  FWIW, the Article Intro is used for display on the FrontPage, when the article is toggled to show on the FrontPage.  The full content is then shown on the actual article page.  When you mentioned "custom template", I first thought that you meant that you wanted to show the Intro on the FrontPage using 1 theme and the actual article, on the article page, using a different theme.  This is, of course, possible but again, I'm confused as to exactly what you are trying to do.  Again, maybe a little better explanation is in order, in addition to a link to your FrontPage where we can see the article you are trying to work with.

ZarPrime

Offline DistantJ

  • Jr. Member
  • **
  • Posts: 16
Re: Article Intro in Custom Template and "Read More" link.
« Reply #2 on: October 19, 2010, 12:22:34 PM »
HWhen you mentioned "custom template", I first thought that you meant that you wanted to show the Intro on the FrontPage using 1 theme and the actual article, on the article page, using a different theme.  This is, of course, possible but again, I'm confused as to exactly what you are trying to do.
That is actually what I was intending to do :) but I want to use the same theme for the category display page (when somebody clicks the category name on an article it shows all articles in that category) as I do the FrontPage, NOT the article page :)

Offline DistantJ

  • Jr. Member
  • **
  • Posts: 16
Re: Article Intro in Custom Template and "Read More" link.
« Reply #3 on: October 19, 2010, 01:15:07 PM »
Sorry! Actually it works exactly as I had hoped it would, I had just forgotten to click the 'Use Intro' box!

I'd still like to be able to use a different template on the category display page to that on the full article page though.

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Article Intro in Custom Template and "Read More" link.
« Reply #4 on: October 19, 2010, 01:30:43 PM »
If you are talking about displaying a catlist page with a different theme then the default Forum theme, I don't think this is possible, at least not at this time.  Is this really necessary or is it just something that you would really like to see?  In either case, please give me a link to a "Category Display Page" on your site that you would like to be displayed with a different theme than the default Forum theme, and perhaps we can talk to Bloc about adding this feature to a future update of TinyPortal.

However, you can display a particular Article with a theme other than the default Forum theme.  For example, see the following links on my test site ...
FrontPage --> http://talesofthehavenexpanse.com/smf2test/index.php
Test Article --> http://talesofthehavenexpanse.com/smf2test/index.php?page=5

ZarPrime

Offline DistantJ

  • Jr. Member
  • **
  • Posts: 16
Re: Article Intro in Custom Template and "Read More" link.
« Reply #5 on: October 19, 2010, 02:00:51 PM »
Well, the articles use the frontpage custom layout (I meant layout, not theme, sorry), the category view uses it's own custom theme, that works for me.

OK here's how it goes...



^ This is how it normally works.

This is great for me because I can have the front page use "Picture+Article", the category page use a custom layout, and the full view article use yet another layout (the one I have stored as the frontpage custom layout, even though 'picture+article' is selected for the actual front page).

The problem is, when I set the category "News" to use "Picture+Article", it forces the full view of articles in that category into "Picture+Article" as well.

So the best option would be for me to recreate the "Picture+Article" layout manually as a custom layout, but I don't know all of the {tags} for example I don't know the tag to show the article thumbnail image, so I wanted to know what files I should look in to find the layouts, or what tags I need to know.

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Article Intro in Custom Template and "Read More" link.
« Reply #6 on: October 19, 2010, 02:30:42 PM »
OK, I think I'm starting to get it here. ::) Give me a little while to think about this, at least a couple of hours.  I need to roll this over in my head.

ZarPrime

Offline DistantJ

  • Jr. Member
  • **
  • Posts: 16
Re: Article Intro in Custom Template and "Read More" link.
« Reply #7 on: October 19, 2010, 02:35:46 PM »
For now, can you just tell me what tag to use to get the article image?

I have created this template:

<div class="tparticle" style="padding: 0 0.5em; margin-bottom: 1em;">
      <div class="article_picturecolumn">
   ...[I NEED THE ARTICLE IMAGE HERE]...
                </div></div>
      <div class="render4">
         <h3 class="catbg"><span class="left"></span>{article_title}</h3>
         <div class="article_info">
            {article_category}
            {article_author}
            {article_date}
            {article_views}
            {article_rating}
            {article_options}
         </div>
            <div class="article_padding">
   <div class="article_inner">
{article_text}
</div>
</div>
</div>


Is there an {article_whatever} tag I can put in place of "...[I NEED THE ARTICLE IMAGE HERE]..." to get it to show the image?

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Article Intro in Custom Template and "Read More" link.
« Reply #8 on: October 19, 2010, 02:48:06 PM »
What do you mean by "article image"?  Are you talking about an Avatar, or something else?  Can you attach an image or screenshot to your next post?

ZarPrime

Edit:  Oh wait, maybe you are talking about an attached image.  But, there aren't images in the category, only in specific articles, right?  I am so confused. :o

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Article Intro in Custom Template and "Read More" link.
« Reply #9 on: October 19, 2010, 03:02:16 PM »
DistantJ,

I'm going to have to do some research on this.  If you want to try something, try one of these to see if it works ...
{article_image} or {article_picture}

LMK if it works and, if it doesn't, I'll have to figure it out.

ZarPrime