|
Page 1 of 1
|
jhl
Joined: March 2012
Posts: 51
|
 Way To Go?
This will be a long post, unfortunately, since I have quite a few questions.
Firstly, I am a professional programmer, and I've given some time already to the IP_201110224_13053b codebase designing a new theme for a wood working site "Arca di Legno" - look it up, I can't yet publish the link.
Beyond the theme, I've started to make some modifications (a bad habit I know) to the main codebase. At this point I'm wondering if I should be doing this on the Github, or with the new version 2.0 beta release.
Some of the code seems to be too related to previous themes, or improvable (albums and chat, for example).
I don't want to waste time (yours or mine) building something which can't easily be integrated into the current codebase.
In other respects I am very ignorant of IP in general, such as FAP - is there documentation somewhere? Is FAP the album system in 1.3?
I'm very impressed with this site, which is running 2.0 beta, so I'd like to move in that direction. Mighty Gorgon (Luca) runs the Arca di Legno site so perhaps this is possible.
TIA
John
|
#1 Wed 07 Mar, 2012 22:48 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
jhl
Joined: March 2012
Posts: 51
|
 Re: Way To Go?
My apologies for having to reply to myself, but I can no longer modify the original post.
I have now forked and installed the 2.0 codebase (from GitHub) which seems promising - there are many more blocks now than before - but there are still areas where minor improvements can be made. I can detail these in the relative forums later; Icy Phoenix customizations, Templates and styles, ecc.
Let me give three examples:
1. Currently there is no way for nested forums (two or three levels deep) to be displayed entirely in the forum page, yet this is a relatively simple modification - since the list is built that way in memory - requiring about half a dozen lines of code. Possibly no one else requires it, but I would imagine it could be posted as a patch.
2. Additional information for the templates. In some circumstances blocks may want to change their appearance depending on whether they are shown in a narrow column (left) or a wider column (center), perhaps using a different font size, or entirely different format. Another example would be for album pictures. Currently each picture is displayed in two rows per column, however some information in the first row is not (also) available in the second row - the thumbnail image for example. Since it is not possible to iterate two arrays at the same time in the template, the only solution is to repeat the data from the first row in the second. Again, I imagine this would be a patch. In reality one data array could be supplied to both iterators - I wonder why there were two in the first place...
On the same topic, there is an awful lot of redundant or repeated code to produce these data arrays; album_allpics.php and includes/album_mod/album_hierarchy_sql.php, refactoring using a function would help.
3. The Javascript code for Chat is still rather contorted - though functional. Functions used as closures (see ajaxpatterns.org / XMLHttpRequest_Call for more) plus a few helper functions would make this much more readable. Another patch for the default theme/template? I have also made modifications to return the updated session after an add, and to force a chat logout when the page is closed. This improves responsiveness. By sending back the list of user ids, the server can decide if it needs to send a new list or not. For small user lists this can reduce data traffic. Using a md5 hash would be even better, with no limit to the user list (now why didn't I think of that before?) Using JSON would also reduce the data traffic compared with XML.
What would be the 'official' patching process? GitHub pull requests? I won't have the time to be a permanent IP developer, but while I'm working on this new theme/template, I would like to be able to at least offer back some small improvements (if they be improvements, of course) as thanks for the software being available...
TIA
John
|
#2 Thu 08 Mar, 2012 23:48 |
|
Informpro 
Joined: October 2008
Posts: 1110
Location:
|
 Re: Way To Go?
Hi,
I thought I replied, but apparently I didn't ...
What you say is right, but I just want to point something on 3) : this is _really_ old code. Of course it's bad, and we should probably rewrite it from scratch - using jQuery, in example. Album also must be rewrite from scratch, but it's not in high priority, since it "works".
And yes, using Github is definitely the right way.
|
#3 Fri 09 Mar, 2012 18:13 |
|
portalpez 
Joined: May 2007
Posts: 197
Location:
|
 Re: Way To Go?
Hello jhl,
Thanks you for join to this project. I am so glad you join. Any help is little in this great project
Thanks you.
|
#4 Sat 10 Mar, 2012 14:18 |
|
jhl
Joined: March 2012
Posts: 51
|
 Re: Way To Go?
Hi,
I thought I replied, but apparently I didn't ...
What you say is right, but I just want to point something on 3) : this is _really_ old code. Of course it's bad, and we should probably rewrite it from scratch - using jQuery, in example. Album also must be rewrite from scratch, but it's not in high priority, since it "works".
Yep, jQuery reduces the code overhead dramatically. Even though it is old code, *someone* is adding to it - sound, chatroom?
And yes, using Github is definitely the right way.
Pushing furiously...
Hello jhl,
Thanks you for join to this project. I am so glad you join. Any help is little in this great project
Thanks you.
Thank me if and when I get anything done. Since my priorities differ from others, probably I'll add to chat and albums - only because I need to make some modifications to the core code. If these modifications pass ratification, then I'll be happier, because I hate working with a forked and modified codebase...
My help will probably be temporary, I also have a life that I'm trying to lead...
John
|
#5 Sat 10 Mar, 2012 19:46 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: Way To Go?
Welcome to Icy Phoenix John.
Thank you very much for your suggestions, I'll try to improve #1 with your suggested code on GIT, I'll check #2 even if I don't assure you I'm going to change anything there... and finally about #3, another coder was working on that... but unfortunately he stopped working on chat. If you have time, I can link you the work in progress so you can try to finish it.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#6 Tue 03 Apr, 2012 22:40 |
|
jhl
Joined: March 2012
Posts: 51
|
 Re: Way To Go?
Welcome to Icy Phoenix John.
Thank you very much for your suggestions, I'll try to improve #1 with your suggested code on GIT, I'll check #2 even if I don't assure you I'm going to change anything there... and finally about #3, another coder was working on that... but unfortunately he stopped working on chat. If you have time, I can link you the work in progress so you can try to finish it.
I have already changed #2, there are four template variables which are now in the second larger array. Git push soon when I'm happy with the results.
As for #3, I've seem most of the chatroom code in beta, but if there's more, then I'll be happy to at least take a look. I have a 'race' like condition with the Ajax - yes, even though JavaScript runs in a single thread - probably the async reponses. Once that's fixed, I'll push this stuff too.
As for block positions, I find the POSITION template variable fairly truthful, so I just check for 'left' or 'right', if it's neither, then I must be centre so I have more space
John
|
#7 Wed 04 Apr, 2012 00:55 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
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
|
|
|
|