• [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21) 4 0 5 1
Currently:  

Author Topic: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)  (Read 148063 times)

0 Members and 1 Guest are viewing this topic.

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: [MOD] AJAX Comments / Comments Rating v1.0.2 (2009-08-21)
« Reply #45 on: October 09, 2009, 02:28:01 AM »
Hi I like to this mod ignore the comments that are collapsed and show the default comments un-collapsed

for example in one image that show 5 comments per page when a comment its collapsed there are still five comments but one collapsed, I like to show 6 comments 5 un-collapsed and the one that its collapsed (hidden)
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] AJAX Comments / Comments Rating v1.0.2 (2009-08-21)
« Reply #46 on: October 16, 2009, 07:34:45 AM »
Hi v@no,

I installed it successfully. But only one thing, captcha image doesn't validate and check, which means i can submit blank or type wrongly and submit. It accepts. Which can be cost ? Is it because of i didn't install recaptcha mod right ? I check ajaxcomments.php and i saw the code there's about checking captcha which is like this

Code: [Select]
    if ($captcha_enable_comments && !captcha_validate($captcha)) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['captcha_required'];
      $error = 1;
    }

Other fields are working as normal, like headline, comment. Just that captcha ? Any idea what should i missing ? I am using latest version of 4images.

With Regards,

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] AJAX Comments / Comments Rating v1.0.2 (2009-08-21)
« Reply #47 on: October 16, 2009, 07:48:39 AM »
Make sure you test it as regular member or guest, NOT as admin


@live@ct:
it will be kind of difficult to do without proper database query...I'm clueless on how this can be done...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] AJAX Comments / Comments Rating v1.0.2 (2009-08-21)
« Reply #48 on: October 16, 2009, 07:54:22 AM »
oops .. no wonder, i am testing with admin :( . Sorry . Works Perfect !

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: [MOD] AJAX Comments / Comments Rating v1.0.1 (2009-01-21)
« Reply #49 on: December 14, 2009, 01:15:33 PM »

1- the comment text appears perfect for non-english but some texts (commentformmgs, comments:, joindate:, admin, edit, delete and username) appear like this "�������". the problem happens only after I go to another page or when I post new comments.


2- when I rate a comment (good or bad), the result does not appear instantly. I have to refresh the page. this problem DOES NOT happen if I rate after going to another page or after posting new comments.


I hope I can find solutions or hints.

thanks again

same problem here V@no....


I am pretty sure it's the issue with my code page... my database uses utf-8 and site uses cp1251... but how do you make them work together?...
« Last Edit: January 12, 2010, 12:04:50 AM by alekseyn1 »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] AJAX Comments / Comments Rating v1.0.2 (2009-08-21)
« Reply #50 on: December 14, 2009, 03:02:53 PM »
Redownload the package v1.0.3 and replace ajaxcomments.php
Hopefully it won't break anything for these who didn't have this problem...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: [MOD] AJAX Comments / Comments Rating v1.0.1 (2009-01-21)
« Reply #51 on: December 22, 2009, 12:14:56 AM »
Quote

Re-download the package and replace only ajaxcomments.php file.
Also, I've changed Step 7.6
Apparently InternetExplorer chokes when JS tries change innerHTML in a table, so you'll need add a SPAN or DIV around the table with {comments} tag.


Problem V@no... comments now get encoded into a diiferent encoding in the database... and this effects the display in my last comments MOD on the front page... screen attached...

could the rating of the comments function stay and can the posting be disabled through AJAX? would this be feasible?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] AJAX Comments / Comments Rating v1.0.3 (2009-12-14)
« Reply #52 on: December 22, 2009, 01:33:24 AM »
The problem is the javascript. It always sends data in UTF8 encoding, disregarding the encoding of the page it is running from.
Because of that 4images automatically encode everything into html entities...this was done to make most compatible with any encodings and any mysql encodings.
If you capture the data sent by javascript, then you'll see any non-latin letters converted into unicode code. for example word тест will be sent as %u0442%u0435%u0441%u0442
Also, if your site charset is different from the text a user input when using non-ajax post, then browser will still convert non-latin letters into unicode html entities (&#xxxx)...
So, if you try convert html entities into your charset, then text from other encoding that might be in the input will be garbage. That's why 4images doesn't even attempt convert html entites into a charset, which allows input any text in any encoding on pages with any charsets.

I think you'd better off (easier) fixing the home page comments code then trying mess with this nonsense...

P.S.
These encodings are such pain the crack...
let's all at last switch to a long-to-live UTF-32 that will be enough for all the languages and dialects including dead Maya language and get over with this!


[EDIT]
Found a solution, but only for PHP v4.3.0 or newer:

Updated to v1.0.4
Quote from: Changes in v1.0.4
- CHANGED: on servers with PHP v4.3.0 or newer with html_entity_decode enabled non-latin letters should be converted into proper charset.
To update - re-download ajaxcomments_v1.0.4.zip and replace ajaxcomments.php
« Last Edit: December 22, 2009, 04:03:21 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #53 on: December 24, 2009, 11:31:55 AM »
V@no, is there a way to disable AJAX comments (let the page refresh) but keep the AJAX comments ratings if you know what I mean...

I just have some functions that do not work with comment postings... but AJAX comment rating I would like to keep (otherwise I would have just uninstalled the MOD)...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #54 on: December 24, 2009, 02:56:16 PM »
Remove changes from steps 9 and 10
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #55 on: April 26, 2010, 06:31:52 AM »
working great!
« Last Edit: April 26, 2010, 06:41:59 AM by live@ct »
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline tikle

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #56 on: May 02, 2010, 09:00:14 PM »
hallo zusammen

hab diesen MOD installiert und seit dem funktioniert der hier nicht mehr:

[Mod] Mail Owner of image when Comment is Posted
http://www.4homepages.de/forum/index.php?topic=2705.0

weiss Jemand wie man beide MODs gleichzeitig zum laufen bringt?


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #57 on: May 02, 2010, 10:27:31 PM »
hallo zusammen

hab diesen MOD installiert und seit dem funktioniert der hier nicht mehr:

[Mod] Mail Owner of image when Comment is Posted
http://www.4homepages.de/forum/index.php?topic=2705.0

weiss Jemand wie man beide MODs gleichzeitig zum laufen bringt?

Do same modifications in ajaxcomments.php as in details.php
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kaachaya

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #58 on: May 04, 2010, 05:05:22 AM »
@ V@no!

Please help how do I remove this MOD. I have reversed the changes I made to details.php and main.php.

I get this error still "Parse error: syntax error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dharmaji/public_html/kaachaya.com/details.php  on line 430 "

How do I reverse the effects made by install_ajaxcomments.php ??? Thanks in advance for a quick solution!

This is my full details.php
« Last Edit: May 04, 2010, 07:08:07 AM by V@no »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« Reply #59 on: May 04, 2010, 07:06:15 AM »
Hello kaachaya, welcome to 4images forum.

The error you showed is due to error you've made when modified details.php (you should always do backup before you do any modifications, very good and helpful practice ;)) (attached fixed version, but if you didn't install any mods in that file, I'd advise you use unmodified version from 4images package instead)

As of install_ajaxcomments.php, that file only modifies database structure.
You'll need manually delete these changes or run this query in phpmyadmin:
Code: [Select]
ALTER TABLE `4images_comments`
  DROP `comment_rating`,
  DROP `comment_votes`,
  DROP `comment_rating_users`;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)