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

Pagination (Arbitrary ID)
#11

(11-Jan-2011, 03:55 AM)Static Wrote:  I assume you use version 1.2, and not the beta. Can you explain how you implemented the arbitrary ID add-on? When switching pages, you forgot to mention that it shows the "No Comments" message. The bug is most likely a conflict with pagination. I suspect that you defined the following variable:
PHP Code:
<?php 
$arbitrary_id_reference
= '';//Your value/variable here
as "$_GET['p']". If so, try leaving it blank.The problem is still the same !!
Reply
#12

Please send me your /comments/ folder and a database export as a zip file attachment to the email address, (since removed), and I will take a proper look.

Have you completed the interview?
Reply
#13

Oh, right. The reference for those two pages is already set, so you'll have to manually delete them. I'm not sure you are using the add-on on that certain page. In that case, you can disable the add-on through the define statement in the include script (see here).

I'm giving you three guesses...
Reply
#14

(11-Jan-2011, 10:56 PM)Steven Wrote:  Please send me your /comments/ folder and a database export as a zip file attachment to the email address, (since removed), and I will take a proper look.

Sent !
Reply
#15

After taking a proper look at your database export, I now understand what is happening. I hope I can explain this clearly.

The Arbitrary ID add-on is treating the following URLs as different pages:

1. http://falsafa.info/cours2.php
2. http://falsafa.info/cours2.php?p=2
3. http://falsafa.info/cours2.php?p=3

All of the comments that have been submitted to the webpage cours2.php are stored as URL number one. This is normal so far. However when someone clicks on the pagination link to the second page (URL number 2) or third page (URL number 3), the Arbitrary ID add-on is using that URL as the Page ID and then searching for comments that are stored with that ID, number 2 or 3. There are no such comments so it displays the "No comments yet." message.

Solution: Ask Static to fix the Arbitrary ID add-on so that it treats URL number 2 and URL number 3 as URL number 1.

The add-on also needs to treat URLs with www and without www exactly the same because the URL, http://www.falsafa.info/cours2.php, is also in the table.

Static, perhaps the add-on could make use of the built-in clean_url() function? Also, maybe the add-on code should be placed below the 'error reporting' section.

This strange URL is there as well:
http://falsafa.info/./cours2.php

Have you completed the interview?
Reply
#16

Thanks Steven for taking time to look into my problem
Your explanation is clear, however I had not much to do except waiting for Static Angel
Reply
#17

Can you post your integration code.

Have you completed the interview?
Reply
#18

Well
every page is composed as follow

Code:
includes header.php
includes header2.php
Some contents
includes footer.php
in header.php, I've added:
Code:
<?php
session_start();
ob_start();
?>

in footer.php, I've added:
Code:
<?php
$page_id = "http://falsafa.info".$_SERVER['REQUEST_URI'];
$path_to_comments_folder = "commentics/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
?>
Reply
#19

Yeah, clean url could really help. Strange though, even when the add-on detects ?p=x as a seperate url, it still works for me (pagination and all). The odd thing in this case is that page 1 detects a page two and three, and displays them for pagination. The most baffling thing, however, is that I overlooked something like this.
I'll just make the new version only check for user-defined parameters in the url. For now, just delete the two pages (?p=2 and ?p=3) like I stated earlier to temporarily fix it.
(12-Jan-2011, 03:13 PM)Steven Wrote:  Solution: Ask Static to fix the Arbitrary ID add-on so that it treats URL number 2 and URL number 3 as URL number 1.
Open source at it's finest Tongue

The change is actually quite simple, expect something in a day or two if I'm busy. I already started when working with another partially related issue/request.

I'm giving you three guesses...
Reply
#20

While you're waiting for Static can you try making this change:
PHP Code:
<?php
$page_id
= "http://falsafa.info".$_SERVER['REQUEST_URI'];
$page_id = preg_split('/\?/', $page_id, 0, PREG_SPLIT_NO_EMPTY); $page_id = $page_id[0];
$path_to_comments_folder = "commentics/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
?>

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
08-Aug-2010, 07:13 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)