TinyPortal

Development => Feedback => Topic started by: st!nko on July 14, 2006, 08:11:31 AM

Title: Articles + Relevant Forum Thread?
Post by: st!nko on July 14, 2006, 08:11:31 AM
Hi, my suggestion as a potential new feature in TinyPortal, is an option for each new article posted to have a 'relevant forum thread' (or something similar) option when posting an article.

At the moment, im using the option to only show forum threads on the front page, and making all my news articles as forum threads as the so the comments on the articles are in the forum thread, so that any comments on my news posts helps make the forums grow.

But with that option of making forum threads show on front page, I can only set a character limit, rather than have
the front page intro like the article does, and although its a great feature, news articles can look a bit messy, especially if it ends with a Horizontal Rule and half a word underneath it  :buck2:

Of course, I can always make the thread and link to the article, but i think having an option to choose to have a relevant forum thread or to have the comments attached to the article section would be a good feature.

Hope some other people think the same, as this kind of bugs me, as I love it how articles can include PHP and be categorised. I think this feature would benefit people whos site (like mine), thrives off forum activity.

Title: Re: Articles + Relevant Forum Thread?
Post by: bloc on July 14, 2006, 10:48:18 PM
In future versions I have some ideas to add custom fields to each article. One of those could be a forum topic link - for example. It could even be a preset field, so it catches the number of views and replies on the topic too.
Title: Re: Articles + Relevant Forum Thread?
Post by: jarnex on July 29, 2006, 03:05:13 AM
I am using the TP Enterprise theme, and I like the way the FrontPage block in Settings can show posts from a single board.  It formats them each in a nice format, with pagination at the bottom.  I would really like article pages with that feature, so an article page could have that display of other boards.  We have embedded media boards etc, and it would allow links on the frontpage of TP to get all those without de-facto forum browsing.  Is there any current way of perhaps including or using the function in an article?
Title: Re: Articles + Relevant Forum Thread?
Post by: bloc on July 29, 2006, 11:57:23 PM
Quote from: jarnex on July 29, 2006, 03:05:13 AM
I am using the TP Enterprise theme, and I like the way the FrontPage block in Settings can show posts from a single board.  It formats them each in a nice format, with pagination at the bottom.  I would really like article pages with that feature, so an article page could have that display of other boards.  We have embedded media boards etc, and it would allow links on the frontpage of TP to get all those without de-facto forum browsing.  Is there any current way of perhaps including or using the function in an article?

I am not quite sure I follow this one...but do you mean to show recent posts from a specific board into an article?
Title: Re: Articles + Relevant Forum Thread?
Post by: Techdomain on July 30, 2006, 12:06:18 AM
The calendar has a link to thread option. would it be possible to do something with that? (so you get a comments link at the bottom of the article)
Title: Re: Articles + Relevant Forum Thread?
Post by: jarnex on July 30, 2006, 07:54:29 PM
Quote from: Bloc on July 29, 2006, 11:57:23 PM
Quote from: jarnex on July 29, 2006, 03:05:13 AM
I am using the TP Enterprise theme, and I like the way the FrontPage block in Settings can show posts from a single board.  It formats them each in a nice format, with pagination at the bottom.  I would really like article pages with that feature, so an article page could have that display of other boards.  We have embedded media boards etc, and it would allow links on the frontpage of TP to get all those without de-facto forum browsing.  Is there any current way of perhaps including or using the function in an article?
I am not quite sure I follow this one...but do you mean to show recent posts from a specific board into an article?

Hi Bloc,

well I am using a PHP block to bring the messages from various boards into it.  That's fine.  But in TP settings, you can select to show a board on the frontpage.  It formats each of the messages with the blue bar etc from the TP Enterprise theme, and it also allws you to page through the entire board.  We have embedded youtube,googlevid and dewplayer boards that have loads of media.  I just wondered if there is a way to call the same function to produce the format in an article.  So, to make it clear, I can bring boards in fine using another php fuction, however I much prefer the look of the block shown from TP settings when you select a board, including the pagination.  Thanks for your reply.


Title: Re: Articles + Relevant Forum Thread?
Post by: bloc on July 30, 2006, 10:54:42 PM
Oh I see. I am afraid it won't be possible to do exactly that, because the "frontpage" is a special function that fetch articles and forum posts, and adds pagination. You can't call it directly, its executed when you go to the forum "first" page rather.
Title: Re: Articles + Relevant Forum Thread?
Post by: jarnex on July 31, 2006, 05:55:44 PM
Quote from: Bloc on July 30, 2006, 10:54:42 PM
Oh I see. I am afraid it won't be possible to do exactly that, because the "frontpage" is a special function that fetch articles and forum posts, and adds pagination. You can't call it directly, its executed when you go to the forum "first" page rather.

Okay, I understand the pagination issue. Could you direct me to the format of the blocks that that function makes please, and I can adapt the php of the other function?
Title: Re: Articles + Relevant Forum Thread?
Post by: bloc on July 31, 2006, 11:24:38 PM
Sure, its all in the TPortal.template.php:

echo '
<table cellspacing="0" cellpadding="0" width="100%" style="table-layout: fixed; margin-top: 4px; margin-bottom: 4px;" border="0" ' , ($news['is_last']=='theme' || $news['is_last']==false) ? 'class="tborder"' : '' , '>
<tr>
<td width="100%">
<div>';

if($news['is_last']=='theme' || $news['is_last']==false || $news['is_last']=='title')
echo '
<div class="' , $news['icon']=='noicon' ? 'titlebg' : 'catbg' ,'" style="padding: 6px;">' , $news['icon']!='noicon' ? $news['icon'] : '<img src="'.$settings['images_url'].'/TParticle.gif" alt="*" style="margin: 0px;" align="middle" /> ' ,' <a href="' .$news['href']. '">' .$news['subject']. '</a>';
else
echo '
<div style="padding: 6px;"> ' , $news['icon']!='noicon' ? $news['icon'] : '<img src="'.$settings['images_url'].'/TParticle.gif" alt="*" style="margin: 0px;" align="middle" /> ' ,' <a href="' .$news['href']. '">' .$news['subject']. '</a>';

// if featured..do something to the subject?
echo '
</div>
<div style="overflow: auto; padding: 8px; padding-top: 0px;" ' , ($news['is_last']=='theme' || $news['is_last']==false) ? 'class="windowbg2"' : '' , '>
<div style="padding-bottom: 4px; vertical-align: bottom;" class="smalltext"> '.$news['time'].' '.$txt['tp-by'].' <b><a href="'.$news['poster']['href'].'">'.$news['poster']['name'].'</a></b></div>';

if($news['icon']!='noicon'){
echo $news['body'];

echo '
</div>
<div ' , ($news['is_last']=='theme' || $news['is_last']==false) ? 'class="windowbg"' : '' , ' style="padding: 6px;">', ($context['TPortal']['frontpage_limit_len']>0 && strlen($news['body'])>$context['TPortal']['frontpage_limit_len']) ? '<a href="' .$news['href']. '">'.$txt['tp-readmore'].'</a> &nbsp;&nbsp;' : '' , ' ' , $news['icon']!='noicon' ? '<img src="'.$settings['images_url'].'/TPmodify.gif" alt="*" /> '.$news['new_comment'].' (<a href="' .$news['href']. '">'.$news['replies'].' '.$txt['tp-comments'].'</a>)' : '' ,'</div>
</div>
</td>
</tr>
</table>';


That part render the actual article or forum post.
Title: Re: Articles + Relevant Forum Thread?
Post by: jarnex on August 02, 2006, 04:59:05 PM
Thanks Bloc, now to try and make it work hahaha