Fix For "Ajax Like" (plus Some Other Features, Certainly)


Subject: Fix For "Ajax Like" (plus Some Other Features, Certainly)
Hey,

here's my fix for the "like this post" AJaX feature (and certainly other features).
I can't use git tool ATM, so I can't fix this through a new branch. Anyway, here's the way to fix it.

OPEN
Code: [Download] [Hide]
  1. templates/default/viewtopic_inc_js.tpl 

FIND
Code: [Download] [Hide]
  1. <!-- IF S_POSTS_LIKES --> 

AFTER, ADD
Code: [Download] [Hide]
  1. <script type="text/javascript" src="{FULL_SITE_PATH}{T_COMMON_TPL_PATH}js/ajax/ajax_core.js"></script> 


OPEN
Code: [Download] [Hide]
  1. templates/common/js/ajax/ajax_core.js 

FIND
Code: [Download] [Hide]
  1. var KEYUP_TIMEOUT = 500; 

AFTER, ADD
Code: [Download] [Hide]
  1. var ajax_page_charset = 'utf-8'; 


Please tell me if this fix worked for you :). (ofc, you need to enable "thanks", both the global switch and for the forum itself).

Profile PM  
Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
Thanks for reporting... I have fixed this differently.

Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
This is going to get into a mess if you two don't communicate the bugs and fixes you decide on before posting them. Otherwise we're going to get into a hell of a mess with constantly adding or removing things because one is doing it different to the other. :(

So MG, what's your fix for it? Because that's the one that will be regarded as the "Official" fix. ;)

Profile PM  
Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
mort wrote: [View Post]
This is going to get into a mess if you two don't communicate the bugs and fixes you decide on before posting them. Otherwise we're going to get into a hell of a mess with constantly adding or removing things because one is doing it different to the other. :(

So MG, what's your fix for it? Because that's the one that will be regarded as the "Official" fix. ;)

The fact is that we communicate via Instant Messenger and use GIT as "social coding" instrument.

This means that all code amendments are transparent to the world.

Maybe you are not used to it... but I would suggest to have a try.

Here is the link to latest commit with the fix:
Icy Phoenix 2.0 First Bugs Fixed

There is no need to discuss here, because all development discussions take place there, which is the proper place to do that.

Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
Hey mort,
I don't have "write" access to the IcyPhoenix repo. I'm just giving here the problems I've encountered so far, and how I've resolved it (I could do that in the repo's issues, but then nobody here would know how to fix it, since everything would be on github). Mighty Gorgon is the only one to decide how to fix it, There's too many things I don't know about the internals.

Profile PM  
Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
@MG

Mighty Gorgon wrote: [View Post]

The fact is that we communicate via Instant Messenger and use GIT as "social coding" instrument.


Sounds good - Leads to less confusion. :lcop:

Mighty Gorgon wrote: [View Post]

Maybe you are not used to it... but I would suggest to have a try.


I understand how GIT works and have applied all the patches that are currently there and also book-marked the url. ;)

Mighty Gorgon wrote: [View Post]

There is no need to discuss here, because all development discussions take place there, which is the proper place to do that.


I agree with the "Dev" discussions at GIT, but the "Natives" who are ONLY capable of using the front end of Icy Phoenix might disagree if the patches/fixes are not posted here ASAP - whether they be in the form of files or code strings. :P

@ Informpro

Informpro wrote: [View Post]
I'm just giving here the problems I've encountered so far, and how I've resolved it (I could do that in the repo's issues, but then nobody here would know how to fix it, since everything would be on github). Mighty Gorgon is the only one to decide how to fix it, There's too many things I don't know about the internals.


"There's too many things I don't know about the internals."

Hi Informpro,

Welcome to the Club! :mryellow:

I agree that bugs and fixes should be posted here as soon as possible, and in a way that the every-day-person understands how to go about applying them.

GITHUB is after all the programmers domain - and is not for the average user who needs step by step instructions.

And although I didn't see your fix posted on GITHUB - I'll apply it anyway.

Thanks! 8)

Profile PM  
Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
It's because Mighty Gorgon fixed it differently. I don't post snippets there, I'd chose to open a pull request if I had my computer but I can't do that with my iPhone.
MG's fix is here : https://github.com/MightyGorgon/icy...86deaa234486149 (only the last edit, on viewtopic.php)

Profile PM  
Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
Thanks,

So I just removed "your" fix.

Confusing - Isn't it? :LOL:

Profile PM  
Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
mort wrote: [View Post]
I agree with the "Dev" discussions at GIT, but the "Natives" who are ONLY capable of using the front end of Icy Phoenix might disagree if the patches/fixes are not posted here ASAP - whether they be in the form of files or code strings. :P

Well, this is arguable anyway. I used to release patches and releases very often in the past, trying to keep the system the most update possible. Only later I realized that some patches while apparently fixing some issues, were causing other issues elsewhere. I have then decided to update the package only after proper testing was performed. Of course you cannot be 100% sure either, but at least you minimize the problems that some "production" sites may have.

In other words, I would release immediately only patches which could be critical, while I would prefer to wait some time to test things properly for minor bugs (which affects only a small number of sites/features).

I agree on posting code snippets here... but only after the bug and the fix has been confirmed. I think the same practice is implemented in almost all projects.

Subject: Re: Fix For "Ajax Like" (plus Some Other Features, Certainly)
Mighty Gorgon wrote: [View Post]
In other words, I would release immediately only patches which could be critical, while I would prefer to wait some time to test things properly for minor bugs (which affects only a small number of sites/features).


Can't argue with that! :mryellow:

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.3089s (PHP: 6% SQL: 94%)
SQL queries: 29 - Debug Off - GZIP Enabled