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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,003
  • Total Topics: 21,330
  • Online today: 187
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 126
  • Total: 126

Integrating WordPress!

Started by gdblaster, October 13, 2006, 05:41:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gdblaster

i wanted a blog on my forum for the staff and i installed WordPress (in a different folder) and i want to include it to my forum as an action (index.php?action=blog - something like this) so i installed "Custom Action Mod" for SMF. i want to know what i code i have to add so the main page of Word Press cand be displayed inside my forum! i have a code with the "width" parameter equal to 100% but i want also for "height" parameter (which now is 1000px) to be 100%. can you help me with the code?

the code that i have now!
global $boardurl;
echo '
<iframe frameborder="0" height="1000" src="', $boardurl, '/blog/index.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="yes" border="0" allowtransparency="true"></iframe>';


thanks in advance!

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



akulion

use this code


<script type="text/javascript">

/***********************************************
* IFrame SSI script II- Ã,© Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids)
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids)
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>

<iframe id="myframe" src="YOUR ADDRESS HERE" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="width: 100%; display: none;" frameborder="0" scrolling="no"></iframe>


instead of YOUR ADDRESS HERE in the code above (near bottom) put the address of your word press

Put that code in a normal article :up: no other changes needed

Crip

can you still navigate via WP comments, make post and stuff?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Crip

I'm trying this out.. if it don't work your mine bigguy. :D
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



akulion

lol i havent user word press ever

is it good?

does it allow ALL users to have their own blogs?

it it intgratable with SMF userbase? :D

Lesmond


akulion

thanks :up:

i think the BEST solution for user blogs ive seen so far are the mkpotal blogs - even customizable themes per user available - pretty cool

i still have them on my site :)

Crip

I guess I will keep my WP blog as a stand alone, I've been using two years now -- all I can do on TP is fetch .rss feed on comments or entries ----
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



This website is proudly hosted on Crocweb Cloud Website Hosting.