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

Session Start
#1

Hello,

Hello, when you put the code <?php session_start(); ?>

An error appears in the console

PHP Notice:  session_start(): Ignoring session_start() because a session is already active in /home/..../public_html/themes/doks/post.html.php on line 1

I use this system and apparently there is htmly.
https://github.com/danpros/htmly/blob/ma.../htmly.php

But if I remove the code  <?php session_start(); ?>
Comments are not refreshed.
Reply
#2

Hello, the issue with the comments not refreshing could be unrelated to the session_start() code not being there.

What's the link to your comments page so I can figure out what's happening?

Have you completed the interview?
Reply
#3

Hello,
I'm using an off-the-shelf system and it apparently has this code session_start().
I wrote to the creator and he replied
https://github.com/danpros/htmly/issues/747
But I don't know how to fix it
Reply
#4

Yeah so you don't need to add the session_start() code.

According to the creator's response, you can either disable the cache feature of your off-the-shelf system or you can programmatically delete the cache of your off-the-shelf system whenever a comment is posted in Commentics. Commentics has an events system (link below) which was specifically designed for this. The documentation in the link below is hopefully easy to follow. Then the only thing you'd need to do is find out from the creator what the code is to delete the cache of your off-the-shelf system and add that to the event in Commentics. If neither of those solutions work, you could always try the iFrame method.

https://commentics.com/events

Have you completed the interview?
Reply
#5

Thank you for your help.
Reply
#6

I have been trying to integrate Commentics into HTMLy for a while now without success. I would appreciate it if you can let me know how to do it.

Commentics is being used on another site so I have to use the iFrame integration but just can't figure out how to do it.  I have been adding the code into the post.html.php file of the theme I am using.
Reply
#7

Hello,

Look in the settings to see if you have given permission

commentics/admin/

Menu->Manage->sites

Click on the site
1.site.com
iFrame Enabled:You tick

/// Google translate
Reply
#8

https://commentics.com/integration

Add this to yours
post.html.php


<div id="commentics"></div>

<script src="http://your-domain.com/comments/embed.js"></script>


<script>
var commentics_config = {
  'identifier': '1',
  'reference' : 'Page One'
};
</script>

You have to change the black writing
Reply
#9

(28-May-2024, 05:11 PM)philips300 Wrote:  https://commentics.com/integration

Add this to yours
post.html.php


<div id="commentics"></div>

<script src="http://your-domain.com/comments/embed.js"></script>


<script>
var commentics_config = {
  'identifier': '1',
  'reference' : 'Page One'
};
</script>

You have to change the black writing
Thanks for your response...I have that set up in a separate file which I then include from the post.html.php file.  My problem is that I don't know what to change the 'identifier' to. Obviously leaving the 1 there does not work. What did you change yours to?  I am getting the comments posted, the problem is that the comment is displayed in all articles, not just the one I want to post a comment to.
Reply
#10

(28-May-2024, 05:36 PM)afoster Wrote:  
(28-May-2024, 05:11 PM)philips300 Wrote:  https://commentics.com/integration

Add this to yours
post.html.php


<div id="commentics"></div>

<script src="http://your-domain.com/comments/embed.js"></script>


<script>
var commentics_config = {
  'identifier': '1',
  'reference' : 'Page One'
};
</script>

You have to change the black writing
Thanks for your response...I have that set up in a separate file which I then include from the post.html.php file.  My problem is that I don't know what to change the 'identifier' to. Obviously leaving the 1 there does not work. What did you change yours to?  I am getting the comments posted, the problem is that the comment is displayed in all articles, not just the one I want to post a comment to.

here
https://docs.htmly.com/tips-trick/commen...ntegration
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
04-Aug-2011, 05:10 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)