PDA

View Full Version : iframe in post reply.



Joe
Wed 12th Jul '00, 9:35pm
Heres a tip, i have had a few users beg me to put back the inline frame of the post when you post a reply, this was a spiffy little feature in the UBB.

It takes about 20 sec to do, but i think it adds a whole lot to the forums.

in the template <b>newreply</b> goto the bottom and find:
<TABLE cellpadding=4 border=0 cellspacing=1 WIDTH="100%">
<TR bgcolor="#113274"><TD COLSPAN=2 align="center">
<FONT SIZE="2" FACE="arial, helvetica" COLOR="#FFFFFF"><b>Topic Review (Newest First)</b></font>
</td></tr>

$threadreviewbits

</table>

replace this with:
<IFRAME FRAMEBORDER=1 ALIGN=CENTER width=100% HEIGHT=200 SCROLLING=YES SRC="showthread.php?threadid=$threadid">
<TABLE cellpadding=4 border=0 cellspacing=1 WIDTH="100%">
<TR bgcolor="#113274"><TD COLSPAN=2 align="center">
<FONT SIZE="2" FACE="arial, helvetica" COLOR="#FFFFFF"><b>Topic Review (Newest First)</b></font>
</td></tr>

$threadreviewbits

</table>
</IFRAME>

This will replace the standard threadview section with a copy of the actual html page in a little frame about 200 pixles high for IE users, netscape users cant see iframe tags, so they will see the old setup, with the text from the posts in reverse order (how its set up now).

The only bug i have found, is if you have HTML on, and a user puts an iframe in one of there posts, when sombody posts a reply, there will be two iframes at the bottom of the page, i guess you cant have an iframe in an iframe? anyone know how to fix this?

rjav8r
Thu 13th Jul '00, 12:28am
Thanks!!!

Freddie Bingham
Thu 13th Jul '00, 1:36am
Anyway to have the iframe expand to fit the page it is showing? If you don't supply a "height" tag would it accomplish this?

Joe
Thu 13th Jul '00, 1:53am
rjav8r:
No problem :D

Rangersfan:
If you dont set the height, i believe it defaults to 150 or so. you can set the height to 100%, but that only sets the frame to 100% of the viewing window. Im not sure it offers what you want. But i'll keep looking.

Everyone Else:
You can also link to: "showthread.php?threadid=$threadid#newpost"
This will bring up the new post in the iframe, so the user dosent need to scroll to the post in the iframe. Just an idea.

doron
Thu 13th Jul '00, 5:44am
iframe within a ifram should be possible, but ie does not allow that. netscape 6 does ;)

nuno
Fri 4th Jan '02, 11:49pm
heh :p
sorry to dig up this thread from the grave :eek:
tx Joe :)

Joe
Sat 5th Jan '02, 12:02am
It may take some chainging, this was for 1.13 :D