Community
Participate
Working Groups
Ian and i had a conversation about how the left hand news section will open a new browser when those links are part of the foundation site already. We should be staying in one browser as long as were on the eclipse.org site. The code at fault here is located in eclipse.org-common/system/rss.php, and it creates a target=_blank for each link, while this is useful for the Community News (right side) we should modify the behaviour of this to perform the right action. Since this is in eclipse.org-common when can we make this change. //Nathan
You can make the change whenever you want. It just won't be rolled out until the next release of Phoenix.
Created attachment 37649 [details] /eclipse.org-common/system
Above is a patch to fix this bug. I have added a string compare that will check to see if the url begins with http://www.eclipse.org and then adds a target="_blank" if it does not.
This patch assumes the links will be made to www.eclipse.org, and technically download.eclipse.org is local to us, and so is http://eclipse.org/. I'd suggest a regexp search for ^http:\/\/(.*).eclipse.org and also allow http://eclipse.org/ D.
I've changed this to // Added a regex string compare here to force the creation of a new window when the link exists outside of eclipse.org if (preg_match("^http:\/\/(.*)eclipse.org^", $item->link)) { $html .= "<a href=\"$item->link\">$item->title</a>"; } else { $html .= "<a href=\"$item->link\" target=\"_blank\">$item->title</a>"; } Which takes into account any url hose domain name ends in eclipse.org
Created attachment 37653 [details] /eclipse.org-common/system
The above patch will consider the following link local: www.pluginsforeclipse.org hence the reason I suggested ^http:\/\/(.*).eclipse.org and also allow http://eclipse.org/ explicitly. D.
Before i make another change, i'd like to discuss the purpose of this change. This really comes down to not where the link is located but which news its in. When a peice of news is on the left side "Foundation News" then that link will always be on www.eclipse.org somewhere. When a peice of news is on the right side "Community News" then that link will always be outside www.eclipse.org So do we put in a filter such as above to do this or do we build a mechanism (read variable passed in a function) to determine this, eliminating the need for a regex statement and explicit check for http://eclipse.org Keep in mind that this issue will disappear in the near future once i have converted the RSS feeds to be read from a database rather then an XML file. Discuss.
*** Bug 141356 has been marked as a duplicate of this bug. ***
Since this was all revamped with the launch of the new homepage the way that news is displayed on the homepage has changed. I have updated this new method to cause links in the Community News section to open in a new browser (this includes eclipseplugincentral.com links in the plugin section) and to stay in the current browser when opening links from the Annoucements section. Marking this bug as fixed
> I have updated this new method to cause links in the Community News section to > open in a new browser (this includes eclipseplugincentral.com links in the > plugin section) and to stay in the current browser when opening links from the > Annoucements section. Correction i got my logic mixed up. Since www.eclipseplugincentral.com is considered part of eclipse.org those links open in the same window.