The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to customize th...
 
Share:
Notifications
Clear all

How to customize the inline comments popup showing inline comments

10 Posts
2 Users
2 Reactions
1,156 Views
Posts: 23
Topic starter
(@remiel)
Eminent Member
Joined: 4 years ago

I mean this:

image

Is there a filter/action/template I can use to change what displays in this popup and how it's displayed?

  1. I want to change the number of comments from 3 to another number
  2. The popup currently loads most recent comments, what if I wanted to show the most upvoted comments instead?
  3. What if I wanted to also display the number of upvotes that comment has 
  4. In fact, what if I wanted to completely replace this with my own popup. What function(s) in discuz core files would I need to alter?

Also, I couldn't find in your API documentation anything regarding AJAX endpoints. As in, if I wanted to post comments or fetch comments via my own AJAX calls, what endpoints I'd need to access and what parameters I'd need to send?

There are many ways this information might be useful. For example, I might want to add some widgets of my own that are related to displaying/managing comments. Or extend discuz functionality with something specific for my site. Or implement my own frontend management of comments for editors. Etc.

9 Replies
Asti
Posts: 7661
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

We're really sorry, but there is no solution for this. 

Reply
2 Replies
(@remiel)
Joined: 4 years ago

Eminent Member
Posts: 23
Posted by: @asti

We're really sorry, but there is no solution for this. 

There is always a solution. Even if it involves changing the wpdiscuz code myself. The key is knowing what to change.

I've looked around wpDiscuz and noticed there is no unminified version of the javascript which makes it extremely difficult to do any kind of alterations to the code. Do you have a git repo, or some other place where I can get the unminified version so I could make the changes I need?

I love your plugin, but I'm working on a lot of sites, which might have their own requirements for the comment system, and I can't implement the requested changes without the source files.

@asti Also, what about AJAX documentation? Is it available and if not, do you intend to make it available in the future?

 

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@remiel,

I've looked around wpDiscuz and noticed there is no unminified version of the javascript which makes it extremely difficult to do any kind of alterations to the code. Do you have a git repo, or some other place where I can get the unminified version so I could make the changes I need?

You can find the files in the /wpdiscuz/assets/js/ folder. 

Also, what about AJAX documentation? Is it available and if not, do you intend to make it available in the future?

What do you mean saying AJAX documentation?

Reply
Posts: 23
Topic starter
(@remiel)
Eminent Member
Joined: 4 years ago
Posted by: @asti

You can find the files in the /wpdiscuz/assets/js/ folder. 

Oh, I see. That's great! Just a quick question – if I change the javascript code in that folder, will the plugin automatically regenerate the minified file based on it? Or is there something special I need to do to regenerate it?

Posted by: @asti

What do you mean saying AJAX documentation?

Info on how to send ajax calls through our own javascript to interact with discuz, such as posting comments or fetching comments.

$.ajax({
			type: 'POST',
			url: url,
			data: data
		});

Basically, what URLs to send the ajax call to and what data needs to be sent, as well as what responses we can expect.

Knowing this would allow us to write our own comment display widgets or even our own commenting form. We could do whatever we want on the frontend side, but the backend would still be discuz.

Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@remiel,

 Just a quick question – if I change the javascript code in that folder, will the plugin automatically regenerate the minified file based on it? Or is there something special I need to do to regenerate it?

No, it'll not automatically regenerate the minified file. You can do it using some online tool. 

Basically, what URLs to send the ajax call to and what data needs to be sent, as well as what responses we can expect.

We're really sorry, but there isn't documentation. You can find all this info in the JS files. 

Reply
Posts: 23
Topic starter
(@remiel)
Eminent Member
Joined: 4 years ago
Posted by: @asti

No, it'll not automatically regenerate the minified file. You can do it using some online tool.

How do I know which js files need to be included in the minified version? I assume that all the js files that don't have a minified version of the same name are supposed to be included? But checking the minified files... why is there a "combo" version and a "combo no_quill" version? What is the difference between them? Which one am I supposed to overwrite with my own minified version and what js files are supposed to be included in one and not the other?

Posted by: @asti

We're really sorry, but there isn't documentation. You can find all this info in the JS files. 

Alright, I'll check your source code for this.

Reply
3 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@remiel,

Each JS file has its own minified version. If you do some changes in the file should also change it in the minified version. The combo file contain all the minified JS codes. There also should be added the changes.

It should be warned, that the changes will be lost after the plugin update. 

why is there a "combo" version and a "combo no_quill" version? 

The combo no_quill doesn't contain the quill editor JS codes. 

Reply
(@remiel)
Joined: 4 years ago

Eminent Member
Posts: 23

@asti

I see, so if I understood it correctly, both combo and no_quill versions include minified versions of every js script in the assets/js folder. And the difference is that combo version also includes the minified version of assets/third-party/quill/quill.js ?

What about other js scripts in the third-party folder? Are they also included in the combo versions?

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@remiel,

I see, so if I understood it correctly, both combo and no_quill versions include minified versions of every js script in the assets/js folder. And the difference is that combo version also includes the minified version of assets/third-party/quill/quill.js ?

Yes, that is correct. 

What about other js scripts in the third-party folder? Are they also included in the combo versions?

All wpDiscuz JS files are located in the /wpdiscuz/assets/js/ folder. Yes all those files are included in the combo versions. 

Reply
Share: