Ok so this is the second time im writing this little bit seeing as there was some issues posting it...?
Using CB on my site i dont want users to ever really see that there is a FB profile page as well as a CB page... so this fixes some of the things mentioned in this thread, but honestly there are probably more cases where this could be an issue.. the templates really need an overhauling.. The modifications I made however are designed to still be usable if you dont use CB integration. ie. if you use CB, then the FB user profile page will be hidden, but if you dont use CB, then it will be displayed. That way, i hope at least, that these changes can be used in the default templates..
I describe the changes i have made below but i have also attached the files in a zip file so all you have to do is replace the myprofile.php file and the post.php file mentioned about in this post and you have all the mods
The only thing i havent looked at is the unsubscribe from all/remove all favourites options from the CB profile tab,its late and im tired so im going to bed.. hope you guys enjoy this and that it works for you ..
on a side note.. i do find it odd that there is so much code in the templates.. must make templating a real bother..
=====================================
The issues fixed here are with Fireboard 1.0.4's integration with CB. There are 3 different things that I have changed.
-----------------------------------------
PART 1
The user is not returned to their CB profile after removing a favourite or a subscription from their CB profile tab.
To fix this, in the templatedefaultpluginmyprofilemyprofile.php template file replace line 561 and line 598 which look like
| Code: |
setTimeout("location='index.php?option=com_comprofiler".FB_CB_ITEMID_SUFFIX."&tab=getForumTab'", 3500);
|
with this code instead
| Code: |
setTimeout("location='index.php?option=com_comprofiler<?php echo FB_CB_ITEMID_SUFFIX; ?>&tab=getForumTab'", 3500);
|
-----------------------------------------
PART 2
Also, if you want to have FB use the CB profile, then you dont want the user to see the FB user profile menu options, which displays for 3.5 seconds while it shows the user that they have been unsubscribed/unfavourited from a thread. To fix this, make the following modifications to templatedefaultpluginmyprofilemyprofile.php.
First lets remove the left user panel on the fireboard user profile if the user has enabled CB.
at Line 99 add
| Code: |
<?php if (!$fbConfig['cb_profile']) { ?>
|
so that it looks like
| Code: |
<tr>
<?php if (!$fbConfig['cb_profile']) { ?>
<td class = "fb_myprofile_left" valign = "top" width="20%">
|
and at line 113 add
so that it looks like
| Code: |
<!-- F:My Profile Left --></td>
<?php } ?>
<td class = "fb_myprofile_mid" valign = "top" width="5">
|
Now lets remove the fireboard user profile summary if the user has enbled CB
right after "// B: Summary" (around line 123) add
| Code: |
if (!$fbConfig['cb_profile']) {
|
so that it looks like
| Code: |
// B: Summary
if (!$fbConfig['cb_profile']) {
if (file_exists(JB_ABSTMPLTPATH . '/plugin/myprofile/myprofile_summary.php'))
|
and then right before "// F: Summary" (around line 135) add
| Code: |
else {
echo '<script type="text/javascript">set Timeout("history.go(-1);",3500);</script>';
}
|
so that it looks like
| Code: |
}
else {
echo '<script type="text/javascript">set Timeout("history.go(-1);",3500);</script>';
}
// F: Summary
|
-----------------------------------------
PART 3
To set FB to return to the previous post after adding a favourite/subscription instead of fireboards user profile, make the following changes in templatedefaultpost.php at line 1092 (for subscribe) and shortly after at line 1117 (for favourite)
Replace
| Code: |
?>
<script language = "javascript">
setTimeout("location='<?php echo sefRelToAbs(JB_LIVEURLREL.'&func=userprofile&do=show'); ?>'", 3500);
</script>
<?php
|
with
| Code: |
echo '<script type="text/javascript">setTimeout("history.go(-1);",3500);</script>';
|