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: 425
  • Total: 425

[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

Scratching my head on that...

I only changed this:
if (mysql_error() == 1060){

to this:
if (mysql_errno() == 1060){

It was part of the CustomPageModifyTable() function and was an added check in case you had the table but no entries yet.  It would have actually failed had there been no data because mysql_error() returns a text error message, where mysql_errno() returns an error number (integer) which is what I'm doing a compare against (1060).

There shouldn't be any way for it to produce what you got from that change.  Hmm.. maybe try copy/paste again in case of missing something... I repasted into original post... try copy/paste again to your block

RoarinRow

Quote from: Thurnok on September 18, 2006, 08:59:48 AM
Scratching my head on that...

I only changed this:
if (mysql_error() == 1060){

to this:
if (mysql_errno() == 1060){

It was part of the CustomPageModifyTable() function and was an added check in case you had the table but no entries yet.  It would have actually failed had there been no data because mysql_error() returns a text error message, where mysql_errno() returns an error number (integer) which is what I'm doing a compare against (1060).

There shouldn't be any way for it to produce what you got from that change.  Hmm.. maybe try copy/paste again in case of missing something... I repasted into original post... try copy/paste again to your block

Very strange.  Is there anything I could check in that table?

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Thurnok

Hmm.. well, you already had the table updated I'm assuming, because you had the previous version with Javascript in it.  So, you really shouldn't even be hitting that function because it should already detect your table has the appropriate columns.  Unless you manually changed your table.

You can verify that by finding that portion of the code in the block and put this right above it temporarily:
echo 'TESTING<br />';

Then see if you see TESTING in your block after you refresh the page.  You should not see it at all.  That will tell you that you never even get to that part.

Not really sure what the error you got means.  Set me up a temp account if you like so I can check it direct on your site.  I put the new code in 3 of my test sites and seems to work properly.  I'll check again when I get home from work today.

RoarinRow

Thanks, I PM'd you the info.   :up:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Thurnok

LOL.. ok, I really don't know how that happened - other than I am still on drugs and it was quite late when I updated it - but somehow old --old-- test code got put in there and I even updated that old test code with the single fix I mentioned above.  LOL

Ok.. I have replaced it with the code from the correct file this time.   :2funny:

RoarinRow

Quote from: Thurnok on September 19, 2006, 06:12:13 AM
LOL.. ok, I really don't know how that happened - other than I am still on drugs and it was quite late when I updated it - but somehow old --old-- test code got put in there and I even updated that old test code with the single fix I mentioned above.  LOL

Ok.. I have replaced it with the code from the correct file this time.   :2funny:

Awesome that did it!   :D   Thank you!

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Thurnok

If you want to try this TP Block out, without having to install it to your own site, go check it out at my TP Blocks site: http://tpblocks.ccs-net.com

Some things you can see as a guest, some you need to register on the site to see in action.  Also, if you register on the site you will be able to access some of the Blocks in both a "user" mode and an "admin" mode so you can see both perspectives.

Ken.

I had made a post previously at this link posing a question on how to take parts of two different code snippets and make them into one new one. The post didnââ,¬â,,¢t get very much traffic and in retrospect I do realize that the question should have been in this thread from the beginning.

My apologies for double posting, please delete the other topic if it poses a problemââ,¬Â¦ and, sorry for being so long winded in the question.

So, the question:
Iââ,¬â,,¢m using this Custom Page code by Thurnok on both of my forums and think that itââ,¬â,,¢s greatââ,¬Â¦ and it seems to be off to a good start as some of my members are starting to implement their own pages, all of them MySpace pages so far.
There is only one single issue that I have with the code and thatââ,¬â,,¢s the vertical/height scroll bars that occur when the page goes beyond the value that youââ,¬â,,¢ve set for it.
Thurnok mentioned in reply #9 of this thread that you basically are not able to do an auto-resize on the pages that are pulled into the iframe (if Iââ,¬â,,¢m reading his post correctly), but thatââ,¬â,,¢s  what I want to doââ,¬Â¦ almost. :)

What I actually want to do is auto-resize the frame itself.
The code posted here by G6 auto-resizes the iframe to fit the content being pulled in and it works just as expected, she posted it as a solution for getting cpg to fit the iframe window correctly, but I use it for lots of articles pulling in other pages that are on my regular website and based on HTML and it works great on all of them.
Iââ,¬â,,¢m trying to combine the iframe resize feature from the code by G6 into the Custom Page code by Thurnok, but my coding skills are falling a little shortââ,¬Â¦ can anyone take a look to see how it can be written in?
Thanksââ,¬Â¦ Ken

Ps: If you wish to see the iframe resize in action go to My Gallery and open the album "Jake's Pics", that album only has one photo and you will see the iframe follows the size of the inserted page very well.
And, here's an HTML page from my regular site with a series of 4 pages that can be pulled in: Jason & Mary

" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Thurnok

Sorry... guess I missed your original post.  I'll take a look into this as soon as I can though.

Ken.

Thanks Thurnok!
The code here on TP seems to get better and better all the while! ;D


Of course it helps that I'll actually begining to understand a little of it.  ;)
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

This website is proudly hosted on Crocweb Cloud Website Hosting.