×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: CB Comments Tab?

CB Comments Tab? 16 years 6 days ago #1597

  • shane
  • shane's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
I have loaded !JoomlaComments on one of my live sites now that the nesting problem has been resolved (at least for now). Live site is http://philmontforum.com .

Previously, I had mxComment installed as my comment component. The import process from mxComment to !JoomlaComment went perfectly. Thanks!

With mxComment, I had a Community Builder plugin installed that built a profile tab that listed all comments made by the user.

I have been modifying the CB plugin files, and have gotten a little bit of the way there. So far, I have the tab generating with the number of comments made by the user, and the pagination generates and displays (based on the CB plugin settings). Here is a screen shot of what I have so far...



I cannot get a linkable list of comments made to generate.

I have attached a zip file of all of the plugin files to this post. The only files that I have modified so far are cb.mxcommenttabs.php and includes/cb.mxcomment.parser.php.

If any of you guys out there that actually know what you are doing are interested, I'd love to see this plugin work for !JoomlaComments.

Thanks! cb_comment_plugin.zip

CB Comments Tab? 16 years 6 days ago #1599

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
From your screenshot I see that you are not generating a list at all :)

By looking at your query:
$query = "SELECT ac.id AS commentid, ac.parentid, ac.contentid, ac.title, ac.comment, ac.date, c.title AS titlearticle"
				."\n FROM jos_comment AS ac, jos_content AS c"
				."\n WHERE c.id = ac.contentid  AND ac.userid = '$user->id'"
				."\n AND ac.published='1' AND ac.status='0' "
				. $commentLevel
				."\n ORDER BY ac.$sortBy"
				."\n LIMIT " . ( $pagingParams["mxc_comments_limitstart"] ? $pagingParams["mxc_comments_limitstart"] : "0" ) . "," . $commentperpage;
 

I can tell you: this thing is returning 0 or?

in the where condition you have ac.state - there is no field state in comment's table. The state is for jos_comment.
so change it to c.state and perhaps then you will get the list?

CB Comments Tab? 16 years 6 days ago #1600

  • shane
  • shane's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
I changed the code to this:
$query = "SELECT ac.id AS commentid, ac.parentid, ac.contentid, ac.title, ac.comment, ac.date, c.title AS titlearticle"
				."\n FROM jos_comment AS ac, jos_content AS c"
				."\n WHERE c.id = ac.contentid  AND ac.userid = '$user->id'"
				."\n AND ac.published='1' AND c.status='0' "
				. $commentLevel
				."\n ORDER BY ac.$sortBy"
				."\n LIMIT " . ( $pagingParams["mxc_comments_limitstart"] ? $pagingParams["mxc_comments_limitstart"] : "0" ) . "," . $commentperpage;
but still got an empty list.

I don't know enough about coding MySQL or php to do this properly. I don't know what to do with the "status" calls from the old jos__mxc_comments table.

When I try to remove AND ac.status='0' from the above code, I get a parse error on the site, so it must be important... I just don't know how to fix it.

Thanks Dimitri for trying. You guys are great.

CB Comments Tab? 16 years 5 days ago #1602

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
there s also no c.status, but c.state. Can you not open your database with phpmyadmin and test the query?
I tried with that here:
 SELECT ac.id AS commentid, ac.parentid, ac.contentid, ac.title, ac.comment, ac.date, c.title AS titlearticle
FROM jos_comment AS ac, jos_content AS c
WHERE c.id = ac.contentid
AND ac.userid =62
AND ac.published = '1'
AND c.state = '1'
ORDER BY ac.date ASC
LIMIT 0 , 30 
it was working. You have to add $commentLevel and the pagination and it should work

CB Comments Tab? 16 years 5 days ago #1606

  • shane
  • shane's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
Daniel,

The query you included works perfectly in phpmyadmin. It returns the comments as it should.

I took the query you included and worked it into the code of cb.mxcommenttabs.php as follows:
		$query = 	"SELECT ac.id AS commentid, ac.parentid, ac.contentid, ac.title, ac.comment, ac.date, c.title AS titlearticle"
					."\n FROM #_comment AS ac, #_content AS c"
					."\n WHERE c.id = ac.contentid" 
					."\n AND ac.userid = '$user->id'" 
					."\n AND ac.published = '1' "
					."\n AND c.state = '1'"
					.$commentLevel
					."\n ORDER BY ac.$sortBy "
					."\n LIMIT " . ( $pagingParams["mxc_comments_limitstart"] ? $pagingParams["mxc_comments_limitstart"] : "0" ) . "," . $commentperpage;

The results are the same as I reported in my first post. The tab will generate the number of comments for the user and the pagination will generate and display. I still do not get the list of comments to generate and display.

