• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Design Customization » Flaw with brief version Site News (open tags creates issues)
Flaw with brief version Site News
NormalX
Posts: 94
Reputation: 7

Message # 1 | 9:07 PM
When you limit the number of characters in the brief version of site news entries...there are many tags that are left open...which create issues...

i.e.

non closed Paypal form tag creates issue with all the other form...hence if you search it takes you to the Paypal page

Please suggest a fix
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 8:27 AM
NormalX, use the code $CUT$ to limit the brief version. This way you will be able to manually control where an entry will be divided.
I'm not active on the forum anymore. Please contact other forum staff.
NormalX
Posts: 94
Reputation: 7

Message # 3 | 10:45 PM
Sunny, Neat...

Thanks
Boujohn
Posts: 36
Reputation: 0

Message # 4 | 8:17 PM
This still doesn't work for us. There is an if/then branch statement surrounding the text, and it is not getting completed.

Please advise as this looks terrible on our screen ...
Attachments: 7008661.jpg (145.6 Kb) · 1017304.jpg (150.7 Kb)
Sunny
Posts: 9296
Reputation: 456

Message # 5 | 10:12 AM
Boujohn, that's right, if you are using HTML in your entries, you must be careful where you put the $CUT$ code in order not to leave any unclosed tags.
I'm not active on the forum anymore. Please contact other forum staff.
Boujohn
Posts: 36
Reputation: 0

Message # 6 | 10:25 PM
I am not using HTML in my entries. I am just typing in plain text.

The News entry panel is inserting the HTML tags, and the page renderer is probably inserting the if/then branching tags. To my knowledge I have no control over this from the UI.

Fyi:

* All I have in my News page is a reference to $LAST_NEWS$ ... that macro evidently calls an underlying module to render the entire news page.

* In the "Appearance of Entries" design template, this statement is the one generating HTML output that is getting truncated:

JK1<!--?if($MESSAGE$)?--><div class="eMessage" style="text-align:left;clear:both;padding-top:2px;padding-bottom:2px;">$MESSAGE$ </div><!--?endif?-->
JK2

As you can see I placed literal text at the beginning and end of this if/then conditional branching block. From what I can tell the $MESSAGE$ is being expanded first, then 1000 char truncation per "brief mode" display, thereby losing the closure of the branching block. And here is how it looks when rendered ...



I could remove the branching logic from this statement, as I assume you wouldn't have a new post without a message (or maybe you would) but I assume it was put there for a reason.

I hope I've clarified the situation better. Is this a bug in the News module? Or did my template get modified somehow due to a change in setting through the UI? (which would still be a bug).

And, what's the best way to handle this?

Thanks. John

Added (2015-04-20, 10:25 PM)
---------------------------------------------
*** update ***

After further investigation I discovered a different in the if/endif tags on our main site vs a test site that we had created.

In the main site which has the problem, we have:

<table class="eBlock" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td style="padding:3px;">
<!--?if($MODER_PANEL$)?--><div style="float:right">   $MODER_PANEL$</div><!--?endif?-->
<div class="eTitle" style="text-align:left;"><a href="$ENTRY_URL$">$TITLE$</a></div>
JK1<!--?if($MESSAGE$)?--><div class="eMessage" style="text-align:left;clear:both;padding-top:2px;padding-bottom:2px;">$MESSAGE$ </div><!--?endif?-->
JK2<!--?if($ATTACHMENTS$)?--><div class="eAttach">Attachments: $ATTACHMENTS$</div><!--?endif?--><div class="eDetails" style="clear:both;">
<!--?if($RATING$)?--><div style="float:right"><!--?$RSTARS$('12','/.s/img/stars/3/12.png','0','float')?--></div><!--?endif?-->
<!--?if($CATEGORY_NAME$)?--><span class="e-category"><span class="ed-title">Category:</span> <span class="ed-value"><a href="$CATEGORY_URL$">$CATEGORY_NAME$</a></span></span><span class="ed-sep"> | </span><!--?endif?-->
<span class="e-reads"><span class="ed-title">Views:</span> <span class="ed-value">$READS$</span></span><span class="ed-sep"> | </span>
<!--?if($USERNAME$)?--><span class="e-author"><span class="ed-title">Added by:</span> <span class="ed-value"><a href="$PROFILE_URL$">$USERNAME$</a></span></span><span class="ed-sep"> | </span><!--?endif?-->
<span class="e-date"><span class="ed-title">Date:</span> <span class="ed-value" title="$TIME$">$DATE$</span></span>
<!--?if($COMMENTS_URL$)?--><span class="ed-sep"> | </span><a class="e-comments" href="$COMMENTS_URL$">Comments ($COMMENTS_NUM$)</a><!--?endif?-->
</div></td></tr></tbody></table><br>

and in the test site which doesn't have the problem, we have:

<table border="0" cellpadding="0" cellspacing="0" width="100%" class="eBlock"><tr><td style="padding:3px;">
<?if($MODER_PANEL$)?><div style="float:right">$MODER_PANEL$</div><?endif?>
<div class="eTitle" style="text-align:left;"><a href="$ENTRY_URL$">$TITLE$</a></div>
TM1<?if($MESSAGE$)?><div class="eMessage" style="text-align:left;clear:both;padding-top:2px;padding-bottom:2px;">$MESSAGE$</div><?endif?>
TM2<?if($ATTACHMENTS$)?><div class="eAttach">Attachments: $ATTACHMENTS$</div><?endif?><div class="eDetails" style="clear:both;">
<?if($RATING$)?><div style="float:right"><?$RSTARS$('12','/.s/img/stars/3/12.png','0','float')?></div><?endif?>
<?if($CATEGORY_NAME$)?><span class="e-category"><span class="ed-title">Category:</span> <span class="ed-value"><a href="$CATEGORY_URL$">$CATEGORY_NAME$</a></span></span><span class="ed-sep"> | </span><?endif?>
<span class="e-reads"><span class="ed-title">Views:</span> <span class="ed-value">$READS$</span></span><span class="ed-sep"> | </span>
<?if($USERNAME$)?><span class="e-author"><span class="ed-title">Added by:</span> <span class="ed-value" ><a href="$PROFILE_URL$">$USERNAME$</a></span></span><span class="ed-sep"> | </span><?endif?>
<span class="e-date"><span class="ed-title">Date:</span> <span class="ed-value" title="$TIME$">$DATE$</span></span>
<?if($COMMENTS_URL$)?><span class="ed-sep"> | </span><a class="e-comments" href="$COMMENTS_URL$">Comments ($COMMENTS_NUM$)</a><?endif?>
</div></td></tr></table><br />

Note the difference in the tags.

I think I used the builder mode on the main site once ... or at least the visual/HTML editor. Could one of those utilities I used, or a module setting that I adjusted, have caused this change?

Attachments: 9990963.jpg (341.5 Kb)
Post edited by Boujohn - Monday, 2015-04-20, 3:50 PM
Sunny
Posts: 9296
Reputation: 456

Message # 7 | 8:44 AM
Boujohn, if you used the Visual Editor at some point on your main website, then yes, that's the most probable reason of the differences in the code. Usually we do not recommend to use the Visual Editor for design customization because it may result in messed up HTML code.
I'm not active on the forum anymore. Please contact other forum staff.
Boujohn
Posts: 36
Reputation: 0

Message # 8 | 11:52 AM
Okay, thanks for confirming. We will be more careful in this area.

Thanks. John
uCoz Community » For Webmasters » Design Customization » Flaw with brief version Site News (open tags creates issues)
  • Page 1 of 1
  • 1
Search: