Icy Phoenix

     
 

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

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

Article
Reply with quote    Download Post  
Post 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).



 
Informpro - View user's profile Send private message  
Informpro [ Mon 30 Jul, 2012 13:44 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


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

Comments
Reply with quote    Download Post  
Post Re: Fix For "Ajax Like" (plus Some Other Features, Certainly) 
 
Thanks for reporting... I have fixed this differently.



 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Mon 30 Jul, 2012 21:26 ]
Reply with quote    Download Post  
Post 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.



 
mort - View user's profile Send private message  
mort [ Tue 31 Jul, 2012 03:26 ]
Reply with quote    Download Post  
Post 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.



 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Tue 31 Jul, 2012 09:30 ]
Reply with quote    Download Post  
Post 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.



 
Informpro - View user's profile Send private message  
Informpro [ Tue 31 Jul, 2012 10:43 ]
Reply with quote    Download Post  
Post 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.  

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.

@ 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!  

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!  



 
mort - View user's profile Send private message  
mort [ Tue 31 Jul, 2012 11:05 ]
Reply with quote    Download Post  
Post 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)



 
Informpro - View user's profile Send private message  
Informpro [ Tue 31 Jul, 2012 11:38 ]
Reply with quote    Download Post  
Post Re: Fix For "Ajax Like" (plus Some Other Features, Certainly) 
 
Thanks,

So I just removed "your" fix.

Confusing - Isn't it?  



 
mort - View user's profile Send private message  
mort [ Tue 31 Jul, 2012 12:10 ]
Reply with quote    Download Post  
Post 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.

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.



 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Tue 31 Jul, 2012 16:40 ]
Reply with quote    Download Post  
Post 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!  



 
mort - View user's profile Send private message  
mort [ Wed 01 Aug, 2012 00:53 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron