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

Page Identifier
#1

Greetings,

I finally updated my Commentics installation from 2.5.

The new integration code changed, and it LOOKS like I have to specify a unique page identifier now.

Before, I used:

$cmtx_identifier = 'cmtx_filename';
$cmtx_reference  = 'cmtx_filename';

...now, this doesn't work.  I don't use a CMS so I don't have database rendered pages.  I do have a lot of articles, and it would take me a very long time to edit each php file and change the identifier.

Is there a work-around like there was in version 2.5?

Thanks!
Reply
#2

Hi Jzn33 I'll take a look at this later today.

Have you completed the interview?
Reply
#3

So the best solution here is to do a global search-and-replace on your site's files. If they're all in the same directory then restrict the search-and-replace to only that directory. Any half decent code editor has a feature like this. Notepad++ is one example. In Notepad++ you go to 'Search -> Find in Files' and hit the 'Replace in Files' button. You'll need to do it two times.

First Time

Search:
PHP Code:
<?php 
$cmtx_identifier
= 'cmtx_filename';

Replace:
PHP Code:
<?php 
$cmtx_identifier
= $_SERVER['SCRIPT_NAME'];

Second Time

Search:
PHP Code:
<?php 
$cmtx_reference  
= 'cmtx_filename';

Replace:
PHP Code:
<?php 
$cmtx_reference  
= basename($_SERVER['SCRIPT_NAME']);

Have you completed the interview?
Reply
#4

Greetings,

Thank you very much, this worked perfectly.  I didn't have to do a search and replace, as I add the the commentics code via a .php include, so the change was very simple.
Reply
#5

Hello Steven,

Since upgrading from 2.5 to 3.0, I 've been unable to connect with database. What I have is:

$cmtx_indentifier = 777

$cmtx_reference = Flee Babylon

Is that possibly my problem? Do I need to change them?
Reply
#6

Hi Gabe,

No they look fine.

When you say you're unable to connect with the database, can you describe what's happening? Is it connecting but you mean that it's not getting the comments on the page? Or is it not connecting at all? If so any error messages, white screen etc?

Have you completed the interview?
Reply
#7

All that I see is the php file without the comments
Reply
#8

(20-Jan-2018, 11:30 PM)Gabe Wrote:  All that I see is the php file without the comments

I found that I had the incorrect entry at $cmtx_folder

I am now able to connect to database
Reply
#9

Now that I'm able to connect to database, I have a couple of other issues.

The site is not able to navigate away from page 1. Also, the newest and the oldest options do not work (the date has been enabled).

Under "Permissions" (in admin panel) the following is marked as "Not Writable"

/commentics/system/modification/cache/

There is, however, no such folder named "cache"

Could these issues be related?
Reply
#10

Hi Gabe,

These issues are unrelated.

Can you set write permission on your /cache/ folder using your FTP application?

Can you provide a link to your site so I can look into the pagination and sort not working?

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 2 Guest(s)