×

Notice

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

TOPIC: Couple issues. Page Break Option on comments and Emoticons not showing

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12105

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
In the backend you can select how many comments should be shown per page. (I think it was the layout tab)

And yes, the magazineJoomla template is missing the emoticons.
You can add
{BLOCK-emoticons}
{emoticons}
{/BLOCK-emoticons} 
to the form and they will most probably appear again.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12106

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
I have 3 problems with the comments per page feature.

1. What ever I set it to, whether its 10, or 40, once I toggle over to the next page, it seems to knock out the css change we did with the comment boxes. I did the css change so that the comment boxes would alternate in color, yellow & white. With the comments per page feature enabled, once a user toggles over to the 2nd page, all the comment boxes are yellow.

Here's a link, click on page 2:

www.njteachertalk.com/index.php?option=c...among-options#josc83

2. If I am on the 2nd page and I refresh the page, it takes me back to the beginning of the comments. Is there anyway to refresh the comments on page 2 or 3 and the same page page remains. I don't want to have users refreshing, say comment page 6, and then being taken all the way back to the beginning.

3. This is probably just a style change, but the ability to turn pages is at the top resting on the 'Leave a Comment' box. Naturally, I'd like this feature at the bottom of the page, below the last comment, so that when users scroll down, they can can then just click on the next page, instead of having to go all the way to the top of the page to do that.

Thanks

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12111

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
1. Add this function to the end of the custom.js file:
function JOSC_getCommentsResponse() {
 
	//JOSC_ShowHide('', 'joscPageNavLink', 'joscPageNavNoLink');
 
	if (JOSC_ajaxReady()) {
 
 
		JOSC_resetFormPos(); /* if reply... */
 
		var element = document.getElementById('Comments');
		var elementPN = document.getElementById('joscPageNav');
 
		var xmlDocument = JOSC_getXmlResponse(true); /*JOSC_http.responseXML;*/
		if (!xmlDocument) {
			return 0;
		}
 
		element.innerHTML='';
		elementPN.innerHTML='';
 
		var body 	= JOSC_xmlValue(xmlDocument, 'body');
		var pagenav	= JOSC_xmlValue(xmlDocument, 'pagenav');
 
		if (JOSC_sortDownward != 0)
			JOSC_insertAdjacentHTML(element, 'afterBegin', body);
		else {
			JOSC_insertAdjacentHTML(element, 'beforeEnd', body);
		}
		JOSC_insertAdjacentHTML(elementPN, 'afterBegin', pagenav);
 
		if (self.JOSC_afterAjaxResponse) JOSC_afterAjaxResponse('response_getcomments');
 
var comments = $('Comments').getChildren();
   for(var i=1; i < comments.length; i++) {
       if(i % 2 ) {
           commentClass = comments[i].className
           comments[i].className = commentClass + ' odd'
       }
   }
	}
}

does this fix the color issue when you change the pages?

2. Why do you want to refresh the page when you are on page 2? Anyway, this is annoying I know, and I hope to be able to fix it soon with an update. What is more annoying is that when you don't have the latest comments first -> then when you post a new comment the whole page refreshes and you are sent to the last page...

3. Move this tag
			{pagenav}
			<!-- here will be inserted the page nav -->
			{/pagenav}

after the {post} tag in the template and the navigation should appear at the bottom.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12112

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Took care of the issues.

1. No more problem with the color issue on page 2. Thanks!

2. Your right, about having the newest comments 1st. Makes more sense, Took care of that. Thanks!

3. Moved the page toggle to the bottom. Thanks?

One new issue did arise though. When any user leaves a new comment, the 1st comment box always appears yellow. It's not until the user refreshes the page does the new color scheme (yellow, white, yellow, white) kick in. Is there any way that when the user posts a new comment, the comments can register as yellow, white, yellow, white, and not always yellow, which then forces the user to refresh the page to see the color scheme that I am going for.

Link:
www.njteachertalk.com/index.php?option=c...among-options#josc96

You have been helping me tremendously and I really appreciate it. Is there anywhere I can make a donation to the site.

Thanks!

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12113

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Could you enable the comments for non registered users? I want to try to write a comment.

