|
Arbitrary ID (Outdated)
|
|
11-Aug-2010, 02:47 PM
Post: #1
|
|||
|
|||
|
Arbitrary ID (Outdated)
There have been a few questions as to arbitrary IDs. I decided to make an add-on for this very purpose. You can find a packaged version here: http://www.commentics.org/add-ons.php#arbitrary_id
PHP Code: /************************************************** ARBITRARY ID **************************************************/All this does is check the database for any page which has a custom id or url of the current page, and adds a new page if there isn't one. The downside is that you'll need to either set the reference manually yourself later, or modify $arbitrary_id_reference to hold a variable value which will set the reference automatically, such as PHP Code: $arbitrary_id_reference = $_GET['page_title']; There is one thing you need to know about arbitrary IDs, however. If someone decides to play around with the url, then that page will also be added. This is normal behavior. For example, look at a different comment script with built-in arbitrary IDs: http://www.gentlesource.com/comment-script/ Go to the front-end demo, and add something like "?add_an_extra_page=true" to the end of the url. Comment on that page, and it'll work. If you need convincing, you can go to the back-end. Sorry if I counter-advertised, I wouldn't recommend that script anyway. It looks nice, but it has some bugs, and adds a footer which doesn't look good on dark backgrounds. I've also found it to crash my site by adding alt codes (alt+num-8) to a comment. Commentics has much more features, and bans. In order to prevent that from happening, you should add a strict check in front of your include script. Code can be found here: http://www.commentics.org/forum/showthre...612#pid612 The only other thing is that you need to change the include script to be PHP Code: $page_id = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];ENJOY !
I'm giving you three guesses... |
|||
|
11-Aug-2010, 10:27 PM
Post: #2
|
|||
|
|||
|
RE: Arbitrary ID
I have just identified a possible security threat for this code. It is recommended to not yet use it. More info on the threat can be found here: http://seancoates.com/blogs/xss-woes
I'll try to find a fix as soon as possible. The issue has now been fixed. It is safe to download and use this code, including the source above. I'm giving you three guesses... |
|||
|
13-Aug-2010, 11:10 PM
Post: #3
|
|||
|
|||
|
RE: Arbitrary ID
New update:
Added a line of code to make it possible to disable the add-on in certain pages. New code: PHP Code: /************************************************** ARBITRARY ID **************************************************/To disable it, simply add PHP Code: define ('ARBITRARY_ID_DISABLED','true'); //disable arbitrary id add-on PHP Code: define ('IN_COMMENTICS', 'true'); //no need to edit this line I'm giving you three guesses... |
|||
|
17-Aug-2010, 07:45 PM
Post: #4
|
|||
|
|||
|
RE: Arbitrary ID
Found a problem with the add-on. It registers "http://www.example.com/page.php" and "http://example.com/page.php" as two different pages. I'll fix that in the next version.
I'm giving you three guesses... |
|||
|
17-Aug-2010, 08:10 PM
Post: #5
|
|||
|
|||
|
RE: Arbitrary ID
I imagine you have a similar problem with domain.com/ and domain.com/index.php.
Have you completed the interview? |
|||
|
17-Aug-2010, 08:16 PM
Post: #6
|
|||
|
|||
|
RE: Arbitrary ID
Yeah, but I think that mine is much easier to fix. I'm almost done already.
For now, if anyone is having trouble with the script, add a redirect(VIA .htaccess) to your site with www in front of it. Example: Code: Options +FollowSymLinks I'm giving you three guesses... |
|||
|
17-Aug-2010, 10:02 PM
Post: #7
|
|||
|
|||
|
RE: Arbitrary ID
Another solution is replacing $_SERVER['HTTP_HOST'] with "www.yoursite.com" in the add-on, and in the include script. This means that you don't have to use .htaccess for this. I'm working on another solution right now.
I'm giving you three guesses... |
|||
|
13-Jan-2011, 02:23 PM
Post: #8
|
|||
|
|||
|
weired pages in Manage Pages
I post this as new thread , as the original thread is almost FIXED
I wonder, why Commentics is catching the following pages I found them at ACP ---> Manage --> pages Code: http://falsafa.info/bonheur-c.php?test=1Where the errors.php file come from? I have no such page in my web site directory? I think Commentics should reject any non existent URL |
|||
|
13-Jan-2011, 03:07 PM
Post: #9
|
|||
|
|||
|
RE: Arbitrary ID
The above post has been moved here because it's a bug related to this add-on and not Commentics itself.
Have you completed the interview? |
|||
|
17-Jan-2011, 04:40 PM
Post: #10
|
|||
|
|||
|
RE: Arbitrary ID
sorry i get this problem
Fatal error: Call to undefined function sanitize() in /home/../public_html/comments/includes/commentics.php on line 51 in this line $current_page_url = sanitize($current_page_url,1,1,1); so can you help me to fix it .. thanx |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Auto Pages (Outdated) | Steven | 12 | 2,751 |
15-Mar-2011 01:32 PM Last Post: Steven |
|
| cmtx_latest_box (Outdated) | utaka | 3 | 1,416 |
31-Dec-2010 09:09 AM Last Post: Static |
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help

!

