TinyPortal

Development => Support => Topic started by: brynn on March 26, 2018, 03:24:46 PM

Title: front page questions
Post by: brynn on March 26, 2018, 03:24:46 PM
Hi Friends,
I currently have a single article on my front page (https://forum.inkscapecommunity.com/index.php).  Lurkalot tells me there's a way to configure it, to make it look more like a page, than an article on a page.  So that's what I'm trying to do.

But looking at the front page settings, I'm just as confused as I was almost 5 years ago, when I first started.  I've looked at the TP Docs page (https://www.tinyportal.net/docs/index.php?topic=239).  But it really only explains a couple of settings, and not this one.  I'm sure I'll have other questions as I go, but for now, these are the first questions.

What does it mean about 'front panel will be displayed before or after content'?  Does that refer to time, meaning that some part is loaded before another part?  Or does it mean some part is going to be on top of another part?

Also, what exactly is the "front panel", relative to the contents?

Thanks  :)
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 05:27:04 PM
Got to nip out for a while, and will come back to this with a better explanation shortly.

I will just say, what you need to do is create a front panel block, of the same type as your article, then turn off the article.

I'll be back.  ;)
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 06:27:46 PM
OK, back.

I would set Front page settings. (What to display on frontpage: to Frontpanel).

And set:  Use frame style, but not title style. On the block which replaces your article.


Frontpanel blocks are basically blocks that can only display on the front page and nowhere else. Where other panel blocks can display anywhere, even the front page.

Frontpanel will be added before content:  The front panel will show above other content, (content being) promoted posts, or articles.

Frontpanel will be added after content:  The front panel will show below other content, (content being) promoted posts, or articles.

Upper, Lower, Top, and Bottom blocks will all show as normal if enabled.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 06:54:48 PM
Oh, there's no rush  ;)

Well I want the contents of the article to be on the front page.  Only that.  So somehow that needs to be transferred to something besides an article.

Ooohh, I think I did it.  Look... (https://forum.inkscapecommunity.com/index.php)

I didn't paste in the code yet.  But is that what you mean?  It's only a little bit different from the article.  But it's an improvement.

As far as my question about front panel vs contents.  Right now, I have it set to hide the front panel.  Kind of confusing.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 06:58:32 PM
I wonder where that white space is coming from, between where the text will be, and the footer?

Maybe it will go away, when I put the article code in there?
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 07:01:46 PM
Something like this? http://www.rodebaert.com/index.php (http://www.rodebaert.com/index.php)

I have the tinyportal Frontpage settings to only show the Frontpanel
In the blocks I have turned of the left and right menu (for guests and for this example only....)
In the FrontPanel Block I have created an Html / Javascript code article

Title: Re: front page questions
Post by: brynn on March 26, 2018, 07:07:56 PM
Quote from: wildenborch on March 26, 2018, 07:01:46 PM
Something like this? http://www.rodebaert.com/index.php (http://www.rodebaert.com/index.php)

Ooh, fancy!  Yeah, something like that.  Except the page that's going to go in there (original article contents) is almost all text.  Well, there are a couple of images, just to make it more interesting, but they are more like theme images than photos.

I'll transfer the html shortly.  I just want to make sure this is what Mick was suggesting.
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 07:19:52 PM
Quote from: brynn on March 26, 2018, 07:07:56 PM

I'll transfer the html shortly.  I just want to make sure this is what Mick was suggesting.

That's it Brynn, you are on the right track.  O0
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 07:20:33 PM
BTW I choose the FrontPanel and not featured article because the featured article would show some "article info"  like posted in ....

If you use TP version 1.41 you have to "enable" Html / Javascript code
See this topic: https://www.tinyportal.net/index.php?topic=36019.msg292135;topicseen#new (https://www.tinyportal.net/index.php?topic=36019.msg292135;topicseen#new)
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 07:28:45 PM
Quote from: wildenborch on March 26, 2018, 07:20:33 PM
BTW I choose the FrontPanel and not featured article because the featured article would show some "article info"  like posted in ....

If you use TP version 1.41 you have to "enable" Html / Javascript code
See this topic: https://www.tinyportal.net/index.php?topic=36019.msg292135;topicseen#new (https://www.tinyportal.net/index.php?topic=36019.msg292135;topicseen#new)

This is how Brynn originally had it set, but now adding it to a block instead.  If the code is already in a html article, a simple copy and paste into the HTML/JavaScript block should be ok.  It was only the editor that was removed, not the functionality.  ;)

We don't have the editor added to HTML/JavaScript blocks here on this site, we don't need it.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 07:40:42 PM
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.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 07:47:37 PM
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?
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 08:06:31 PM
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
Title: Re: front page questions
Post by: brynn on March 26, 2018, 08:08:48 PM
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>


Title: Re: front page questions
Post by: brynn on March 26, 2018, 08:10:42 PM
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?
Title: Re: front page questions
Post by: brynn on March 26, 2018, 08:14:34 PM
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.
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 08:18:33 PM
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 (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?
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 08:37:51 PM
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 (http://www.rodebaert.com/index.php)
Title: Re: front page questions
Post by: brynn on March 26, 2018, 08:46:14 PM
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.
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 08:46:52 PM
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.  ;)
Title: Re: front page questions
Post by: brynn on March 26, 2018, 08:53:29 PM
I'm not sure what editor you mean, to turn off?

But if I put it in more than one block, won't it look weird?  There would be a gap in between the blocks, right?

Yeah, I'm a little nervous messing with the database too.
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 08:57:43 PM
Quote from: brynn on March 26, 2018, 08:53:29 PM
I'm not sure what editor you mean, to turn off?

But if I put it in more than one block, won't it look weird?  There would be a gap in between the blocks, right?

Yeah, I'm a little nervous messing with the database too.

Brynn, click the Tinyportal tab, then the settings icon with the pen on it. 

You should see a setting, Use the WYSIWYG editor?:  Set it to No. and save.

Then go back to your article and click edit.  Grab the contents and paste it into your block. Save.
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 08:59:34 PM
I never experienced problems after changing the database field to Longtext.
This is also the setting for the article body.

Brynn, if you want to change it. you have to select Structure
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:05:12 PM
Oh ok.  No, I don't have the wysiwyg editor enabled.  It has so many "issues", I decided not to use it

But when I look at the smf_tp_articles database, it does say "longtext" for the body.  So that explains why it works for the article, but not the front page.

I'm almost there, to edit the...table, or I guess that's a row?  I'm just not sure whether I click Change button first, or if I edit first, and click Change to take effect.

Let's see...
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:07:04 PM
I think I got it.  Now I'll try the front page again....
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 09:10:22 PM
and it looks good!
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 09:11:21 PM
Looks good to me too.  ;)
Title: Re: front page questions
Post by: wildenborch on March 26, 2018, 09:16:46 PM
Brynn,

Just to let you know that I have removed your text from my rodebaert site.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:22:24 PM
Ah-HA !!  I got it!

Now the next question is how much more can I add to that page, before I run into the same problem again?  That's the whole reason I wanted to do this now, because I'm just about to start adding more contents.

Oh, that stackoverflow article says up to 4 gb.  So that should be plenty of room.  Right now...well, at least Windows Explorer says it's approx 100 kb.  So I think I'll be ok.

Thanks for all the hand holding, friends!  Much appreciated!

Oh, well there is one little issue.  Can you notice there's a light blue or bluish-gray border around the page.  That must be a padding value somewhere, right?  I wonder if I could adjust that?

See the screenshot, I circled the area in red, just to be clear what I mean.
Title: Re: front page questions
Post by: tino on March 26, 2018, 09:23:35 PM
Quote from: brynn on March 26, 2018, 09:05:12 PM
Oh ok.  No, I don't have the wysiwyg editor enabled.  It has so many "issues", I decided not to use it

Does that include the new wysiwyg editor in the latest release?
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:26:14 PM
The code in my page says 100% width, so it must be a padding of TP.

tino, I have not tried the wysiwyg editor in probably 4 years.  Have some of the problems been fixed?
Title: Re: front page questions
Post by: lurkalot on March 26, 2018, 09:29:56 PM
Quote from: tino on March 26, 2018, 09:23:35 PM
Quote from: brynn on March 26, 2018, 09:05:12 PM
Oh ok.  No, I don't have the wysiwyg editor enabled.  It has so many "issues", I decided not to use it

Does that include the new wysiwyg editor in the latest release?

Brynn is unfortunately running a few versions behind, still using TP 1.2 So I guess the answer to that is no.  ;)
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:33:31 PM
Oh wait....you're talking about a wysiwyg editor in TP?  I guess I always thought it was part of SMF.

I found the setting you mentioned, Mick.  So I could use it, I guess.  But only if the problems I had before are fixed.

I know, it's on my mind to update.  I was going to do it with the last SMF upgrade.  But I had so much trouble with it, I just couldn't face it.  But hopefully I'll get over it pretty soon, and I'll upgrade TP soon.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:37:00 PM
But getting back to that padding.....  There's a width setting for the front page panel.  I wonder if adjusting that would help?
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:40:47 PM
No, doesn't seem to have any effect.
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:42:09 PM
That's part of the theme, isn't it?  maybe I could just make it white?
Title: Re: front page questions
Post by: brynn on March 26, 2018, 09:46:39 PM
No, but that wouldn't work with all the themes.  Plus, that padding area isn't showing on all the themes.  It really seems worse only our default.  On the others, you can barely notice it.

I guess I'll just leave well enough alone!!

Thanks again for everyone's help!  You're the best :D