TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 454
  • Total: 454

Bug in TPortal.template.php (and a fix)

Started by MASSch, June 12, 2009, 11:26:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MASSch

After upgrading TP to 1.0.8 beta comments for articles stopped to unfold. The problem was in TPortal.template.php line 468:
<div id="tp_article_comment windowbg2" ' , isset($story['options']['commentupshrink']) ? '' : 'style="display: none;"' , '>';

while the JS function unfolding the comment pane tried to access dom element 'tp_article_comment'. I've changed the line to:
<div id="tp_article_comment" ' , isset($story['options']['commentupshrink']) ? '' : 'style="display: none;"' , '>';

and now it works.
Hope this helps.

Uthn


ZarPrime

MASSch,

Welcome to TinyPortal.

If you are referring to TP 1.0 beta 4, this is probably the same bug that has already been reported.  See this topic ...
http://www.tinyportal.net/index.php?action=bugtracker;sa=bug512

I will put a link to this topic in the bug report as a possible bug fix for Bloc.

Thank You,
ZarPrime

MASSch

Sorry for the dupe, I've searched the site with queries like "comment unfold bug", but the word "uncollapsable" never came to my mind (and will not either). BTW, what's the deal with these "dual-class" style and DOM names like that "tp_article_comment windowbg2"? Are they any better than "usual" ones?

PS You can also change line 454 to
<a href="#tp-comment" onclick="swapOptionsArticle(\'tp_article_comment windowbg2\')"> instead of line 468.

ZarPrime

MASSch,

I don't know the answer to your question but perhaps Bloc will answer it when he sees this topic.

ZP

IchBin

The dual class allows you to apply styles to an element that you don't want to include into a single class. The advantage is that the styles don't have to be applied to all the elements. If you want to customize a single style and you only have one style applied, it applies to ALL the elements. Adding a second class eliminates that problem.

MASSch

Thanks, IchBin. I see Your point with classes, but this doesn't work at all with DOM id's!

IchBin

Right, you are only allowed to have a single ID in a page. No duplicate names allowed. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.