TinyPortal

Development => Support => Topic started by: mekon on April 08, 2009, 01:32:52 AM

Title: Forum post layout on front page
Post by: mekon on April 08, 2009, 01:32:52 AM
Hey all I have read so far through 20 pages and done a few searches both on google and on your forums, but still cannot find a answer to my problem.

I am using:
TinyPortal Beta 3
SMF 1.1.8
IronWoW Theme

I have installed:
HacksPark shoutBox
WoW-Itemstats 1.25.9.5
Images On Board

My site: http://tsbguild.nokem.co.uk

As you can see in the link, the second forum post to be displayed on the site the main box width is narrower than it should be. I have checked through the tp theme php and css files but cannot seem to reslove this issue without some help. my frontpage settings are as follows.

What to display on frontpage: Forum-posts and articles - sorted on date
How frontpanel will be shown with content: Hide frontpanel, unless otherwise selected.
Articles layout for the frontpage: A
Layout types: Normal + icons

I would also love to have the center blocks the forum posts display in the same as the very top block on the site, which they do when selecting Normal article view but showing the posters Avatar as it does on Normal + icons view.

Any help would be greatly appriciated.

Thanks in advance.
Title: Re: Forum post layout on front page
Post by: Renegd98 on April 08, 2009, 03:15:20 AM
Does it do this in the default theme also, or is this a theme issue?
Title: Re: Forum post layout on front page
Post by: mekon on April 08, 2009, 08:32:49 AM
Hi thanks for the reply, after trying in a few themes it does indeed to this in the default and any other theme I try.
Title: Re: Forum post layout on front page
Post by: Renegd98 on April 08, 2009, 01:45:42 PM
Is there possibly any vode in the block that has the width problem that woudl cause it to be doing this?
Title: Re: Forum post layout on front page
Post by: mekon on April 08, 2009, 01:49:50 PM
well all the php files are default for both TP and SMF only thing I have edited is for the menu links at the top of the page and the css files.

I have checked the TP css and can not find anything that would cause only the 2nd block to be reduced in size.
Title: Re: Forum post layout on front page
Post by: Renegd98 on April 08, 2009, 01:58:29 PM
What I meant is are there any codes/coding in the article that has the problem?
Title: Re: Forum post layout on front page
Post by: mekon on April 08, 2009, 02:00:26 PM
No, its coming straight from a forum post, there is no code at all in the post.

What about doing this another way? I prefer the layout used in Normal view but wish to add user avatars to the block, how exactly could this be done? I have checked the code in the TPortal.template.php but cant see exactly how I would go about adding it?

thanks again for any help you could give
Title: Re: Forum post layout on front page
Post by: Renegd98 on April 08, 2009, 02:36:01 PM
Someone more familiar with coding would have to answer that question. I am stumped as to why that block does that.  Have you tried a different post to see if it will always show the 2nd block like that?

Please try a different post to convert to a article and if it does it still then youmay have found a bug that needs to be reported.
Title: Re: Forum post layout on front page
Post by: mekon on April 08, 2009, 02:46:28 PM
Articles seem to work fine, it only seems to be a problem showing the forum topics on front page.
Title: Re: Forum post layout on front page
Post by: mekon on April 08, 2009, 10:39:22 PM
Just checking in to see if anyone has had more time to take a look at this problem or if there is anything that can be done to add the avatar image to normal layout view for the forums and articles on frontpage ?

thanks in advance
Title: Re: Forum post layout on front page
Post by: mekon on April 08, 2009, 11:51:13 PM
OK ive kinda sorted it, in the way that I managed to add avatars to the normal view, I found this layout works and looks better for my style.

Anyway this is what I did to get that incase anyone else has same problems and is interested.

open TPortal.template.php in your themes/default folder.

find the following code.
// normal render
case '1':
if($story['is_boardnews'] || $story['frame']=='theme')
echo '
<div class="tborder tp_article_frame">';


$ntime='
<span class="tp_month">' . date("M",$story['timestamp']). '</span><span class="tp_thindivider">  </span><span class="tp_day">'. date("d",$story['timestamp']) . '</span> <span class="tp_year"> '. date("Y",$story['timestamp']) . '</span>';

if($story['is_boardnews'] || isset($story['options']['title']) || !isset($story['options']))
{
echo '
<div' , $story['is_featured'] ? ' id="featured_article"' : '' , ' class="' , $story['is_boardnews'] ? 'catbg' : 'titlebg' , ' tp_subject">';

if($context['TPortal']['print_articles']==1)
echo '<a style="display: block; float: right;" class="smalltext" href="' . $story['print_href'] . '">' . $txt['tp-print'] . '</a>';

if(isset($story['options']['date']) || $story['is_boardnews'])
echo $ntime;

echo '
<a href="' , $story['href'] , '">' , $story['subject'] , '</a>
</div>';
}
// render the text
echo '
<table width="100%"  class="windowbg2" cellspacing="1" cellpadding="0"><tr>
<td valign="top">';


after add
// show authors avatar?
if(isset($story['options']['avatar']) && !empty($story['avatar']['image']))
echo '
<div class="tp_avatar' , ($context['TPortal']['mycat']!='' || !empty($context['TPortal']['is_front'])) ? '_category' : '' , '"><a href="' , $story['poster']['href'] , '" title="' , $story['poster']['name'] , '">' , $story['avatar']['image'] , '</a></div>';


The code was taken from the next part of the php file, for showing "any category icon", or Normal + lcon layout.

hope this helps anyone else having this problem, its not a fix for the normal + icon layout but more as a quick alternative until the problem is resolved.
Title: Re: Forum post layout on front page
Post by: mekon on April 09, 2009, 12:43:40 AM
ok another small problem, after adding the above code, I cant seem to get the avatar to float right to the text. it pushes the text below the image. ive tried everything in the css i can think of, using position: absolute throws the avatar to the top right of the page.

I am basically trying to get my forum blocks to looks like on this site.

http://www.fallenheroesguild.com/smf/index.php (http://www.fallenheroesguild.com/smf/index.php)
again any help on this would be appriciated.