Posts: 535
Threads: 31
Joined: Jul 2010
Your custom IDs are wrong. You need to set them to be the exact same thing as the variable in the include script on the given page. That, unfortunately, means that you will have to either edit each custom id value manually, or delete all of the pages and start over again.
First, don't forget to change:
PHP Code:
<?php
$page_id = "http://www.yoursite.com".$_SERVER['REQUEST_URI'];
to actually have your site url (
http://www.provohappening.com)
Second, you have to have the custom id be the same thing as the page (in this case.)
I'm giving you three guesses...
Posts: 61
Threads: 3
Joined: Aug 2010
hmmm...
is it possible to pick up an comment page from the reference url?
so the $page_id is the refernce url in commentics instead of the custom id?
Posts: 535
Threads: 31
Joined: Jul 2010
You mean use the url instead of the custom ID?
If so, then yes, but it would require some changes to the code itself, and it would have the exact same effect as changing the custom id.
Why not try the first method again?
I'm giving you three guesses...
Posts: 61
Threads: 3
Joined: Aug 2010
That's true.
Is there a quick way of deleting all the comments pages?
Posts: 535
Threads: 31
Joined: Jul 2010
I've suggested a "checkmark" feature that would be selectable for things like mass deletion, but it hasn't been implemented yet.
If you have phpMyAdmin, you can do it through there. Note that this will delete all comments if you do it through the admin panel, but not through phpMyAdmin.
I'm giving you three guesses...
Posts: 61
Threads: 3
Joined: Aug 2010
So i've deleted the pages and the arbritary add-on is not adding any new ones.
Posts: 535
Threads: 31
Joined: Jul 2010
You did follow the instructions didn't you? Did you modify the correct lines? Is the variable correct?
I'm giving you three guesses...
Posts: 61
Threads: 3
Joined: Aug 2010
Here is the code that is implemented
commentics.php:
PHP Code:
<?php
if(!defined('ARBITRARY_ID_DISABLED')){
$current_page_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$current_page_url = sanitize($current_page_url,1,1,1);
$existing_pages = mysql_fetch_assoc(mysql_query("SELECT * FROM `".$mysql_table_prefix."pages` WHERE url = '$current_page_url'"));
$existing_custom_id = mysql_fetch_assoc(mysql_query("SELECT * FROM `".$mysql_table_prefix."pages` WHERE custom_id = '$current_page_url'"));
$arbitrary_id_reference = $current_page_url;//Your value/variable here
if($existing_pages['url']==null && $existing_custom_id['custom_id']==null) {
mysql_query("INSERT INTO `".$mysql_table_prefix."pages` (reference, url, is_form_enabled, dated, custom_id) VALUES ('$arbitrary_id_reference', '$current_page_url', 1, NOW(), '$current_page_url')");
}
}
and on list_of_restaurants_in_provo.php:
PHP Code:
<?php
$name = $row['Name'];
$page_id = "http://www.provohappening.com".$_SERVER['REQUEST_URI'];
$path_to_comments_folder = "comments/";
define ('IN_COMMENTICS', 'true'); //no need to edit this line
require $path_to_comments_folder . "includes/commentics.php"; //no need to edit this line