I think the code the builds the list is what needs work. It is calling on the old _mxc_badwords table... I've commented out most of the code that is calling the _mxc_badwords table, but still get no joy with the comment list genrating.
		$rowcounter = 0;
 
		if ( $recordcount >0 ) {
			foreach ( $rows as $row ){	
				if (is_callable( array( $mainframe, "getItemid" ) ) ) {
					$itemid	= $mainframe->getItemid( $row->contentid );
				} elseif (is_callable( "JApplicationHelper::getItemid" ) ) {
					$itemid	= JApplicationHelper::getItemid( $row->contentid );
				} else {
					$itemid = null;
				}
				$itemidtxt	= $itemid ? "&Itemid=" . (int) $itemid : "";
				$return .= "<fieldset>";
				$return .= "<div class='small'>";
				if ( $showTitle ) {
					$return .= "<b>" . _MXCPLUG_TITLEARTICLE . "</b> <a href='" . sefRelToAbs( $goItem . $row->contentid . $itemidtxt ). "'>" . stripslashes($row->titlearticle) . "</a><br />";			
				}
				$return .= "<b>" . _MXCPLUG_DATE . "</b> " . $row->date . "<br />";
				if ( $showCommentLevel ) {
					$return .= "<b>" . _MXCPLUG_LEVEL . "</b> " . ( $row->parentid ? _MXCPLUG_REPLY : _MXCPLUG_COMMENT ) . "<br />";			
				}
				$return .= "</div>";
				// Bad words
//				if ( $mxc_badwords ){
//				$query = "SELECT * FROM jos_mxc_badwords WHERE published='1'";
//					$database->setQuery( $query );
//					$rowsbadwords = $database->loadObjectList();
//					if ( $rowsbadwords ) {
//						foreach ( $rowsbadwords as $rowbadword ) {
//							$badword = trim( $rowbadword->badword );
//							$replacebadword = str_repeat( '*', strlen( $badword ) );
//							$replacebadword = "\$1" . $replacebadword . "\$2";
//							$row->title = preg_replace("/(\W|^)$badword(\W|$)/i", $replacebadword, $row->title);
//						}	
//					}
//				}				
//				$return .= "<b>" . stripslashes($row->title) . "</b><br />";
//				
//				// Prepare smiley array
//				$smiley[':)']     = "sm_smile.gif";    $smiley[':grin']  = "sm_biggrin.gif";
//				$smiley[';)']     = "sm_wink.gif";     $smiley['8)']     = "sm_cool.gif";
//				$smiley[':p']     = "sm_razz.gif";     $smiley[':roll']  = "sm_rolleyes.gif";
//				$smiley[':eek']   = "sm_bigeek.gif";   $smiley[':upset'] = "sm_upset.gif";
//				$smiley[':zzz']   = "sm_sleep.gif";    $smiley[':sigh']  = "sm_sigh.gif";
//				$smiley[':?']     = "sm_confused.gif"; $smiley[':cry']   = "sm_cry.gif";
//				$smiley[':(']     = "sm_mad.gif";      $smiley[':x']     = "sm_dead.gif";
//			
//				$commentText = stripslashes( $row->comment );
				// Bad words
//				if ( $mxc_badwords ){
//					$query = "SELECT * FROM jos_mxc_badwords WHERE published='1'";
//					$database->setQuery( $query );
					//rowsbadwords = $database->loadObjectList();
//					if ( $rowsbadwords ) {
//						foreach ( $rowsbadwords as $rowbadword ) {
//							$badword = trim( $rowbadword->badword );
//							$replacebadword = str_repeat( '*', strlen( $badword ) );
//							$replacebadword = "\$1".$replacebadword."\$2";
//							$commentText = preg_replace("/(\W|^)$badword(\W|$)/i", $replacebadword, $commentText);
//						}	
//					}
//				}
				$commentText = cbmxcParse( $commentText, $smiley, $mxc_bbcodesupport, $mxc_picturesupport, $mxc_smiliesupport, $mosConfig_live_site );
				$commentText = cbhtmlwrap( $commentText, $mxc_lengthwrap );
				$return .= $commentText . "<br />";
				$return .= "</fieldset><br />";
				$rowcounter++;
			}
		}
 

Current version of the file cb.mxcommenttabs.php is attached. cb.zip

CB Comments Tab? 16 years 4 days ago #1608

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
can you perhaps give me super admin access to your web site, and also install a ftp extension in the backend so I can work there directly on the files for cb?

CB Comments Tab? 16 years 4 days ago #1611

  • shane
  • shane's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
Daniel,

Sending you a PM with site and FTP info.

Thanks!

Shane

CB Comments Tab? 15 years 3 months ago #5417

  • tipworld
  • tipworld's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
Hi,

Are there a CommunityBuilder plugin (profile) for !Joomlacomment?

thank you

CB Comments Tab? 15 years 3 months ago #5453

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
tipworld wrote:

Hi,
Are there a CommunityBuilder plugin (profile) for !Joomlacomment?
thank you

Looking at this thread, hopefully there will soon :cheer:

Well a fellow named astro75 had a cbTab plugin working well enough, maybe you guys could gander at how he did it to work on this? It was for JoComment 3 though. compojoom.com/forum/7-wishlist/1773-plug...ml?limit=10&start=10

CB Comments Tab? 15 years 3 months ago #5471

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Search the forum and you will find a plugin. Not written from me, but from a user of joomlacomment - sofar I know it is working :)

CB Comments Tab? 15 years 3 months ago #5480

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Daniel Dimitrov wrote:

Search the forum and you will find a plugin. Not written from me, but from a user of joomlacomment - sofar I know it is working :)


If you're thinking of the CBtab one, it only works properly in JoomlaComment 3 apparently - users of 4.0 Beta couldn't get it working.

CB Comments Tab? 15 years 3 months ago #5487

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ah? I didn't know this. Good I will have a look at it.

CB Comments Tab? 15 years 3 months ago #5694

  • tipworld
  • tipworld's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
I wait, tank's

CB Comments Tab? 15 years 2 weeks ago #7701

  • Toni
  • Toni's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0
Any luck making it work on 4.0?

CB Comments Tab? 15 years 2 weeks ago #7702

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I forgot about this.
I will check it till the end of the week.

CB Comments Tab? 14 years 9 months ago #8646

  • Brecht Coene
  • Brecht Coene's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 0
Any result yet on this?

CB Comments Tab? 14 years 9 months ago #8806

  • Brecht Coene
  • Brecht Coene's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Thank you received: 0
daniel?
  • Page:
  • 1
Time to create page: 0.136 seconds