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

Not reading page with variable in address
#11

It gives the specific ban reason in the admin panel in Manage -> Bans.

I'm sure you installed the add-on correctly. There are 3 files in the add-on. You just let them overwrite the 3 corresponding files in your installation. If you drag and drop the comments folder from the add-on onto the comments folder from the installation then it will do it all automatically.

I guess I don't understand your problem properly.

The Preserve Query add-on is just meant to keep all of the $_GET parameters in the URL. It should solve this part of your original post:

Quote:Also, upon submit, it goes to http://www.example.com/webpage.php#process instead of http://www.example.com/webpage.php?varia...1#process.

Also, from the other part of your original post, it seems that you want Commentics to load if ?variable=1 but not if ?variable=2.

But ?variable=1 and ?variable=2 don't have anything to do with Commentics. It's outside of its control. So I think any coding for events to do with that would need to be done outside of Commentics.

Ok I'll re-enable the merge feature.

Have you completed the interview?
Reply
#12

I got it working now. It does preserve the url, but the comments still appear on every page even with a different variable.
Quote:Also, from the other part of your original post, it seems that you want Commentics to load if ?variable=1 but not if ?variable=2.
Not quite, I want it to load in every ?variable=value. I handle the rest myself as to which ?variable=value is not displayed. What I wan...
Wait, actually, it seems that it is what I want... Only I want it to load regardless of value. I want Commentics to preserve the comments on each separate variable=value. So www.example.com/example.php?variable=1 shows comments with id 1, www.example.com/example.php?variable=2 shows comments with id 2, etc.

I confused myself when writing this post, so if you don't understand, I don't blame you.

I think what I want to achieve can be accomplished via
PHP Code:
<?php 
$comment_session_number
= '0';
if (isset(
$_GET['test']))
{
switch(
$_GET['test'])
{
case
'1':
$comment_session_number = '1';
break;
case
'2':
$comment_session_number = '2';
break;
case
'3':
$comment_session_number = '3';
break;
case
'4':
$comment_session_number = '4';
break;
case
'5':
$comment_session_number = '5';
break;
//etc.
}
}

$page_id = $comment_session_number;
$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
And then assign each www.example.com/exampl.php?variable=value a unique id. I'll test it to see if it works.

EDIT: I just tested it. Commentics doesn't allow you to assign a unique id to an url with a variable. That is, it lets you do that, but it assigns one only to the url without the variable.

EDIT2: Additionally, commenting on such a page results in a ban, thus the issue about the ban.
Maybe move this post into bugs? It's more of a bug than integration.
The add-on works. The issues I were having were because the id was of a page with a variable.

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

I see what you mean now. Commentics definitely wasn't written to work that way. It's meant to be used only with simple pages. I'll take a look at the script that you mentioned to see how they do it.

Edit:

I thought you might have had a parameter such as ?lang=en
The add-on would have dealt with that nicely.

Have you completed the interview?
Reply
#14

I just thought of a way that I can accomplish what I want, but it's impractical. It might give you some Ideas, Steven.
I can create different pages(without variables) and make them have their own comments. Then, i use the above code to take comment from that page and use the id of the created pages to display those comments in the page with variables. Not quite sure why, but it works(different pages can have the same comments in them).

EDIT: Actually, it only allows you to view the comments of another page. Commenting on a page other than the original results in a ban. I got the Idea from opening the example page included. It shows comments with id 1, but bans you if you comment, unless that page was specified with id 1. All ban reasons for the bans I mentioned are for incorrect referrers.

I'm giving you three guesses...
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by hentes
20-Dec-2016, 09:28 PM
Last Post by Koksi
22-Nov-2012, 03:19 PM
Last Post by Steven
15-May-2012, 11:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)