TinyPortal

Development => Support => Topic started by: @rjen on December 04, 2015, 05:06:52 PM

Title: Tinyportal 1.2 Article Block?
Post by: @rjen on December 04, 2015, 05:06:52 PM
Thanks for the update! I love Tinyportal and was hoping for an update.

Install worked fine, and it seems this version has adressed the code issues I fixed myself over the last few years.


Not sure if this is the correct board to raise teh question, please feel free to move my question...

I have one annoying problem after the update. I have one block on my site "test dot fjr-forum dot nl" that links to a single article. This does not seem to work anymore: the block now shows :

Quote{blockarticle_text}
{blockarticle_moreauthor}

No matter what type of article I use (old, new, html, php or bbc)... I cannot find any other report of this issue.

Any hints?
Title: Re: Tinyportal 1.2 Article Block?
Post by: illori on December 04, 2015, 05:33:49 PM
which layout are you using?
Title: Re: Tinyportal 1.2 Article Block?
Post by: illori on December 04, 2015, 05:36:20 PM
can you try this fix?
replace this in TPsubs.template.php
function blockarticle_renders()
{
$code = '
<div class="blockarticle render1">
<div class="article_info">
{blockarticle_author}
{blockarticle_date}
{blockarticle_views}
</div>
<div class="article_padding">{blockarticle_text}</div>
<div class="article_padding">{blockarticle_moreauthor}</div>
</div>
return $code;
}
Title: Re: Tinyportal 1.2 Article Block?
Post by: @rjen on December 04, 2015, 06:48:45 PM
I tried that.

Replaced:
function blockarticle_renders()
{
echo '
<div class="blockarticle render1">
<div class="article_info">
{blockarticle_author}
{blockarticle_date}
{blockarticle_views}
</div>
<div class="article_padding">{blockarticle_text}</div>
<div class="article_padding">{blockarticle_moreauthor}</div>
</div>
';
}


by


function blockarticle_renders()
{
$code = '
<div class="blockarticle render1">
<div class="article_info">
{blockarticle_author}
{blockarticle_date}
{blockarticle_views}
</div>
<div class="article_padding">{blockarticle_text}</div>
<div class="article_padding">{blockarticle_moreauthor}</div>
</div>
return $code';
}


(by the way I addes the " ; " since without it I got an error:
arse error: syntax error, unexpected T_CLASS, expecting ',' or ';'

Unfortunately this did not work: now the block shows up empty...
Title: Re: Tinyportal 1.2 Article Block?
Post by: illori on December 04, 2015, 06:53:21 PM
try this instead


function blockarticle_renders()
{
$code = '
<div class="blockarticle render1">
<div class="article_info">
{blockarticle_author}
{blockarticle_date}
{blockarticle_views}
</div>
<div class="article_padding">{blockarticle_text}</div>
<div class="article_padding">{blockarticle_moreauthor}</div>
</div>
';
return $code;
}
Title: Re: Tinyportal 1.2 Article Block?
Post by: @rjen on December 04, 2015, 07:08:24 PM
That did the trick!

thanks. Maybe the first fix in version 1.3?
Title: Re: Tinyportal 1.2 Article Block?
Post by: illori on December 04, 2015, 07:13:43 PM
yep it will be in the next release when we get to it.
Title: Re: Tinyportal 1.2 Article Block?
Post by: lurkalot on December 04, 2015, 08:16:22 PM
Moved these posts from the news board, to support.  ;)

@rjen, thanks for the report. Illori, thanks for finding the fix.  O0
Title: Re: Tinyportal 1.2 Article Block?
Post by: illori on December 04, 2015, 09:25:54 PM
https://github.com/Tinyportal/TinyPortal/commit/6a1f624520aa8e2383a493f564bacfcf1d3b2174
Title: Re: Tinyportal 1.2 Article Block?
Post by: Ken. on December 04, 2015, 09:41:43 PM
Quote from: lurkalot on December 04, 2015, 08:16:22 PM
Moved these posts from the news board, to support.  ;)

@rjen, thanks for the report. Illori, thanks for finding the fix.  O0

Thanks for that good move Mick.  O0
Title: Re: Tinyportal 1.2 Article Block?
Post by: @rjen on December 05, 2015, 10:01:47 AM
Glad to have support for this. Ik like Tinyportal a lot, but it was getting awfully quit last year...