Btw - this is no the final design for the comments, right???

No donation, but you can always write a review:
extensions.joomla.org/extensions/contact...icles-comments/12259

and spread the word about the extension and the support :)
Daniel

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12114

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Disabled for non registered users now.

Yeah, this is close to the final design, why, what do you think? Any critique?

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12115

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I can't access the site anymore...

Well, my personal opinion is that the design is terrible. ( please keep in mind that this is my personal opinion and I don't want to hurt any feelings...) Those borders looks so strange and they are so many of them... Also the color difference is not to be seen on my laptop - on the external monitor it is to be noticed, but also really, really hard.

And yea, basically the borders confuse me - I can't understand where the comment ends and where it begins.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12117

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Lol, It's all good. Any suggestions?

Which borders exactly? the sides? between each comment? You are strictly talking about the comment section, correct? If I put a black outline around the comment section and between each comment, would that help?

Site back up btw

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12118

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
The lines are a bit hard compared to the rest.
However, the entry fields (where you write stuff) is adjusted clean to the left. Might be a thought (suggestion) to add some padding there.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12119

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
A bit hard? What does that mean? You are referring to the lines that separate each comment? Pardon my ignorance. This is my 1st site & I am a total noob when it comes to CSS & HTML.

How what I go about adding some padding so I can see what it looks like?

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12120

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
Well, it's just an opinion...
You have generally aimed at subtile orange tones, complete with a cloud image background following the same style.
It just seems (to me), that the sudden black lines separating the comments are hard. Perhaps a deeper orange tone, to follow suit with everything else? Just a thought.

I prefer to use iDev addon to Firefox to alter stuff in the CSS.
But I am not an expert! I know many prefer Firebug... I have it installed, but end up using iDev just from habit.
But using one of those will point you in the right direction for CSS alterations. It's fun too, and you learn how loud you can really scream when things go wrong... LOL :lol:
But, as long as you keep at it, it should get things in place. ("Should", is a really good word.)

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12121

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Would that even blend the comments even more & confuse the borders even more? Isn't that what Daniel is saying? I thought the hard lines between each comment is a good thing so readers can clearly see the break between each comment, no?

And the website is a site based on education so the look I was going for in the comment section was to make the comments look like a piece of paper. Hence the alternating yellow & white colors. The yellow box was created by using an image of an actual piece of paper, and then plain white? Is this look not conveying itself clearly?

Critique is appreciated.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12122

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
The alternating yellow to white, and even the black lines do indeed seperate the comments.
I was just making a suggestion, to try to get the colours to appear more comfortable.
Conveying something clearly, is not the same as conveying something pleasantly. But as Daniel says, it is only opinion.
"Opinions" are not easy to explain.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12123

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
add this function to the end of common.js
function JOSC_editPostResponse()
{
	if (JOSC_ajaxReady()) {
		var form = document.joomlacommentform;
		var element = document.getElementById('Comments');
		var xmlDocument = JOSC_getXmlResponse(true); /*JOSC_http.responseXML;*/
		if (!xmlDocument) {
			return 0;
		}
		var id = JOSC_xmlValue(xmlDocument, 'id');
		var captcha = JOSC_xmlValue(xmlDocument, 'captcha');
		if (captcha) {
			JOSC_refreshCaptcha(captcha);
			if (id == 'captchaalert') {
				alert(COM_COMMENT_FORMVALIDATE_CAPTCHA_FAILED);
				return 0;
			}
			if (id == 'captcha') {
				return 0;
			}
		}
		anchor = 'josc' + id;
		var idsave = id;
		id = 'post' + id;
		var body = JOSC_xmlValue(xmlDocument, 'body');
		var post = document.getElementById(id);
		var after = JOSC_xmlValue(xmlDocument, 'after');
		JOSC_clearInputbox();
		var noerror = JOSC_xmlValue(xmlDocument, 'noerror');
		if (noerror==0) {
			alert(COM_COMMENT_REQUEST_ERROR);
			form.tcomment.value=JOSC_http.responseText;
			return 0;
		}
		var published = JOSC_xmlValue(xmlDocument, 'published');
		if (published==0) {
			alert(COM_COMMENT_BEFORE_APPROVAL);
			form.tcomment.value="";
			if (self.JOSC_afterAjaxResponse) JOSC_afterAjaxResponse('response_approval');
			return 0;
		}
		if (post) {
			var indent = post.style.marginLeft;
			JOSC_insertAdjacentHTML(post, 'beforeBegin', body);
			JOSC_removePost(post);
			newPost = document.getElementById(id);
			newPost.style.marginLeft = indent;
			JOSC_modifyForm(COM_COMMENT_WRITECOMMENT, COM_COMMENT_SENDFORM,
				function(event)
				{
					JOSC_editPost(-1, -1);
				});
			form.tname.value = JOSC_userName;
			if (document.getElementsByName('temail')[0])   {
				form.temail.value = JOSC_userEmail;
			}
			if (document.getElementsByName('website')[0])   {
				form.website.value = JOSC_userWebsite;
			}
			if (self.JOSC_afterAjaxResponse) {
				JOSC_afterAjaxResponse('response_editpost');
			}
		} else {
			if (!after || after == -1) {
				if (JOSC_sortDownward != 0) {
					if (JOSC_postREFRESH) {
						JOSC_refreshPage(COM_COMMENT_MSG_NEEDREFRESH, idsave);
					}else {
						JOSC_insertAdjacentHTML(element, 'afterBegin', body);
					}
				} else {
					if (JOSC_postREFRESH) {
						JOSC_refreshPage(COM_COMMENT_MSG_NEEDREFRESH, idsave);
					} else {
						JOSC_insertAdjacentHTML(element, 'beforeEnd', body);
					}
				}
			} else {
				if (document.getElementById('post' + after)) {
					JOSC_insertAdjacentHTML(document.getElementById('post' + after), 'afterEnd', body);
				}else{
					/* pagination or post has been deleted or new one from another users...=> refresh */
					JOSC_refreshPage(COM_COMMENT_MSG_NEEDREFRESH, idsave);
				}
			}
 
			if (self.JOSC_afterAjaxResponse) {
				JOSC_afterAjaxResponse('response_posted');
			}
		}
		JOSC_goToAnchor(anchor);
var comments = $('Comments').getChildren();
 
  var lastComment = comments[1].className;
 
console.log(lastComment);
console.log(lastComment.indexOf('odd'))
if(lastComment.indexOf('odd') == '-1') {
var commentClass = comments[0].className
 
           comments[0].className = commentClass + ' odd'
}
 
	}
}

now the new comments should have a proper class.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12124

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
No,, this didn't work. Still have this same problem:

"When any user leaves a new comment, the 1st comment box always appears yellow. It's not until the user refreshes the page does the new color scheme (yellow, white, yellow, white) kick in. Is there any way that when the user posts a new comment, the comments can register as yellow, white, yellow, white, and not always yellow, which then forces the user to refresh the page to see the color scheme that I am going for"

Did it work when you tested it? Did the comments appear yellow, white, yellow, white, as you posted them?.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12125

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
Hm... I just posted 3 comments... and, well, it seems to work correctly from here...
The comments posted using correct colour scheme each time. Alternatly yellow - white - yellow...

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12126

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Works for me too. That's awesome! Thanks guys!

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12127

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Actually, it works on my iphone and on other peoples desktops, but not on mine.

Do I have to clear something out?

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 6 months ago #12128

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Perhaps clear the cache on your computer?

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 4 days ago #14558

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Hey, what's up Daniel. Not sure you remember this thread here but my site is almost ready to go live. I wasn't satisfied with my page speed scores, so I uploaded a plug in called JCH Optimize. I drastically improved my scores but in the process I knocked out the custom.js changes from above, the alternating yellow and brown comment boxes. In the parameters of the JCH plug in, there is actually an option for excluding css or js files from the JCH changes, I put this file in the exclude js file box: /public_html/components/com_comment/joscomment/templates/magazineJoomla/js/custom.js. I also just tried magazineJoomla.js. Not of them worked. The js changes to the comments still not turning up.

Any help that you can give me would be greatly appreciated.
  • Page:
  • 1
  • 2
Time to create page: 0.172 seconds