MisterWebNet

<<< Coding for the future >>>

Home Coding PHP  problem on Kunena forum tab on cb profile
 problem on Kunena forum tab on cb profile PDF Print E-mail
Written by Administrator   
Tuesday, 23 February 2010 14:16

Came across this error after publishing the Kunena forum plugin for Community Builder(CB) in Joomla. When you clicked the forum tab on the CB profile page, and tried to unsubscribe from forum threads, I got a  appearing at the top of the page and nothing else.

 

If you are looking at your error logs, the error might show up as

PHP Catchable fatal error:  Object of class stdClass could not be converted to string in /home/www/**YOUR SITE PATH**/components/com_comprofiler/plugin/user/plug_cbsimpleboardtab/cb.simpleboardtab.model.php on line 189

 

The Solution is HERE at Joomlapolis. It worked for me, but obviously I don't want to take credit for it Tongue out You need to open the file:

YOURWEBSITE.COM/components/com_comprofiler/plugin/user/plug_cbsimpleboardtab/cb.simpleboardtab.model.php

 

Then find the functions unction _unsubAll and function _unsubThread (maybe only one of yours is bust, who knows.).

 

Replace those functions (After backing up of course!) with the following:

function _unsubAll( $user, $forum ) {
global $_CB_database;

$query                                                =    'DELETE FROM '    . $_CB_database->NameQuote( '#__' . $forum->prefix . '_subscriptions' )

.    "\n WHERE "        . $_CB_database->NameQuote( 'userid' )    . " = " . (int) $user->id
;
$_CB_database->setQuery( $query );
if ( ! $_CB_database->query() ) {
trigger_error( 'CBForum-unsubAll SQL error' . $_CB_database->stderr( true ), E_USER_WARNING );
}
}

 

function _unsubThread( $user, $thread, $forum ) {
global $_CB_database;

$query                                                =    'DELETE FROM '    . $_CB_database->NameQuote( '#__' . $forum->prefix . '_subscriptions' )

.    "\n WHERE "        . $_CB_database->NameQuote( 'userid' )    . " = " . (int) $user->id
.    "\n AND "        . $_CB_database->NameQuote( 'thread' )    . " = " . (int) $thread
;
$_CB_database->setQuery( $query );
if ( ! $_CB_database->query() ) {
trigger_error( 'CBForum-unsubThread SQL error' . $_CB_database->stderr( true ), E_USER_WARNING );
}
}

 

 

It should solve your problems.

Last Updated on Tuesday, 23 February 2010 14:26
 

Add comment

We reserve the right to remove comments without notice. Users are responsible for their own comments and the contents contained within.


Security code
Refresh

ThugVillage.com
Mens Entertainment Magazine with girls, gadgets, indepth analysis, videos and much more
Best Flash Games
The best flash games on the net - 100% free!
HiredMedia
Off beat, deep-web, alternative videos