This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

SSO, dynamically loading comments and customising
#1

I need this help urgently guys, so please help me.

I am now an advanced user rather intermediate one. I have knowledge of php, .js, css. So can solve it with little help.

1) I have a login system on my page, so I want commentics to automatically take the value of the respective end-user.

2) I want commentics to dynamically load the page with corresponding comments related to that page. My backend is in PHP and I am using JQuery,
Is it possible to send something like mypage.php?id=uniq_id using JQuery POST method, so that commentics knows about it and returns the corresponding page.

3) I dont want to show name textbox while commenting, once users click reply only Comment test area should show. Please tell me how to do this.

I read something about this in documentation but still not sure.
Reply
#2

Hi,

1. You can use the Login Details feature of Commentics for this. For example, to set the user's name, add this to the top of your integration code:

<?php
$cmtx_set_name_value = 'James';
$cmtx_page_id = '1';
$cmtx_reference = 'Page One';
$cmtx_path = 'comments/';
define('IN_COMMENTICS', 'true'); //no need to edit this line
require $cmtx_path . 'includes/commentics.php'; //no need to edit this line
?>

2. It's possible but it would require a lot of programming so it would be outside of the free support that I can give.

3. This is something that will be easy to do in a future version of Commentics. In the meantime, you could open the form template (/comments/includes/template/form.php) and add a div with a 'display:none' attribute around each field's code block. More info here: http://www.commentics.org/forum/showthre...40#pid3940

Have you completed the interview?
Reply
#3

Hey steven,
Thanx for the reply and appreciate your help.

1)$cmtx_set_name_value = $_POST["userid"] //'James';
I will use something like this. To get the user id dynamically.

2) I want something like this links below, comments load dynamically according to the page
http://www.commentics.org/blog/?p=357 , http://www.commentics.org/blog/?p=352

Do you think it takes a lot of time because I really need this and I can program if you give some guidance.

3) Of course, I should have figured that one, Thanx
Reply
#4

Okay, I'm no longer sure what you're talking about regarding (2).

If you want to integrate Commentics into a single file such as index.php, and that file can produce various pages such as index.php?page=1 and index.php?page=2, then just supply the $cmtx_page_id variable in the integration code with the page value, for example:

PHP Code:
<?php 
$cmtx_page_id
= $_GET["page"];

Have you completed the interview?
Reply
#5

Steven,

Sorry for the confusing point above.

I actually figured out how to do it. I did the same thing but there was one small problem with this approach $cmtx_page_id = $_GET["page"];
this would require page to reload which I do not want, so I wrote a JQuery snippet and used IFRAMES to load the comments and then send the value to $cmtx_page_id.

This is working great but a minor issue with the styling which completely breaks down in the IFRAME for some reason.

Many thanks to you though.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
31-Jan-2022, 07:59 PM
Last Post by Steven
29-Jul-2020, 08:34 AM
Last Post by MattyP
13-Apr-2020, 08:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)