Archive for myfreeforum.org Before posting please check the "stickies" in the support forums. Please ask questions in real English and not "txt". You will get a better response. Please do not ask support questions via PMs.
|

SpaceInvaderz
|
Comments on ProfilePLEASE ENTER THE FOLLOWING>>>>
Enter your myff forum url here, if the issue is on a particular part of the forum, then give a link to where the problem actually is. Do not enter your own domain name it must be the actual myff link : http://swapitshoplounge.myfreeforum.org
Please indicate keywords you have searched on:
Now ask your question in clear English without "txt" speak>>>>
Hello, is there a way that the comments portal can be incorporated into the profile pages, like facebook or whatever, with a box that can add a comment to whoever's user page it is?
Thanks
|
while()
|
Not sure if you can do it properly, but you could just use an iframe with:
http://swapitshoplounge.myfreefor...id=[USERID]&component=COMMENT
where [USERID] = their user ID.
|
SpaceInvaderz
|
Yeah, that's a good idea, although a proper solution would be awesome
|
Nick(NR)
|
This yes? http://portalogy.myfastforum.org/profile.php?mode=viewprofile&u=2
|
while()
|
I see nothing to do with comments there, do you have a guest viewable link?
|
SpaceInvaderz
|
yesyesyes.
And I could iframe the add comment bit I suppose
|
Nick(NR)
|
| SpaceInvaderz wrote: |
yesyesyes.
And I could iframe the add comment bit I suppose  |
wasn't the easiet of tweaking, give me a chance to knock up something understandable
|
Nick(NR)
|
Right here goes, this addition is a version of Iframe SSI script found on dynamicdrive that has been modified to work with comments and the add comment components.
:NOTE:
extra styling to the comments and add comments components may be required
Open your overall_header.tpl:
and add the below between the <head> tags:
| Code: | <script type="text/javascript">
/***********************************************
* IFrame SSI script- © Dynamic Drive DHTML code library
* 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.
var iframeids=["myframe","myframes"]
//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 dyniframesize() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById){ //begin resizing iframe procedure
dyniframe[dyniframe.length] = document.getElementById(iframeids[i]);
if (dyniframe[i] && !window.opera){
dyniframe[i].style.display="block"
if (dyniframe[i].contentDocument && dyniframe[i].contentDocument.body.offsetHeight) //ns6 syntax
dyniframe[i].height = dyniframe[i].contentDocument.body.offsetHeight+FFextraHeight;
else if (dyniframe[i].Document && dyniframe[i].Document.body.scrollHeight) //ie5+ syntax
dyniframe[i].height = dyniframe[i].Document.body.scrollHeight;
}
}
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
if (window.addEventListener)
window.addEventListener("load", dyniframesize, false)
else if (window.attachEvent)
window.attachEvent("onload", dyniframesize)
else
window.onload=dyniframesize
</script> |
now click save and exit, and now select profile_view_body.tpl
and add the below where you want it to appear, keeping it between a <td> and a </td>:
| Code: | <iframe id="myframe" src="/showcomment.php?userid={USER_ID}&component=COMMENT" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe><br />
<iframe id="myframes" src="/addcomment.php?userid={USER_ID}&component=COMMENT" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe> |
now click save and exit, and now fview a profile, you should now see the cooments the user has, but also while logged in the ability to add a comment, the way add comment has been made it isn't visible unless logged in, so you wont get spamming in members comments
If you get stuck, don't hesitate to shout, but please provide a link to a profile so we can see and also which bit of the above lost you.
|
admin (no pm's please)
|
Very nice
|
|
|
|