Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
Re:[SOLVED] FB redirects to the wrong profile with (1 viewing) (1) Guest
Go to bottom Favoured: 7
TOPIC: Re:[SOLVED] FB redirects to the wrong profile with
#49513
[SOLVED] FB redirects to the wrong profile with CB 6 Months, 4 Weeks ago  
I searched for a while but only found people asking about this and no definitive answer so I am posting my solution here.

The Issue:
I am using Community Builder to manage registration and profiles.
When clicking the `subscribe to thread` or `add to favourites` button Fireboard redirects to the Fireboard profile and NOT the Community builder profile. This is incorrect.
All Fireboard options relating to CB have been set to use the CB profile.

Versions:
Joomla 1.0.15
CB 1.1
Fireboard 1.4
I also used an update to the simpleboard (also FB ) plugin for CB found here.
This shows both subscriptions and favorites correctly (the default install of CB didn't seem to provide favorites list)

My fix:
I have only tested this with the default template but I assume it is just as easy for the others...

In file `components/com_fireboard/template/default/post.php` around line 1094 find the following code:
Code:


<script language = "javascript">
       setTimeout("location='<?phpecho sefRelToAbs(JB_LIVEURLREL.'&func=userprofile&do=show');?>'", 3500);
</script>



replace it with the following:

Code:


<script language = "javascript">
        setTimeout("location='<?php
  echo $fbConfig['cb_profile'] ? sefRelToAbs('index.php?option=com_comprofiler&Itemid=' . $cbitemid . '&tab=getforumtab') : sefRelToAbs(JB_LIVEURLREL . '&func=myprofile&do=show');
       ?>'", 3500);
</script>



You will need to replace the same bit of code about 20 lines later.

This should now redirect users to the correct profile page.


If there are any problems with this fix please feel free to correct them.
Hope this helps someone!

Regards,

omin
omin (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/05/15 18:38 By omin.
 
The administrator has disabled public write access.  
#49529
Re:FB redirects to the wrong profile when using CB 6 Months, 4 Weeks ago  
Excellent Omin - thanks for the post I am sure many will be able to use this. Might be a good idea to add [SOLVED] in front of your thread title so others see it is solution rather than a problem

Cheers

Greg
gwmbox (User)
:) I like Smilies :)
Junior Boarder
Posts: 78
graphgraph
User Offline Click here to see the profile of this user
Gender: Male dogsites dogsites@hotmail.com Location: Perth Western Australia
Logged Logged
 
-------------------------------------
Computer Nut and Web Designer
 
The administrator has disabled public write access.  
#49542
Re:FB redirects to the wrong profile when using CB 6 Months, 4 Weeks ago  
Hmm Ill try this out. Iv posted on this subject before as well.
Andy (User)
Junior Boarder
Posts: 59
graphgraph
User Offline Click here to see the profile of this user
Gender: Male JoomlaPlazza Location: SCOTLAND
Logged Logged
 
joomlaplazza.comSocial Networking Resource center
 
The administrator has disabled public write access.  
#49544
Re:FB redirects to the wrong profile when using CB 6 Months, 4 Weeks ago  
No problem gwmbox.

I didn't put [SOLVED] in front of the title because I thought other people might want to check it first (and it would not fit!). In fact I have just spotted a mistake myself and corrected it (&amp; when should have just been & ).

I have also worked out another solution which some people may prefer.
Instead of redirecting to the CB profile you could redirect back to the specific thread. To do this replace the original code with the following:

Code:

<script language = "javascript">  setTimeout("location='<?php echo sefRelToAbs(JB_LIVEURLREL."&func=view&catid=$catid&id=$id");?>'", 3500); </script>



As a first time user of Fireboard (and Joomla in general) I must say how much fun it has been exploring the possibilities.

I was looking for a nice, lightweight forum solution and Fireboard seems to fit very nicely (with some hacks).

Now I just have to find a fix for unsubscribing and unfavoriting - this still sends you to the FB profile as an interim during the redirect.
omin (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/04/27 18:36 By omin.
 
The administrator has disabled public write access.  
#49619
Re:FB redirects to the wrong profile when using CB 6 Months, 4 Weeks ago  
ok - so after some more searching I have found a fix for unsubscribing and unfavoriting when using CB. At the moment when clicking unsubscribe from a thread the user is sent to a page that shows part of the FB profile then redirects. This is incorrect as when you are using the CB profiles you should never see the FB profile.

This fix will direct the unsubscribe and unfavorite requests to the CB profile.
This fix also works with the FB setting to use the CB profile or not so these changes (and the ones in the original post) can be made by anyone even if they are not using CB.


Unsubscribing
In file `components/com_fireboard/template/default/view.php` around line 340 find the following code:
Code:

<a href = "<?php echo sefRelToAbs(JB_LIVEURLREL.'&amp;func=myprofile&amp;do=unsubscribeitem&amp;thread='.$thread);?>">


replace it with the following:

Code:

<a href = "<?php echo $fbConfig['cb_profile'] ? sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&Itemid=' . $cbitemid . '&tab=getforumtab&fbunsubthread='.$thread) : sefRelToAbs(JB_LIVEURLREL . '&amp;func=myprofile&amp;do=unsubscribeitem&amp;thread='.$thread);?>">


In the same file around line 1381 make the same replacement of code.

Unfavoriting:

In file `components/com_fireboard/template/default/view.php` around line 375 find the following code:
Code:

<a href = "<?php echo sefRelToAbs(JB_LIVEURLREL.'&amp;func=myprofile&amp;do=unfavoriteitem&amp;thread='.$thread);?>">


replace it with the following:

Code:

<a href = "<?php echo $fbConfig['cb_profile'] ? sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&Itemid=' . $cbitemid . '&tab=getforumtab&fbunfavthread='.$thread) : sefRelToAbs(JB_LIVEURLREL.'&amp;func=myprofile&amp;do=unfavoriteitem&amp;thread='.$thread);?>">


In the same file around line 1461 find the following bit of code:

Code:

<a href = "<?php echo sefRelToAbs(JB_LIVEURLREL.'&amp;func=myprofile&amp;do=unfavoriteitem&amp;thread='.$fb_thread);?>">


replace it with the following:

Code:

<a href = "<?php echo $fbConfig['cb_profile'] ? sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&Itemid=' . $cbitemid . '&tab=getforumtab&fbunfavthread='.$fb_thread) : sefRelToAbs(JB_LIVEURLREL.'&amp;func=myprofile&amp;do=unfavoriteitem&amp;thread='.$fb_thread);?>">


That should sort out that problem. Any feedback is appreciated.

omin
omin (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/04/29 08:43 By omin. Reason: changed post.php to view.php
 
The administrator has disabled public write access.  
#49620
Re:FB redirects to the wrong profile when using CB 6 Months, 4 Weeks ago  
As an aside it seems that when I use the code funcion on these boards all line breaks after the code just disappear. Ugh!
Is there any way to fix this as it just realy messes with the formatting.

Check it out:

Code:

Some code.


This sentance should be on a new line all by its own.
This sentance should be on a new line all by its own.
This sentance should be on a new line all by its own.

This sentance should be on a new line all by its own.



This sentance should be on a new line all by its own.
omin (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#49631
Re:FB redirects to the wrong profile when using CB 6 Months, 3 Weeks ago  
Are you sure your last post is correct I cant find the code at line 340 or line 1381!
Andy (User)
Junior Boarder
Posts: 59
graphgraph
User Offline Click here to see the profile of this user
Gender: Male JoomlaPlazza Location: SCOTLAND
Logged Logged
 
joomlaplazza.comSocial Networking Resource center
 
The administrator has disabled public write access.  
#49632
Re:FB redirects to the wrong profile when using CB 6 Months, 3 Weeks ago  
infact I cant find any of it are you sure its the correct file your telling us to open?
Andy (User)
Junior Boarder
Posts: 59
graphgraph
User Offline Click here to see the profile of this user
Gender: Male JoomlaPlazza Location: SCOTLAND
Logged Logged
 
joomlaplazza.comSocial Networking Resource center
 
The administrator has disabled public write access.  
#49634
Re:FB redirects to the wrong profile when using CB 6 Months, 3 Weeks ago  
Andy wrote:
infact I cant find any of it are you sure its the correct file your telling us to open?

Instead of

Code:

<script language = "javascript"> 
       setTimeout("location='<?phpecho sefRelToAbs(JB_LIVEURLREL.'&func=userprofile&do=show');?>'", 3500); 
</script>



try this


Code:

<script language = "javascript"> 
      setTimeout("location='<?php echo sefRelToAbs(JB_LIVEURLREL.'&func=userprofile&do=show'); ?>'", 3500); 
</script>



Arcanjo
Arcanjo (User)
Senior Boarder
Posts: 119
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Oficina dos Animais Location: Portugal Birthdate: 1973-08-11
Logged Logged
 
The administrator has disabled public write access.  
#49635
Re:FB redirects to the wrong profile when using CB 6 Months, 3 Weeks ago  
Hi again

tho other code that you dont find is in view.php (is the only file that as that)

Arcanjo
Arcanjo (User)
Senior Boarder
Posts: 119
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Oficina dos Animais Location: Portugal Birthdate: 1973-08-11
Logged Logged
 
The administrator has disabled public write access.  
Go to top