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,970
  • Latest: bynw
Stats
  • Total Posts: 196,047
  • Total Topics: 21,336
  • Online today: 374
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 150
  • Total: 151
  • @rjen

Display webpage in section where forum index usually appears

Started by Inge Jones, April 19, 2012, 12:14:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ZarPrime

This is kind of a confusing topic but let me see if I can shed some light on it.

I just created a TinyPortal php article here on this site.  In addition, I setup two test blocks in the right panel that were already existing and set them to show only on this article.  If you want to see it, click here --> http://www.tinyportal.net/index.php?page=downloads

If you look at it and click on one of the links in it, the link will open on the same article page and to get back to the main article, all you have to do is hit the back button on your browser.

This article uses an iframe to show the content of your html page, which is very wide by the way.  Because it is so wide, I changed the width of the right panel to 150px.  It won't affect anything here since we don't use the right panel on this site.  Therefore, those 2 blocks I setup in the right panel will only show when viewing that article.  I also turned off display of all the other panels for that article.  The code I used in the article is as follows ...

echo '<iframe frameborder=0 scrolling=no width=1000 height=1750 src="http://www.drealm.info/simlogical/sl/Sims2Pages/Sims2.htm" align=top></iframe>';

Inge Jones, is this something like what you are looking for?  Since the content of your html page is so wide, if you don't use a width for your screen resolution of at least 1280px, some of the content will be cut off.  You could always set scrolling for the iframe in the code above to yes if that happens.

ZarPrime

lurkalot

Tis a bit confusing, made worse probably because I turned off my example articles.  :-[

I also played with the iframe idea last night, but couldn't make it fit properly because of the width of page.  It looked bad, so I didn't suggest it. 

Inge Jones

I am surprised the page didn't shrink to fit, as they were designed as tables of 100% rather than fixed size and should be able to shrink quite a lot.  Well they did when I first made them, tested in IE which I haven't used for ages :D

ZarPrime, the appearance matches what I want, but the missing connection here is I don't want that to be a fixed article on the front page, I wanted that to appear in response to clicking an option on my menu block.  So, if user is sitting looking at forum index, then spots the menu on the right and clicks it, suddenly the forum index vanishes and they see my html page (the way you have shown it on your site) instead.  Then, when they are tired of looking at my webpage, they click the menu again for Support, and that webpage is replaced with the forums again, ready for user to post their question.

It looks to me like how you have it is just a fixed article on Front Page.  Usually I have other news and stuff on my Front Page, only want html article to appear in response to menu click.

Edit:  No you're right, those pages are rubbish.  Must have made them before I knew much about web design - they don't resize well at all :(  But anyway in principle I'd still like to get this working, just in case I get round to fixing the table width.

ZarPrime

Inge Jones,

I think you are missing the point.  This article I setup is set to NOT show on the FrontPage, though it could be setup to show there.  It is a TinyPortal article.  Either of these links will get you there ...

Right now, the only blocks that are set to show on that article are the ones in the right panel.  If I had blocks in the Top panel (or bottom, upper, or lower panel) that were to set show on that article they would also show up.  Remember, the only reason I turned off the left panel for that article is that the content of your html page is too wide to show both the left and right panel.

If I setup a link in the TinyPortal menu that I was showing in the right panel, it would open up in the same browser tab, still showing all of the blocks, including the menu

ZarPrime

Inge Jones

So what link should I put in my menu, to make an article like that appear on my site?  I can see the example articles you are giving me links to, but what I haven't seen yet is it popping up after I click a menu option, which was really the root of my initial question.  Not how to make an article that displays a webpage, cos I already have done that for other articles, but how to have the block appear dynamically when a user clicks a menu item.

Ok I see in the links you have things like "page=downloads" or "page=29" so how do I find out what page number will open my article like that?

ZarPrime

In SMF, when you are clicking a link in a Forum topic, like the ones I gave you above, they will open up another browser tab like you saw.  If you setup a link in the menu, it will open up the article in the same browser tab as your forum rather than opening up a second browser tab to display it.  I hope I was being clear on that.

If you have experience setting up an article, you already know that each article has a page #.  The page number on this site for that article is 29.  When you setup the article, you can also add a query title.  In the case of the one that I did, I made the query title "downloads" so that either link works.  Once you know the url of your article, all you have to do is put the url in your menu as a link and when you click it, in the menu, it will open up the article in the same content area as your Forum BoardIndex is normally located in.

Oh, and on your menu block, make sure that the block is set to show on that article.

ZarPrime

Inge Jones

Quote from: ZarPrime on April 20, 2012, 05:16:34 PM
If you have experience setting up an article, you already know that each article has a page #

Nope, never seen any page numbers.  Just taken another look and I can't spot them anywhere lol

ZarPrime

Just setup a test article on your site.  After you have saved it, click "Preview" and it will show you the url.

ZarPrime

ZarPrime

Actually, when you click "Preview", it would show you something like http://www.tinyportal.net/index.php?page=29;tpreview

Just drop off the ";tpreview" at the end and you'll have the url.

ZarPrime

Inge Jones

YAY!!!! That was the bit I was missing all the time - how to reference an article directly.  I never bothered to use preview, you see.  Always checked the articles live.  Ok I now have my test article popping up on demand.  Thank you all for your patience :)

Ok I just want to make a final tweak but not sure if it's possible.   The article appears to pop up surrounded by the panels I have enabled on my front page.   However, in the forum I only use the righthand panel in order to allow more space for the main display.   I would really have preferred the article (ie my downloads website) to only have that right hand panel also.  I guess this is a requirement too far?

Edit:  I managed the latter by setting the individual blocks to only appear in Front Page context.  A bit more work than just having the panel not appear but has the same end result

This website is proudly hosted on Crocweb Cloud Website Hosting.