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,965
  • Latest: boruko
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 431
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 92
  • Total: 92

front page questions

Started by brynn, March 26, 2018, 03:24:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brynn

Hhm, there's some kind of problem.  I just copy/pasted the code, but it's not working properly.  Either there's a conflict with the html and the front page code....or I don't know.

Here's the new front page:  https://forum.inkscapecommunity.com/index.php

And here's the article:  https://forum.inkscapecommunity.com/index.php?page=28

Look at the bottom of the front page.  About halfway through the article, part of is scrambled, and the rest is just chopped off.

brynn

In the code, right where the problem starts, there's an unfloat, using

<p class="unfl"></p>

Could there be something like that in the front page code?  Do you want to see the whole code?

And at the very last part that's showing, is a 'close label' tag.

</label>

I guess I need to look at the source code for the front page, right?

wildenborch

Brynn,

I think that's because the smf_tp_blocks SQL body setting is text. You have to change that to longtext.

After I changed this field to longtext it was possible to post your text.....
I copied the text from the source View Page Source and therefore the text is somewhat different .....

see http://www.rodebaert.com/index.php

brynn

Ok, I found this in the source code.  This is about 10 or 15 lines below the last contents that is showing.  But this is NOT in my code.  I don't know what it means.

<li><a href="http://2dgameartguru.com/2014/03/cre</div></div><span class="botslice"><span></span></span></div>
</div>


I have no such class (or anything) called "botslice".

Is the article just too long for the front page?

And then right below THAT, is some javascript, which I also didn't write.  I don't even know how to write javascript!

Do you want me to post that code?  Ok, yeah, I may as well post it, in case someone knows what it is.  Ok, this is the whole code which is not mine....  Well, the first part of the first line is mine.  I'll put a mark where my code stops.

<li><a href="http://2dgameartguru.com/2014/03/cre***my code stops here***</div></div><span class="botslice"><span></span></span></div>
</div>
</div>
</div></div>
<script type="text/javascript"><!-- // --><![CDATA[
function toggle( targetId )
{
var state = 0;
var blockname = "block" + targetId;
var blockimage = "blockcollapse" + targetId;

if ( document.getElementById ) {
target = document.getElementById( blockname );
if ( target.style.display == "none" ) {
target.style.display = "";
state = 1;
}
else {
target.style.display = "none";
state = 0;
}

document.getElementById( blockimage ).src = "https://forum.inkscapecommunity.com/Themes/default/images/tinyportal" + (state ? "/TPcollapse.gif" : "/TPexpand.gif");
var tempImage = new Image();
tempImage.src = "https://forum.inkscapecommunity.com/index.php?action=tpmod;upshrink=" + targetId + ";state=" + state + ";" + (new Date().getTime());

}
}
// ]]></script>
<div class="tp_frontpanel" style="overflow: hidden;"></div></div>
</td>
</tr>
</table>



brynn

wildenborch, I don't understand.  I don't know much about databases.  Can you explain it in a fairly simple way?

Why would it work fine for the article, but not the front page?

brynn

Ok, when I looked at your page, that you created from the source code - it's not working properly.  Those lists are not supposed to be expanded, and there's not supposed to be a checkbox.  The list is supposed to expand/contract when you click on the black text.

So if changing the database thing is causing that to happen, then that won't be a good solution.

In Reply #10 is a link to the original article, so you can see how it works.

wildenborch

In the MySQL database the settings of the body (the article text) of smf_tp_blocks is set to text. This allows you to enter a text of a "small" number of characters. If you change this setting into Longtext (or Mediumtext) your article block can be much larger.

See also: https://stackoverflow.com/questions/13932750/tinytext-text-mediumtext-and-longtext-maximum-storage-sizes

Can you post your code here then I can copy that into my block to see if it looks ok?

wildenborch

The problem with the code on my side was caused by the html editor.
After I disabled the html Javascript editor the code looks good....
http://www.rodebaert.com/index.php

brynn

Oh yeah, when I look at the code that I pasted into the front page block, it's cut off.  Even if I paste in the whole code, as soon as I click save, it gets cut off.

Yeah, that's how it should be working.  So you don't need the code anymore?

I found the "smf tp blocks" table.  But when I click on it, it doesn't look like your screenshot.  See my screenshot.  I have a "body" column, but not a "body" row.

Oh...do I go to the Structure tab?  That one looks  more like your screenshot.

lurkalot

Yep, forgot to say, turn off the editor before going back to the article and copying the contents.  That's what I always do, in fact I very rarely have the editor on.

Article settings:  Turn editor off.  Go to article, click edit, and copy the contents.  Paste it into your block.

Not come across the number of characters problem before,  but if that is the case, I would be tempted to split the page over more than one block.  Like I did with the front page here. That way no risk of messing up with your database.

That also makes it handy if you wish to edit part of it on a regular basis.  ;)

This website is proudly hosted on Crocweb Cloud Website Hosting.