Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed RSSReader not working with FTB forum account links #848

Merged
merged 1 commit into from
Aug 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/main/java/net/ftb/data/Map.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,16 @@

import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;

import javax.imageio.ImageIO;

import net.ftb.data.events.MapListener;
import net.ftb.gui.LaunchFrame;
import net.ftb.gui.panes.MapUtils;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/net/ftb/data/ModPack.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@

import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import javax.imageio.ImageIO;

import com.google.common.collect.Maps;
import lombok.Getter;
import net.ftb.events.PackChangeEvent;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/net/ftb/data/TexturePack.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@

import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

import javax.imageio.ImageIO;

import com.google.common.collect.Lists;
import lombok.Getter;
import net.ftb.data.events.TexturePackListener;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/ftb/data/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import net.ftb.log.Logger;
import net.ftb.util.CryptoUtils;
import net.ftb.util.OSUtils;

public class User implements Serializable {
/**
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/ftb/data/news/NewsArticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public String getHTML() {
return "<p id=\"newsHeader\">- <a href=\"" + this.hyperlink + "\">" + this.title + "</a> </p>"
+ "<p id=\"newsBody\">" + this.body + "</p><br/>";
}

@Setter
@Getter
private String date;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/ftb/download/Locations.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public class Locations {
public static final String jreMac = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=87438";
public static final String jdkMac = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=87438";

// Feed URL
// Forum and Feed URL
public static final String forum = "http://forum.feed-the-beast.com/";
public static final String feedURL = "http://forum.feed-the-beast.com/forum/modpack-and-launcher-news.35/index.rss";

//folder constants all slashes must be web safe... replace w/ system slash on win
Expand All @@ -76,7 +77,6 @@ public class Locations {
public static final String MODPACKXML = "modpacks.xml";
public static final String THIRDPARTYXML = "thirdparty.xml";
public static final String TEXTUREPACKXML= "texturepack.xml";
public static final String NEWSUPDATEPHP = "http://launcher.feed-the-beast.com/newsupdate.php";
public static final String SUPPORTSITE = "http://support.feed-the-beast.com/";
public static final String FTBSITE = "http://www.feed-the-beast.com";

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/net/ftb/gui/panes/NewsPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import javax.swing.text.html.HTMLEditorKit;

import net.ftb.data.Settings;
import net.ftb.download.Locations;
import net.ftb.gui.LaunchFrame;
import net.ftb.util.NewsUtils;
import net.ftb.util.OSUtils;
Expand All @@ -52,7 +53,11 @@ public class NewsPane extends JPanel implements ILauncherPane {
@Override
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == EventType.ACTIVATED) {
OSUtils.browse(e.getURL().toString());
if(e.getDescription().substring(0, 7).equals("members")) {
OSUtils.browse(Locations.forum + e.getDescription());
} else {
OSUtils.browse(e.getDescription());
}
}
}
});
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/ftb/tracking/piwik/PiwikTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@

import java.awt.HeadlessException;
import java.awt.Toolkit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Random;
import java.util.UUID;
import java.util.Calendar;


public class PiwikTracker extends Thread {
private final String thingToTrack, urlFrom;
private String extraParamaters = new String();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/ftb/util/OSUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.security.CodeSource;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Map;

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/ftb/util/TrackerUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
*/
package net.ftb.util;

import lombok.Getter;
import lombok.Setter;
import net.ftb.data.Settings;
import net.ftb.log.Logger;
import net.ftb.main.Main;
import net.ftb.tracking.piwik.PiwikTracker;

import java.util.Map;
import java.util.Set;

public class TrackerUtils {
public static boolean googleEnabled = true;
Expand Down