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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 423
  • Total: 423

[Block] Custom Page

Started by Thurnok, August 09, 2006, 08:13:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thurnok

Some sites were not interpreting relative url ($myself) properly, so modified it for full url by added $boardurl info.  Code updated in original post.

Avinash

It seems like Internet Explorer doest like the code. The page becomes stretched horizontally, and IE says "done loading with errors" at the bottom. :(

Thurnok

#12
hmm.. I tested in IE, Mozilla, Firefox.  Seems to work ok here.  Are you putting into a center block or an article?

Try changing the default width of the IFrame to something smaller.  Remember that static webpages larger in width than your IFrame will cause a scrollbar at the bottom and you won't see the whole width of the page without scrolling back and forth.  Also if you have the IFrame width set larger than your block/article's width it will stretch the block/article to fit.

The IFrame's width is set by changing the $cp_width variable.  I changed the default in the code to '100%' last time which should simply fill in the block it is contained within.  You can set it to a static number like 600 for example which would set it to 600 pixels. 

Avinash

That's weird, all I did, was copy your default code into a php centre block and run it. I didn't modify anything. I will attach the screenshot to show what the problem in IE is. In addition, type my own URL into the box and hit 'Add' i get this error:

Not Found
The requested URL /smf/smf/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

There should be some place in the code to get rid of the extra /smf/ but I don't see it after searching for smf in notepad.

Thurnok

You might want to try copying the code again.  I'm not sure why you are getting the error.  Here's screenshots of IE and Mozilla both going to SMF directly and then within a custom page block (in an Article):


Thurnok

I did find one unusual occurance with the Add / Edit button.  I left out the closing button tag (</button>) which only seemed to display an issue in IE and only when in a Center block, not an Article.  It elongated the button.  No errors however, and the page still displayed.  I fixed that in the code now however for consistency sake.

RoarinRow

Quote from: Thurnok on August 21, 2006, 05:55:41 AM
I did find one unusual occurance with the Add / Edit button.  I left out the closing button tag (</button>) which only seemed to display an issue in IE and only when in a Center block, not an Article.  It elongated the button.  No errors however, and the page still displayed.  I fixed that in the code now however for consistency sake.

Very cool mod for sure.  I tried to use the code on a Frontpage Block and Article and the Add button didn't do anything.  I'm on IE6.  In a Center Block the Add button was elongated for some reason. 

I'll try again on my other test site. . .

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Thurnok

#17
Yep... the elongation was definately caused by the lack of the button closing tag.  Copy the code again from first post and it should be fixed.

When you say the Add button didn't do anything, do you mean you did not get the page displayed that you put into the My Page: editbox?

RoarinRow

#18
Quote from: Thurnok on August 21, 2006, 06:22:54 AM
Yep... the elongation was definately caused by the lack of the button closing tag.  Copy the code again from first post and it should be fixed.

When you say the Add button didn't do anything, do you mean you did not get the page displayed that you put into the My Page: editbox?

Correct, nothing happened when I click on 'Add', no other page appeared or no IE error message.   :o

You can see it on my test site - http://www.avalanchestyle-test.com/forum/index.php

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Thurnok

Ok... I found the problem.  This is what we call, fixing one problem and creating another ;)

When I modified for backward compatibility regarding HTTP REFERER I created the issue where if you put the code in an article that was not shown on the frontpage, you could not add a custom page because it reloaded index.php without your article showing (in otherwords, no page=<pagenum>).   So your non-frontpage article wasn't reloaded and hence the code to ADD was never executed.  heh

Ok, code updated.. give it a shot now.  :)

This website is proudly hosted on Crocweb Cloud Website Hosting.