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

Recent

Welcome to TinyPortal. Please login or sign up.

May 01, 2024, 11:07:28 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,175
  • Total Topics: 21,220
  • Online today: 177
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 163
  • Total: 163

How to create a frontpage that is only seen when outside link is clicked

Started by Replayuk, June 05, 2020, 11:50:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Replayuk

What we are after doing is when the outside link is clicked, it opened up say a block that has the html code inside it, and will only be displayed when the link is clicked, is this possible to do with tinyportal.


Cheers

lurkalot

You could use a Html article perhaps.

What would you want to display in that bock exactly?

Replayuk

We are adding a Html basic news screen so from the main frontpage when the news link is clicked it opens up a new screen with new to whats coming soon to the board screen.

So yes a basic Html screen would be great, So i would create a block for front page and add the html code into that and make it so its not an active block, so when the link is clicked it jumps to the block and displays the screen, that would work i guess.

Cheers

lurkalot

When you say screen, I'm assuming you mean page. 

Therefore yes creating an article and linking to it from Home page or main menu will do that job nicely.  Depending what sort of content you want to put in the news page would determine if you need to create a html article, or a bbc article.

Replayuk

 :hmm:  I`ve just tried creating an artical and in the +html i`ve added my html code and it only seems to like text, it will not execute normal HTML code it will only display its content, and not run the code i`ve put in the box.   :hmm: :hmm:

lurkalot

Quote from: Replayuk on June 06, 2020, 06:35:55 PM
:hmm:  I`ve just tried creating an artical and in the +html i`ve added my html code and it only seems to like text, it will not execute normal HTML code it will only display its content, and not run the code i`ve put in the box.   :hmm: :hmm:

So what are you trying to run in the html article?

Replayuk

This code so i can link it from the home page and display as a normal page.

Replayuk

If you run the code in a normal Html editor it displays just fine, When you try to run the code in the artical page it just shows the text.

lurkalot

Quote from: Replayuk on June 06, 2020, 06:46:41 PM
If you run the code in a normal Html editor it displays just fine, When you try to run the code in the artical page it just shows the text.

Did you create a HTML type article?

Give me a sample of the code so we can try it.  Please place it between code tags, and if it's private stuff do the same via PM

Replayuk


lurkalot

Quote from: Replayuk on June 06, 2020, 07:01:47 PM
I did make it the HTML artical but it displayed this.

All I can see is part of the css code.  reply and paste the whole code between code tags, [code] Your code here [/code]

Replayuk

Quote from: Replayuk on June 06, 2020, 07:01:47 PM
I did make it the HTML artical but it displayed this.

But shouldn`t that be running the code and not displaying it Lurk, This is what i cannot understand!

lurkalot

Quote from: Replayuk on June 07, 2020, 07:48:30 AM
Quote from: Replayuk on June 06, 2020, 07:01:47 PM
I did make it the HTML artical but it displayed this.

But shouldn`t that be running the code and not displaying it Lurk, This is what i cannot understand!

Edit:  Are you sure that's a html type article?

Replayuk

yes and for some reason it just throws back a page of code and not running it to display the content, thats what confuses me tbh.

I create an artical then goto the html and dump the code and it displays it then i try view it and it just shows the code again, So atm its got me confused to why thats happening.

All i`m after doing is making the news page in there, so i can link it to the frontpage and thats it really. Dont know whats making it not work because it looks so simple to do tbh.

Thankyou Lurk for taking time to help out

@rjen

Lurkalot asked you two times already to provide the full html code here in [code ] [/ code] tags: you did not do that !

Please answer the question asked so we can help you...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Quote from: @rjen on June 07, 2020, 08:25:06 AM
Lurkalot asked you two times already to provide the full html code here in [code ] [/ code] tags: you did not do that !

Please answer the question asked so we can help you...

I did indeed.  It always helps us to help you, when we know exactly what's being entered into blocks or article when problems arise. Hence why we ask for such. 

Though I suspect the reason for the code displaying is down to the WYSIWYG editor being turned on for articles, and not hitting the view source button in the editor before pasting in code.  Personally I would turn the editor off in article settings.


Replayuk

This in interesting now its running the code but doing this, see what you make of this, but we are starting to get there now  :)

I`ve put whats happening in the attachment below.

lurkalot

Quote from: Replayuk on June 07, 2020, 09:26:40 AM
This in interesting now its running the code but doing this, see what you make of this, but we are starting to get there now  :)

I`ve put whats happening in the attachment below.

So it was the WYSIWYG editor as I suspected.

The various problems you're seeing now are  probably because the css you're using are overriding the css for the main site.  You will need to rewrite the code so it doesn't do that.  I'm no css expert, but that looks like what's happening to me.  ;)

Replayuk

Well now i can work on that cheers Lurk, I`ll wite a much cleaner set of code to see what happens next.

Cheers

Replayuk

Boom got it working took a little to understand it was the editor that was conflicting but we got there Lurk Cheers, attachment below showing it working now.


lurkalot

Quote from: Replayuk on June 07, 2020, 09:51:48 AM
Boom got it working took a little to understand it was the editor that was conflicting but we got there Lurk Cheers, attachment below showing it working now.

Not so much the editor conflicting, because it's doing what it should.  The WYSIWYG editor is designed to build the article from scratch actually seeing what's happening as you go.  To dump raw html in there you needed to click the View Source button first. 

I've always turned the editor off for my own use, simply because I find it easier, and no chance of the editor changing stuff you don't want it to.  It's a personal preference, hence being able to turn it off/on.

Anyway, glad you're getting there with it.  ;)

Replayuk

Ok that page is up and running now, so two questions Lurk.

1, can i make it so guess`s can see that artical, If so how do i make that happen.
2,at the top of the artical you can see some kinda block saying print and edite, Is it possible to remove them and if so how would i go about that.

Cheers Lurk massive help you`ve been, Thankyou

lurkalot

Quote from: Replayuk on June 07, 2020, 11:13:44 AM
Ok that page is up and running now, so two questions Lurk.

1, can i make it so guess`s can see that artical, If so how do i make that happen.
2,at the top of the artical you can see some kinda block saying print and edite, Is it possible to remove them and if so how would i go about that.

Cheers Lurk massive help you`ve been, Thankyou

Print link can be removed in article settings.  TinyPortal Admin > Article settings (the icon with a Pen on it) Uncheck the box next to "Display print link in articles?" and click save.

The other display options can be found when you edit that article, if you scroll down you'll see them.

If you haven't already done so, I would create a category for such pages, such as Site Pages, and move it into that category by using the category dropdown while editing that article. Edit: forgot the important bit. Viewable by guests. :doh:  In categories, make sure the category the article is in has the "Membergroups that can see this category" set to what you need.

Make sure article is approved, and active.  Again you'll see those settings when you scroll down below the editor.

lurkalot

In addition to the my last post, might be an idea to check out the docs site, regarding articles, there's stuff there which will be helpful to you, https://www.tinyportal.net/docs/index.php?cat=Articles

Replayuk