truefusion 3 Report post Posted January 28, 2010 I have been mostly waiting on the multiple RSS feeds before attempting any JavaScript with AJAX work. But the Konqueror alignment problem i was going to fix it using the JavaScript method that rvalkass referenced (the one that detects the user agent), since the site won't function without JavaScript anyway. Share this post Link to post Share on other sites
Tramposch 1 Report post Posted January 28, 2010 Which images are you referring to? As far as I'm aware it looks as it should, and all the required images (just three) are uploaded and working. It seems unnecessary to add other images for the rounded corners etc. when they are done using CSS. It's possible it's a problem with Konqueror's HTML rendering, but it's generally pretty good at following the standards.For interest, I've set the example site running through BrowserShots just to see if there are any other issues we need to address: http://browsershots.org/http:/www.rvalkask/gfxtrap-demo/ Like the orange line on each box, it doesnt extend to the very edge, and I think it should be at the very top of the box, rather than kinda a bit below the top, like a bit closer to the top so it doesnt seem s bulcky, and maybe smaller text. Gotta go can't type much.Get back to you tomorrow. Share this post Link to post Share on other sites
BuffaloHelp 24 Report post Posted January 28, 2010 Okay,Here are the RSS feeds for the followings:GFXTrap.com Updateshttp://forums.xisto.com/no_longer_exists/GFXTrap Sigs Showoffhttp://forums.xisto.com/topic/5-how-many-of-you-are-using-adsense-at-ur-site-post-comments/GFXTrap SOTWhttp://forums.xisto.com/topic/11-what-os/ Share this post Link to post Share on other sites
truefusion 3 Report post Posted January 30, 2010 I have attached the latest rough draft. It's not entirely complete yet and i wouldn't say it is entirely stable. Here are a few notes on this draft:  For starters, and perhaps most importantly, the current JavaScript code tends to make Google Chrome and Konqueror freeze up. I have not tested it on Internet Explorer or Safari (Webkit is based on KHTML and Google Chrome uses Webkit, so i'm exptecting it to freeze in Safari too), but it works fine in Opera and Firefox. Due to security implications of importing arbitrary code from external sources, browsers have prevented accessing external files through AJAX. For that reason i made a very simple PHP file, which is included in the archive, to get the RSS feed for us. This has made me consider whether or not to go all out PHP in retrieving and parsing the RSS feed or stick to how it is in this draft.  The drawback to going with PHP is that the user has to wait till the server has finished downloading all three RSS feeds before sending any data to the browser and it puts more load on the server. However, the benefit is that search engines would then be able to read the content from the RSS feeds. Of course, for JavaScript the pros and cons are in reverse. I could probably figure out a way to prevent certain browsers from freezing up when attempting to retrieve the RSS feeds, but if nothing works, that may be a deciding factor to switch to pure PHP for parsing the data.  I have yet to fix any alignment problems in Konqueror, especially since the current JavaScript freezes Konqueror, but will attempt after getting passed the freezing problem. Concerning the GUI i have made a slight modification, taking in what Tramposch suggested, making the headers stretch to the end of the containers.  Due to RSS feed limitations and forum restrictions, the previous idea of having the most recent posts and their topics has been dropped in favor of just the latest topics. The latest Showoff topics titles (at the bottom middle) when clicked on will show the topic's first post on the side container (bottom right)—this does not require any re-downloading of the content, as the content is saved by the browser. Likewise, the idea of having two buttons, "Submit Entry" and "View Entries" below the SOTW entries topic have been dropped for one single button which leads you to the topic. Also, the current SOTW winner, unless from now on a new topic is created with a specific keyword, say, "winner," then the only way to fill that part of the website is to manually edit a file on the server side, or we just drop the SOTW winner section altogether.  Current To-do: Fix freeze problem caused by the JavaScript.Fix any further alignment problems (e.g. in Konqueror)Add a button below the active showoff topic to provide a more obvious way of navigating to the topic.Consider other GUI improvements, especially the three buttons on the upper left.Comments? gfxtrap.zip Share this post Link to post Share on other sites
Tramposch 1 Report post Posted January 30, 2010 It looks good. I dont know any of the technical stuff behind it, but my only other comment about the GUI is the.. header, I think that is the correct term, could be maybe a bit higher with smaller text on it. Share this post Link to post Share on other sites
rvalkass 5 Report post Posted January 30, 2010 I've put the latest version up online: http://forums.xisto.com/no_longer_exists/ I have turned debugging on for the time being just to check why the data doesn't get loaded. Â My only worry is that it's always saying it can't load the content from the RSS feeds. This is not an issue running locally, which implies there is something specific in Xisto's PHP configuration that is preventing file_get_contents() from doing its job. Â Viewing the site locally, the news on the right hand side fills the screen vertically, pushing the three bottom boxes below the fold. A smaller font, less spacing, or a wider column would solve the issue, and I think it's important otherwise visitors may very well ignore everything that's getting pushed off the bottom. Â Konqueror unfortunately provides absolutely no help as to why it's crashing, and I can't find any specific help online. Using PHP to parse the data and AJAX to refresh it on the page could work to solve the issue, depending on exactly what is crashing Konqueror. As it crashes before all the data is displayed, it would suggest that it crashes parsing it at some point. Â There is also another small bug. The topic titled 'new' Soldier War Sig has no text displayed for its link. I assume this is due to the single quotes in the title. Share this post Link to post Share on other sites
truefusion 3 Report post Posted January 31, 2010 I've put the latest version up online: http://forums.xisto.com/no_longer_exists/ I have turned debugging on for the time being just to check why the data doesn't get loaded.  My only worry is that it's always saying it can't load the content from the RSS feeds. This is not an issue running locally, which implies there is something specific in Xisto's PHP configuration that is preventing file_get_contents() from doing its job. A 406 error, eh? Never ran into that error before. Will have to do some research on that. If there is no way around any security restrictions, then either this project will never be finished or OpaQue will have to take care of the rest. Viewing the site locally, the news on the right hand side fills the screen vertically, pushing the three bottom boxes below the fold. A smaller font, less spacing, or a wider column would solve the issue, and I think it's important otherwise visitors may very well ignore everything that's getting pushed off the bottom.I'll reduce the font size and some padding/margin. Konqueror unfortunately provides absolutely no help as to why it's crashing, and I can't find any specific help online. Using PHP to parse the data and AJAX to refresh it on the page could work to solve the issue, depending on exactly what is crashing Konqueror. As it crashes before all the data is displayed, it would suggest that it crashes parsing it at some point.After further testing, it turns out it is due to the function parseGFXTrapNews()—same goes for Google Chrome. I think it may be due to the for loop in trimDescription() not ending—though it should. However, even if parseGFXTrapNews() is commented out, the others barely work anyway.  There is also another small bug. The topic titled 'new' Soldier War Sig has no text displayed for its link. I assume this is due to the single quotes in the title.That i noticed too, but i only noticed it for Firefox; Opera displayed fine. It is probably due to how they both handle XML. For example, the CDATA comments found in the XML, Opera translated them into "<![CDATA[" while Firefox had them as "<!--[CDATA[". That was a bit annoying to work around since it was causing the browser to not display the description, but if i convert single and double quotes into HTML entities, that should solve the problem at least in Firefox—hopefully. Share this post Link to post Share on other sites
rvalkass 5 Report post Posted January 31, 2010 A 406 error, eh? Never ran into that error before. Will have to do some research on that. If there is no way around any security restrictions, then either this project will never be finished or OpaQue will have to take care of the rest.406 Not Acceptable. It should only get returned if you request data of a specific encoding or type, and the server returns something different. Most browsers and their JavaScript implementations will accept anything they receive though. The important PHP configuration variable, allow_url_fopen, is set to On for Xisto, so we should be able to use file_get_contents() with a URL perfectly fine. Oddly, commenting out the file_get_contents() line doesn't solve the issue. The problem seems to be caused by passing a variable via GET, as if you open get.php without any GET variables, it works fine (blank page, but no error). Adding any get variable, whether valid or not, causes a 406 error. Replacing the switch statement with a series of ifs doesn't solve the issue either. For some reason, that GET variable is causing a 406 error. The header shows encoding of iso-8859-1 but that shouldn't be a problem.  Date: Sun, 31 Jan 2010 10:21:46 GMT Server: Apache/1.3.41 (Unix) PHP/5.2.5 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1  406 Not Acceptable Update I've worked this out. Something is triggering a mod_security rule that causes the request to effectively be killed by the server. The browser doesn't get the response it wants and throws the rare 406 error. It's fixed by creating a .htaccess file with the following contents:  <IfModule mod_security.c>SecFilterEngine Off</IfModule> That, of course, disables mod_security for that folder and all sub-folders, which is not ideal. If I can find out which rule is being triggered then I can get that one ignored while keeping the rest of mod_security enabled. On to crashing Konqueror:  After further testing, it turns out it is due to the function parseGFXTrapNews()same goes for Google Chrome. I think it may be due to the for loop in trimDescription() not endingthough it should. However, even if parseGFXTrapNews() is commented out, the others barely work anyway.It is definitely due to the for loop which prevents it cutting off in the middle of words. For some reason, Konqueror never exits the loop (check it by making it alert each time it goes through the loop, it'll reach hundreds of characters). It seems to, at one point, receive a description of entirely null characters and never exits. Firefox (wrongly) treats a space and nothing as being the same character. You can fix the bug by replacing the trimDescription function with the following: function trimDescription(desc){ var descTmp = desc; descTmp = descTmp.replace(/<!\-?\-?\[CDATA\[/, ""); for(var i = 100; descTmp.charAt(i) != " " && descTmp.charAt(i) != ""; ++i); desc = descTmp; desc = desc.substr(0, i); desc += " ... "; return desc;} However, the content doesn't appear in certain sections, so there is another more fundamental bug in Konqueror. Latest version attached. gfxtrap.tar.gz Share this post Link to post Share on other sites
Tramposch 1 Report post Posted January 31, 2010 I just downloaded the most recent version.. Since im not the coding person I can't really give you input in all that you just said because I don't really understand.But as for GUI here is what I think:http://i.imgur.com/removed.pngI made an image to try to make it easily understandable. Great work so far everybody. Share this post Link to post Share on other sites
rvalkass 5 Report post Posted January 31, 2010 On Xisto it just hangs with no content being loaded: http://forums.xisto.com/no_longer_exists/Adding the .htaccess file I mentioned before fixes this issue. There must be something specific about the way Xisto has mod_security set up that prevents one domain (rvalkass.co.uk) requesting files from another (Xisto.com). For the time being this is the only solution I can see, as I assume the account this site will eventually be hosted on is a standard Xisto account.The AJAX on the page needs a way to tell if it is successful in getting content. If it fails after a few tries or a certain length of time, replace the "Retrieving..." message with something that lets the user know it has failed to get the content for whatever reason. Otherwise it just looks a bit odd...The Latest News certainly looks better with the smaller font, and the alignment issues are gone, along with Konqueror no longer crashing. We just need graphics for the three buttons on the left and a way to do the previous winning SOTW. Share this post Link to post Share on other sites
truefusion 3 Report post Posted January 31, 2010 For the never-ending loop, what i did to make it end was just check if the variable was longer than the length of the description, and if so, break out of the loop. Though that fixed the problem for KHTML-based browsers from "freezing," it introduced me to newer problems, not only for KHTML-based browsers but for Internet Explorer as well. For that reason, i decided to just let the PHP script to not only retrieve the RSS feed but to parse it as well, and work from there. Now everything seems to work no matter the browser. I've also fixed the alignment problem for Konqueror.I have made the headers shorter and the footer thinner too. I have installed mod_security for Apache on my local server, but that has not prevented the feeds from being downloaded, at least now that PHP is doing all the parsing (did not try it when JavaScript did all the parsing). Since i have made PHP do all the parsing, it should be able to work now on your Xisto-hosted account, rvalkass. I have attached the latest draft. Only thing missing now is the winner's slot, further testing, and any new GUI improvements.gfxtrap.zip Share this post Link to post Share on other sites
truefusion 3 Report post Posted January 31, 2010 On Xisto it just hangs with no content being loaded: http://forums.xisto.com/no_longer_exists/Adding the .htaccess file I mentioned before fixes this issue. There must be something specific about the way Xisto has mod_security set up that prevents one domain (rvalkass.co.uk) requesting files from another (Xisto.com). For the time being this is the only solution I can see, as I assume the account this site will eventually be hosted on is a standard Xisto account.After testing it out on my account it works fine without adding or editing any .htaccess files. Therefore the problem is specific to your account's settings—whatever that may be. Hopefully, GFXtrap.com isn't set up the same way your account is.The AJAX on the page needs a way to tell if it is successful in getting content. If it fails after a few tries or a certain length of time, replace the "Retrieving..." message with something that lets the user know it has failed to get the content for whatever reason. Otherwise it just looks a bit odd...The way it is set up now the JavaScript will do that if the parser returns data that has a length of 0. I'll re-add the error key to the AJAX function to see if it'll change anything. I suppose we could use your account to test if it does. Share this post Link to post Share on other sites
Tramposch 1 Report post Posted January 31, 2010 The comment I have now is.. I think there should be a reply.. or add comments button to the "Latest Sigs" box.Also of course the gui suggestions I made earlier :-p Share this post Link to post Share on other sites
rvalkass 5 Report post Posted January 31, 2010 After testing it out on my account it works fine without adding or editing any .htaccess files. Therefore the problem is specific to your account's settings?whatever that may be. Hopefully, GFXtrap.com isn't set up the same way your account is.Could it be set up differently per server? There are no other .htaccess files on my account above the directory containing the test site, so I can't see how it's anything specific that I may have done to my account. Our accounts are both hosted on different servers, so it is possible that they have been configured slightly differently. The GFXTrap domain is currently pointed to an account on the same server as yours, so we should be fine. I apologise for all the running around I've created Share this post Link to post Share on other sites
truefusion 3 Report post Posted January 31, 2010 Changes for this one include changing the headers from h2 to h3, reducing the height of the footer again, and adding a link to the topic for the active showoff topic. Only thing left now is to test out if the content will show something like "content could not be loaded" if nothing occurs, and perhaps come up with something for the three buttons. I think there should be a reply.. or add comments button to the "Latest Sigs" box.Unfortunately, due to RSS limitations a direct link to the "Add Reply" link of the forums could not be added since it requires us to know the forum's ID that the topic was started in, and only the topic's ID can be retrieved from the RSS feed.Could it be set up differently per server? There are no other .htaccess files on my account above the directory containing the test site, so I can't see how it's anything specific that I may have done to my account. Our accounts are both hosted on different servers, so it is possible that they have been configured slightly differently. The GFXTrap domain is currently pointed to an account on the same server as yours, so we should be fine. I apologise for all the running around I've created How do you figure out which server an account is hosted on?gfxtrap.zip Share this post Link to post Share on other sites