×

Notice

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

TOPIC: Last comments format like wordpress comments format

Last comments format like wordpress comments format 11 years 7 months ago #9928

  • Balan Claudiu
  • Balan Claudiu's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Hy Daniel.
We have bought CompojommComment one week ago after we have changed our CMS (from Wordpress to Joomla)
Now the latest comments module shows <user name> + "said" + <what users said> + <comment datetime>
We want that latest comments module to show <user name> + "said on" + <article title where user comments>
How to do that?

Last comments format like wordpress comments format 11 years 7 months ago #9929

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Balan,
Thanks for the purchase.
You have made the right choice with switching to joomla :)
Please read this information here:
docs.joomla.org/Understanding_Output_Overrides
and specially this part:
docs.joomla.org/Understanding_Output_Ove...ule_Layout_Overrides

You can override the output from our module and make it the way you want it.
If you make the changes with template overrides you can be sure that an update of the module will not break your layout again :)
Cheers,
Daniel

Last comments format like wordpress comments format 11 years 7 months ago #9958

  • Balan Claudiu
  • Balan Claudiu's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Thanks for reply Daniel.
I have managed to figure out how to overryde module layout but I don't know how to make php changes in source code to display the wordpress comments format in the front end.
Like i said, we want to show latest comments like this: <username> + "said on" + <article title> (and username linked to comment id for getting to the comment)
I've managed to identify the file that i shoud change for this:/public_html/modules/mod_comments/tmpl/default.php (ofcourse, to overryde layout i will put the file in the right directory)
But i'm not a php programmer and i'm stuck with this, so i please you to help me and give'me a source code modification for this file. I know you are very bussy but solving this problem means a lot to us.
We have a big comunity with thousands of users every day, so that the reason why this problem is so important for our visitors.
Thanks again.

Last comments format like wordpress comments format 11 years 7 months ago #9962

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Balan,
Here is what you have to do:
change the following code in default.php
<?php if($params->get('orderby') != 'mostcommented') : ?>
		<ul class="ccomment">
			<?php foreach($comments as $comment) : ?>
				<?php $comment = modCommentsHelper::renderComment($comment, $params); ?>					
						<li class="ccomment">
							<div class="ccomment_info">
								<?php if($params->get('showname', 1)) :?>
								<?php echo $comment['user'] . ' '; echo JText::_('SAID'); ?>
								<?php endif; ?>
								<span class="ccomment_more">
									<?php if($params->get('tooltip') == 0) : ?>
										<a href="<?php echo $comment['link']; ?>">
											<?php echo JText::_('MODMORE'); ?>
										</a>
									<?php else : ?>
									<?php
										JHTML::_('behavior.tooltip');
										$tooltipOverlayBody =	$comment['overlayComment'];
										if(!$params->get('showconttitle',1)) {
											$comment['overlayTitle'] = '';
										}
										echo JHTML::tooltip($tooltipOverlayBody, $comment['overlayTitle'], '', JText::_('MODMORE'), $comment['link']);
									?>
									<?php endif; ?>
								</span>
							</div>
							<div class="ccomment_comment">
								<?php echo $comment['comment'] ; ?>
								<?php if(intval($params->get('showtime', 1))) : ?>
									<span class="ccomment_date">
										<?php echo $comment['date']; ?>
									</span>
									<div class="ccomment_clear"></div>
								<?php endif; ?>
							</div>
						</li>
				<?php endforeach; ?>
		</ul>
	<?php else : ?>
to
<?php if($params->get('orderby') != 'mostcommented') : ?>
		<ul class="ccomment">
			<?php foreach($comments as $comment) : ?>
				<?php $comment = modCommentsHelper::renderComment($comment, $params); ?>
						<li class="ccomment">
							<div class="ccomment_info">
								<?php if($params->get('showname', 1)) :?>
								<?php
								echo '<a href="'.$comment['link'].'">';
										echo $comment['user'] . ' ';
										echo '</a>';
										echo 'said on ';
										echo $comment['conttitle']; ?>
								<?php endif; ?>
							</div>
							<div class="ccomment_comment">
								<?php echo $comment['comment'] ; ?>
								<?php if(intval($params->get('showtime', 1))) : ?>
									<span class="ccomment_date">
										<?php echo $comment['date']; ?>
									</span>
									<div class="ccomment_clear"></div>
								<?php endif; ?>
							</div>
						</li>
				<?php endforeach; ?>
		</ul>
	<?php else : ?>

This should do what you want. Please don't forget to leave review here: extensions.joomla.org/extensions/contact...icles-comments/12259 :)

Last comments format like wordpress comments format 11 years 7 months ago #9968

  • Balan Claudiu
  • Balan Claudiu's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Thanks a lot Daniel, for helping us. The code works like a charm :D

Last comments format like wordpress comments format 11 years 2 months ago #10762

  • poesiamas
  • poesiamas's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
¡Hi Daniel! I really love these 'Wordpress like' code, i'm using in in my site. The question is: do you know hot to add to these beautiful code the avatar via CB in questions, like the kunena last comments 1.6 do?

So, users see their avatar and name, the article name, a extract of the comment and also the date if the cursor is on the comment -i like these!-.

Daniel, these variation of the code is simple but maybe it'll be a good idea to add it for a new template in the last comments module, it's very intuitive for the users. The actual template is invisible, i mean: if the user don't put the mouse over the comment, no link appears. These way, like Wordpress, the user always see a link to click. It's a suggestion, of course.

Thank you very much! I love these component. ^_^

Last comments format like wordpress comments format 11 years 2 months ago #10764

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Poesiamas,
thank you for the suggestion. I've added it to our feature list:http://dev.compojoom.com/issues/show/225
Unfortunately it is not that easy. We'll have to make sure that the module also works with avatars from k2, jomsocial and all the other systems that we are planning to add.

Cheers,
Daniel

Last comments format like wordpress comments format 11 years 2 months ago #10774

  • poesiamas
  • poesiamas's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0

Daniel Dimitrov wrote: Hey Poesiamas,
thank you for the suggestion. I've added it to our feature list:http://dev.compojoom.com/issues/show/225
Unfortunately it is not that easy. We'll have to make sure that the module also works with avatars from k2, jomsocial and all the other systems that we are planning to add.

Cheers,
Daniel


Thanks for the answer! If finally the template is included in module as a new template -even if the avatar it's not included, it's a style matter-, well, i'm sure a lot of users will love it. Thanks for your support, other day i'll ask you for my spam problem, i think a bot can recognize the captcha and compojoom comment system and penetrate my defenses, hahaha. ;)
  • Page:
  • 1
Time to create page: 0.137 seconds