Browse Source

refactor: variable forum URL

develop
Ezerous 2 years ago
parent
commit
b2657e5fe2
  1. 16
      app/src/main/AndroidManifest.xml
  2. 4
      app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarksActivity.java
  3. 3
      app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarksFragment.java
  4. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java
  5. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumFragment.java
  6. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/PrepareForReplyTask.java
  7. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java
  8. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java
  9. 4
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
  10. 25
      app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java
  11. 25
      app/src/main/java/gr/thmmy/mthmmy/model/ThmmyPage.java
  12. 2
      app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java
  13. 22
      app/src/main/java/gr/thmmy/mthmmy/session/SessionManager.java
  14. 2
      app/src/main/java/gr/thmmy/mthmmy/utils/networking/NetworkTask.java
  15. 244
      app/src/main/java/gr/thmmy/mthmmy/utils/parsing/ParseHelpers.java
  16. 2
      app/src/main/res/layout/activity_login.xml
  17. 5
      app/src/main/res/values/strings.xml

16
app/src/main/AndroidManifest.xml

@ -54,19 +54,21 @@
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data android:host="@string/forum_host" />
<data <data
android:host="thmmy.gr" android:host="@string/forum_host"
android:scheme="http" /> android:scheme="http" />
<data <data
android:host="www.thmmy.gr" android:host="@string/forum_host"
android:scheme="http" />
<data
android:host="www.thmmy.gr"
android:scheme="https" /> android:scheme="https" />
<data android:host="@string/forum_host_simple" />
<data
android:host="@string/forum_host_simple"
android:scheme="http" />
<data <data
android:host="thmmy.gr" android:host="@string/forum_host_simple"
android:scheme="https" /> android:scheme="https" />
<data android:host="thmmy.gr" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity

4
app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarksActivity.java

@ -29,8 +29,8 @@ import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_TITLE;
import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_URL; import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_URL;
public class BookmarksActivity extends BaseActivity { public class BookmarksActivity extends BaseActivity {
private static final String TOPIC_URL = "https://www.thmmy.gr/smf/index.php?topic="; private static final String TOPIC_URL = forumUrl + "index.php?topic=";
private static final String BOARD_URL = "https://www.thmmy.gr/smf/index.php?board="; private static final String BOARD_URL = forumUrl + "index.php?board=";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {

3
app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarksFragment.java

@ -1,7 +1,6 @@
package gr.thmmy.mthmmy.activities.bookmarks; package gr.thmmy.mthmmy.activities.bookmarks;
import android.app.Activity; import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -18,8 +17,6 @@ import androidx.fragment.app.Fragment;
import java.util.ArrayList; import java.util.ArrayList;
import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.R;
import gr.thmmy.mthmmy.activities.LoginActivity;
import gr.thmmy.mthmmy.activities.board.BoardActivity;
import gr.thmmy.mthmmy.model.Bookmark; import gr.thmmy.mthmmy.model.Bookmark;
//TODO refactor using RecyclerView //TODO refactor using RecyclerView

2
app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java

@ -48,7 +48,7 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter.
* The key to use when putting download's title String to {@link DownloadsActivity}'s Bundle. * The key to use when putting download's title String to {@link DownloadsActivity}'s Bundle.
*/ */
public static final String BUNDLE_DOWNLOADS_TITLE = "DOWNLOADS_TITLE"; public static final String BUNDLE_DOWNLOADS_TITLE = "DOWNLOADS_TITLE";
private static final String downloadsIndexUrl = "https://www.thmmy.gr/smf/index.php?action=tpmod;dl;"; private static final String downloadsIndexUrl = forumUrl + "index.php?action=tpmod;dl;";
private String downloadsUrl; private String downloadsUrl;
private String downloadsNav; private String downloadsNav;
private String downloadsTitle; private String downloadsTitle;

2
app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumFragment.java

@ -199,7 +199,7 @@ public class ForumFragment extends BaseFragment {
//---------------------------------------ASYNC TASK----------------------------------- //---------------------------------------ASYNC TASK-----------------------------------
private class ForumTask extends NewParseTask<ArrayList<Category>> { private class ForumTask extends NewParseTask<ArrayList<Category>> {
private HttpUrl forumUrl = SessionManager.forumUrl; //may change upon collapse/expand private HttpUrl forumUrl = SessionManager.getForumUrl(); //may change upon collapse/expand
ForumTask(OnTaskStartedListener onTaskStartedListener, ForumTask(OnTaskStartedListener onTaskStartedListener,
OnNetworkTaskFinishedListener<ArrayList<Category>> onParseTaskFinishedListener) { OnNetworkTaskFinishedListener<ArrayList<Category>> onParseTaskFinishedListener) {

2
app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/PrepareForReplyTask.java

@ -61,7 +61,7 @@ public class PrepareForReplyTask extends AsyncTask<Integer, Void, PrepareForRepl
StringBuilder builtQuotes = new StringBuilder(); StringBuilder builtQuotes = new StringBuilder();
for (Integer postIndex : postIndices) { for (Integer postIndex : postIndices) {
request = new Request.Builder() request = new Request.Builder()
.url("https://www.thmmy.gr/smf/index.php?action=quotefast;quote=" + .url(BaseApplication.getForumUrl() + "index.php?action=quotefast;quote=" +
postIndex + ";" + "sesc=" + sc + ";xml") postIndex + ";" + "sesc=" + sc + ";xml")
.build(); .build();
try { try {

2
app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java

@ -45,7 +45,7 @@ public class ReplyTask extends AsyncTask<String, Void, Posting.REPLY_STATUS> {
.addFormDataPart("icon", "xx") .addFormDataPart("icon", "xx")
.build(); .build();
Request post = new Request.Builder() Request post = new Request.Builder()
.url("https://www.thmmy.gr/smf/index.php?action=post2") .url(BaseApplication.getForumUrl() + "index.php?action=post2")
.header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36") .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
.post(postBody) .post(postBody)
.build(); .build();

2
app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java

@ -91,7 +91,7 @@ public class UploadActivity extends BaseActivity {
public static final String BUNDLE_UPLOAD_CATEGORY = "UPLOAD_CATEGORY"; public static final String BUNDLE_UPLOAD_CATEGORY = "UPLOAD_CATEGORY";
public static final String firebaseConfigUploadsCoursesKey = "uploads_courses"; public static final String firebaseConfigUploadsCoursesKey = "uploads_courses";
private static final String uploadIndexUrl = "https://www.thmmy.gr/smf/index.php?action=tpmod;dl=upload"; private static final String uploadIndexUrl = forumUrl + "index.php?action=tpmod;dl=upload";
private static final String uploadedFromTHMMYPromptHtml = "<br /><div style=\"text-align: right;\"><span style=\"font-style: italic;\">uploaded from <a href=\"https://play.google.com/store/apps/details?id=gr.thmmy.mthmmy\">mTHMMY</a></span>"; private static final String uploadedFromTHMMYPromptHtml = "<br /><div style=\"text-align: right;\"><span style=\"font-style: italic;\">uploaded from <a href=\"https://play.google.com/store/apps/details?id=gr.thmmy.mthmmy\">mTHMMY</a></span>";
/** /**
* Request codes used in activities for result (AFR) calls * Request codes used in activities for result (AFR) calls

4
app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

@ -106,6 +106,8 @@ public abstract class BaseActivity extends AppCompatActivity {
private boolean isMainActivity; private boolean isMainActivity;
private boolean isUserConsentDialogShown; //Needed because sometimes onResume is being called twice private boolean isUserConsentDialogShown; //Needed because sometimes onResume is being called twice
protected static String forumUrl = BaseApplication.getForumUrl(); // For convenience
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -346,7 +348,7 @@ public abstract class BaseActivity extends AppCompatActivity {
if (sessionManager.isLoggedIn()) { if (sessionManager.isLoggedIn()) {
Intent intent = new Intent(BaseActivity.this, ProfileActivity.class); Intent intent = new Intent(BaseActivity.this, ProfileActivity.class);
Bundle extras = new Bundle(); Bundle extras = new Bundle();
extras.putString(BUNDLE_PROFILE_URL, "https://www.thmmy.gr/smf/index.php?action=profile"); extras.putString(BUNDLE_PROFILE_URL, forumUrl + "index.php?action=profile");
if (!sessionManager.hasAvatar()) if (!sessionManager.hasAvatar())
extras.putString(BUNDLE_PROFILE_THUMBNAIL_URL, ""); extras.putString(BUNDLE_PROFILE_THUMBNAIL_URL, "");
else else

25
app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java

@ -3,6 +3,7 @@ package gr.thmmy.mthmmy.base;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
@ -70,10 +71,27 @@ public class BaseApplication extends Application implements Executor{
private static float widthDp; private static float widthDp;
private static int widthPxl, heightPxl; private static int widthPxl, heightPxl;
private static String forumUrl;
private static String forumHost;
private static String forumHostSimple;
public static BaseApplication getInstance() { public static BaseApplication getInstance() {
return baseApplication; return baseApplication;
} }
public static String getForumUrl() {
return forumUrl;
}
public static String getForumHost() {
return forumHost;
}
public static String getForumHostSimple() {
return forumHostSimple;
}
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
@ -83,6 +101,11 @@ public class BaseApplication extends Application implements Executor{
if (BuildConfig.DEBUG) if (BuildConfig.DEBUG)
Timber.plant(new Timber.DebugTree()); Timber.plant(new Timber.DebugTree());
Resources resources = getApplicationContext().getResources();
forumUrl = resources.getString(R.string.forum_url);
forumHost = resources.getString(R.string.forum_host);
forumHostSimple= resources.getString(R.string.forum_host_simple);
//Shared Preferences //Shared Preferences
SharedPreferences sessionSharedPrefs = getSharedPreferences(getString(R.string.session_shared_prefs), MODE_PRIVATE); SharedPreferences sessionSharedPrefs = getSharedPreferences(getString(R.string.session_shared_prefs), MODE_PRIVATE);
SharedPreferences settingsSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences settingsSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
@ -157,7 +180,7 @@ public class BaseApplication extends Application implements Executor{
.addInterceptor(chain -> { .addInterceptor(chain -> {
Request request = chain.request(); Request request = chain.request();
HttpUrl oldUrl = chain.request().url(); HttpUrl oldUrl = chain.request().url();
if (Objects.equals(chain.request().url().host(), "www.thmmy.gr") if (Objects.equals(chain.request().url().host(), forumHost)
&& !oldUrl.toString().contains("theme=4")) { && !oldUrl.toString().contains("theme=4")) {
//Probably works but needs more testing: //Probably works but needs more testing:
HttpUrl newUrl = oldUrl.newBuilder().addQueryParameter("theme", "4").build(); HttpUrl newUrl = oldUrl.newBuilder().addQueryParameter("theme", "4").build();

25
app/src/main/java/gr/thmmy/mthmmy/model/ThmmyPage.java

@ -6,6 +6,7 @@ import java.util.Objects;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import gr.thmmy.mthmmy.base.BaseApplication;
import timber.log.Timber; import timber.log.Timber;
/** /**
@ -20,6 +21,14 @@ public class ThmmyPage {
@SuppressWarnings("unused") @SuppressWarnings("unused")
private static final String TAG = "LinkTarget"; private static final String TAG = "LinkTarget";
private static final String forumUrl = BaseApplication.getForumUrl();
private static final String forumHost = BaseApplication.getForumHost();
private static final String forumHostHttp = "http://" + forumHost;
private static final String forumHostHttps = "https://" + forumHost;
private static final String forumHostSimple = BaseApplication.getForumHostSimple();
private static final String forumHostSimpleHttp = "http://" + forumHostSimple;
private static final String forumHostSimpleHttps = "https://" + forumHostSimple;
/** /**
* An enum describing a link's target by defining the types:<ul> * An enum describing a link's target by defining the types:<ul>
* <li>{@link #NOT_THMMY}</li> * <li>{@link #NOT_THMMY}</li>
@ -142,9 +151,9 @@ public class ThmmyPage {
final String host = uri.getHost(); final String host = uri.getHost();
final String uriString = uri.toString(); final String uriString = uri.toString();
if (Objects.equals(uriString, "http://thmmy.gr") if (Objects.equals(uriString, forumHostSimpleHttp)
|| Objects.equals(uriString, "https://thmmy.gr")) return PageCategory.INDEX; || Objects.equals(uriString, forumHostSimpleHttps)) return PageCategory.INDEX;
if (Objects.equals(host, "www.thmmy.gr")) { if (Objects.equals(host, forumHost)) {
if (uriString.contains("topic=")) return PageCategory.TOPIC; if (uriString.contains("topic=")) return PageCategory.TOPIC;
else if (uriString.contains("board=")) return PageCategory.BOARD; else if (uriString.contains("board=")) return PageCategory.BOARD;
else if (uriString.contains("action=profile")) { else if (uriString.contains("action=profile")) {
@ -160,12 +169,12 @@ public class ThmmyPage {
return PageCategory.DOWNLOADS_FILE; return PageCategory.DOWNLOADS_FILE;
else if (uriString.contains("action=tpmod;dl")) else if (uriString.contains("action=tpmod;dl"))
return PageCategory.DOWNLOADS_CATEGORY; return PageCategory.DOWNLOADS_CATEGORY;
else if (uriString.contains("action=forum") || Objects.equals(uriString, "www.thmmy.gr") else if (uriString.contains("action=forum") || Objects.equals(uriString, forumHost)
|| Objects.equals(uriString, "http://www.thmmy.gr") || Objects.equals(uriString, forumHostHttp)
|| Objects.equals(uriString, "https://www.thmmy.gr") || Objects.equals(uriString, forumHostHttps)
|| Objects.equals(uriString, "https://www.thmmy.gr/smf/index.php")) || Objects.equals(uriString, forumUrl + "index.php"))
return PageCategory.INDEX; return PageCategory.INDEX;
Timber.v("Unknown thmmy link found, link: %s", uriString); Timber.v("Unknown thmmy link found, link: %s", uriString); //TODO: maybe report this?
return PageCategory.UNKNOWN_THMMY; return PageCategory.UNKNOWN_THMMY;
} }
return PageCategory.NOT_THMMY; return PageCategory.NOT_THMMY;

2
app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java

@ -171,7 +171,7 @@ public class NotificationService extends FirebaseMessagingService {
} }
//Builds notification //Builds notification
String topicUrl = "https://www.thmmy.gr/smf/index.php?topic=" + postNotification.getTopicId() + "." + postNotification.getPostId(); String topicUrl = BaseApplication.getForumUrl() + "index.php?topic=" + postNotification.getTopicId() + "." + postNotification.getPostId();
Intent intent = new Intent(this, MainActivity.class); Intent intent = new Intent(this, MainActivity.class);
Bundle extras = new Bundle(); Bundle extras = new Bundle();
extras.putString(BUNDLE_TOPIC_URL, topicUrl); extras.putString(BUNDLE_TOPIC_URL, topicUrl);

22
app/src/main/java/gr/thmmy/mthmmy/session/SessionManager.java

@ -18,6 +18,7 @@ import java.util.List;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import gr.thmmy.mthmmy.base.BaseApplication;
import gr.thmmy.mthmmy.utils.parsing.ParseException; import gr.thmmy.mthmmy.utils.parsing.ParseException;
import okhttp3.Cookie; import okhttp3.Cookie;
import okhttp3.FormBody; import okhttp3.FormBody;
@ -34,13 +35,14 @@ import timber.log.Timber;
*/ */
public class SessionManager { public class SessionManager {
//Generic constants //Generic constants
public static final HttpUrl indexUrl = HttpUrl.parse("https://www.thmmy.gr/smf/index.php?theme=4"); private final static String FORUM_URL = BaseApplication.getForumUrl();
public static final HttpUrl forumUrl = HttpUrl.parse("https://www.thmmy.gr/smf/index.php?action=forum;theme=4"); public static final HttpUrl indexUrl = HttpUrl.parse(FORUM_URL + "index.php?theme=4");
private static final HttpUrl loginUrl = HttpUrl.parse("https://www.thmmy.gr/smf/index.php?action=login2"); private static final HttpUrl forumUrl = HttpUrl.parse(FORUM_URL + "index.php?action=forum;theme=4");
public static final HttpUrl unreadUrl = HttpUrl.parse("https://www.thmmy.gr/smf/index.php?action=unread;all;start=0;theme=4"); private static final HttpUrl loginUrl = HttpUrl.parse(FORUM_URL + "index.php?action=login2");
public static final HttpUrl shoutboxUrl = HttpUrl.parse("https://www.thmmy.gr/smf/index.php?action=tpmod;sa=shoutbox;theme=4"); public static final HttpUrl unreadUrl = HttpUrl.parse(FORUM_URL + "index.php?action=unread;all;start=0;theme=4");
static final String baseLogoutLink = "https://www.thmmy.gr/smf/index.php?action=logout;sesc="; public static final HttpUrl shoutboxUrl = HttpUrl.parse(FORUM_URL + "index.php?action=tpmod;sa=shoutbox;theme=4");
static final String baseMarkAllAsReadLink = "https://www.thmmy.gr/smf/index.php?action=markasread;sa=all;sesc="; static final String baseLogoutLink = FORUM_URL + "index.php?action=logout;sesc=";
static final String baseMarkAllAsReadLink = FORUM_URL + "index.php?action=markasread;sa=all;sesc=";
private static final String guestName = "Guest"; private static final String guestName = "Guest";
//Response Codes - make sure they do not overlap with NetworkResultCodes, just in case //Response Codes - make sure they do not overlap with NetworkResultCodes, just in case
@ -190,6 +192,10 @@ public class SessionManager {
} }
//--------------------------------------- GETTERS ------------------------------------------------ //--------------------------------------- GETTERS ------------------------------------------------
public static HttpUrl getForumUrl() {
return forumUrl;
}
public String getUsername() { public String getUsername() {
return sessionSharedPrefs.getString(USERNAME, USERNAME); return sessionSharedPrefs.getString(USERNAME, USERNAME);
} }
@ -291,7 +297,7 @@ public class SessionManager {
if (elements.size() == 1) { if (elements.size() == 1) {
String link = elements.first().attr("href"); String link = elements.first().attr("href");
Pattern pattern = Pattern.compile("https://www.thmmy.gr/smf/index.php\\?action=profile;u=(\\d*);sa=showPosts"); Pattern pattern = Pattern.compile(FORUM_URL + "index.php\\?action=profile;u=(\\d*);sa=showPosts");
Matcher matcher = pattern.matcher(link); Matcher matcher = pattern.matcher(link);
if (matcher.find()) if (matcher.find())
return Integer.parseInt(matcher.group(1)); return Integer.parseInt(matcher.group(1));

2
app/src/main/java/gr/thmmy/mthmmy/utils/networking/NetworkTask.java

@ -57,7 +57,7 @@ public abstract class NetworkTask<T> extends ExternalAsyncTask<String, Parcel<T>
try { try {
response = sendRequest(BaseApplication.getInstance().getClient(), input); response = sendRequest(BaseApplication.getInstance().getClient(), input);
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, "Error connecting to thmmy.gr"); Timber.e(e, "Error connecting to forum!");
return new Parcel<>(NetworkResultCodes.NETWORK_ERROR, null); return new Parcel<>(NetworkResultCodes.NETWORK_ERROR, null);
} }
String responseBodyString; String responseBodyString;

244
app/src/main/java/gr/thmmy/mthmmy/utils/parsing/ParseHelpers.java

@ -9,13 +9,15 @@ import java.util.HashMap;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import gr.thmmy.mthmmy.base.BaseApplication;
/** /**
* This class consists exclusively of static classes (enums) and methods (excluding methods of inner * This class consists exclusively of static classes (enums) and methods (excluding methods of inner
* classes). It can be used to resolve a page's language and state or fix embedded videos html code * classes). It can be used to resolve a page's language and state or fix embedded videos html code
* and obfuscated emails. * and obfuscated emails.
*/ */
public class ParseHelpers { public class ParseHelpers {
private final static String FORUM_URL = BaseApplication.getForumUrl();
/** /**
* An enum describing a forum page's language by defining the types:<ul> * An enum describing a forum page's language by defining the types:<ul>
* <li>{@link #PAGE_INCOMPLETE}</li> * <li>{@link #PAGE_INCOMPLETE}</li>
@ -185,138 +187,138 @@ public class ParseHelpers {
* @return the base URL of the given topic * @return the base URL of the given topic
*/ */
public static String getBaseURL(String topicURL) { public static String getBaseURL(String topicURL) {
String forumUrl = "https://www.thmmy.gr/smf/index.php?"; String indexUrl = FORUM_URL + "index.php?";
Matcher baseUrlMatcher = Pattern.compile("topic=[0-9]+").matcher(topicURL); Matcher baseUrlMatcher = Pattern.compile("topic=[0-9]+").matcher(topicURL);
if (baseUrlMatcher.find()) if (baseUrlMatcher.find())
return forumUrl + topicURL.substring(baseUrlMatcher.start(), baseUrlMatcher.end()); return indexUrl + topicURL.substring(baseUrlMatcher.start(), baseUrlMatcher.end());
else return ""; else return "";
} }
public static String emojiTagToHtml(String emojiTagedString) { public static String emojiTagToHtml(String emojiTagedString) {
HashMap<Pattern, String> tagToHtmlMap = new HashMap<>(); HashMap<Pattern, String> tagToHtmlMap = new HashMap<>();
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":)"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/smiley.gif\" alt=\"Smiley\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":)"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/smiley.gif\" alt=\"Smiley\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(";)"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/wink.gif\" alt=\"Wink\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(";)"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/wink.gif\" alt=\"Wink\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":D"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/cheesy.gif\" alt=\"Cheesy\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":D"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/cheesy.gif\" alt=\"Cheesy\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(";D"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/grin.gif\" alt=\"Grin\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(";D"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/grin.gif\" alt=\"Grin\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("&gt;:("), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/angry.gif\" alt=\"Angry\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("&gt;:("), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/angry.gif\" alt=\"Angry\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":("), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/sad.gif\" alt=\"Sad\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":("), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/sad.gif\" alt=\"Sad\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":o"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/shocked.gif\" alt=\"Shocked\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":o"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/shocked.gif\" alt=\"Shocked\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("8))"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/cool.gif\" alt=\"Cool\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("8))"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/cool.gif\" alt=\"Cool\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":???:"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/huh.gif\" alt=\"Huh\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":???:"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/huh.gif\" alt=\"Huh\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":P"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/tongue.gif\" alt=\"Tongue\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":P"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/tongue.gif\" alt=\"Tongue\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-["), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/embarrassed.gif\" alt=\"Embarrassed\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-["), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/embarrassed.gif\" alt=\"Embarrassed\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-X"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/lipsrsealed.gif\" alt=\"Lips Sealed\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-X"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/lipsrsealed.gif\" alt=\"Lips Sealed\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-\\"), Pattern.MULTILINE), "<img src =\"https://www.thmmy.gr/smf/Smileys/default_dither/undecided.gif\" alt=\"Undecided\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-\\"), Pattern.MULTILINE), "<img src =\"" + FORUM_URL + "Smileys/default_dither/undecided.gif\" alt=\"Undecided\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-*"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/kiss.gif\" alt=\"Kiss\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":-*"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/kiss.gif\" alt=\"Kiss\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":'("), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/cry.gif\" alt=\"Cry\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":'("), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/cry.gif\" alt=\"Cry\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("&lt;3"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/heart.gif\" alt=\"heart\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("&lt;3"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/heart.gif\" alt=\"heart\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^locked^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/locked.gif\" alt=\"kleidaria\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^locked^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/locked.gif\" alt=\"kleidaria\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^rollover^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/roll_over.gif\" alt=\"roll_over\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^rollover^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/roll_over.gif\" alt=\"roll_over\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^redface^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/redface.gif\" alt=\"redface\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^redface^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/redface.gif\" alt=\"redface\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^confused^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/confused.gif\" alt=\"confused\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^confused^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/confused.gif\" alt=\"confused\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^innocent^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/innocent.gif\" alt=\"innocent\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^innocent^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/innocent.gif\" alt=\"innocent\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sleep^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/sleep.gif\" alt=\"sleep\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sleep^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/sleep.gif\" alt=\"sleep\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sealed^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/lips_sealed.gif\" alt=\"lips_sealed\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sealed^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/lips_sealed.gif\" alt=\"lips_sealed\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^cool^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/cool.bmp\" alt=\"cool\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^cool^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/cool.bmp\" alt=\"cool\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^crazy^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/crazy.jpg\" alt=\"crazy\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^crazy^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/crazy.jpg\" alt=\"crazy\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^mad^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/mad.jpg\" alt=\"mad\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^mad^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/mad.jpg\" alt=\"mad\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^wav^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/wav.gif\" alt=\"wav\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^wav^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/wav.gif\" alt=\"wav\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^binkybaby^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/binkybaby.gif\" alt=\"BinkyBaby\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^binkybaby^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/binkybaby.gif\" alt=\"BinkyBaby\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^Police^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/Police.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^Police^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/Police.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^dontknow^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/dontknow.gif\" alt=\"DontKnow\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^dontknow^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/dontknow.gif\" alt=\"DontKnow\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote(":angry4:"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/angry4.gif\" alt=\"angry4\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote(":angry4:"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/angry4.gif\" alt=\"angry4\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^angryhot^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/angry_hot.gif\" alt=\"angryAndHot\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^angryhot^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/angry_hot.gif\" alt=\"angryAndHot\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^angry^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/angry.gif\" alt=\"angry\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^angry^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/angry.gif\" alt=\"angry\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^fouska^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/foyska.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^fouska^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/foyska.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^nysta^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/nista.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^nysta^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/nista.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sfinaki^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/10_7_3.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sfinaki^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/10_7_3.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^banghead^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/BangHead.gif\" alt=\"bang_head\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^banghead^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/BangHead.gif\" alt=\"bang_head\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^crybaby^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/crybaby.gif\" alt=\"CryBaby\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^crybaby^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/crybaby.gif\" alt=\"CryBaby\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^hello^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/hello.gif\" alt=\"Hello\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^hello^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/hello.gif\" alt=\"Hello\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^jerk^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/jerk.gif\" alt=\"jerk\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^jerk^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/jerk.gif\" alt=\"jerk\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^nono^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/nono.gif\" alt=\"NoNo\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^nono^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/nono.gif\" alt=\"NoNo\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^notworthy^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/notworthy.gif\" alt=\"NotWorthy\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^notworthy^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/notworthy.gif\" alt=\"NotWorthy\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^off-topic^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/off -topic.gif\" alt=\"Off-topic\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^off-topic^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/off -topic.gif\" alt=\"Off-topic\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^puke^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/puke.gif\" alt=\"Puke\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^puke^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/puke.gif\" alt=\"Puke\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shout^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/shout.gif\" alt=\"Shout\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shout^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/shout.gif\" alt=\"Shout\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^slurp^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/slurp.gif\" alt=\"Slurp\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^slurp^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/slurp.gif\" alt=\"Slurp\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^superconfused^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/superconfused.gif\" alt=\"SuperConfused\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^superconfused^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/superconfused.gif\" alt=\"SuperConfused\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^superinnocent^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/superinnocent.gif\" alt=\"SuperInnocent\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^superinnocent^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/superinnocent.gif\" alt=\"SuperInnocent\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^cellPhone^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/cellPhone.gif\" alt=\"CellPhone\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^cellPhone^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/cellPhone.gif\" alt=\"CellPhone\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^idiot^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/idiot.gif\" alt=\"Idiot\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^idiot^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/idiot.gif\" alt=\"Idiot\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^knuppel^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/knuppel.gif\" alt=\"Knuppel\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^knuppel^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/knuppel.gif\" alt=\"Knuppel\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^tickedOff^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/tickedoff.gif\" alt=\"TickedOff\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^tickedOff^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/tickedoff.gif\" alt=\"TickedOff\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^peace^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/peace.gif\" alt=\"Peace\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^peace^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/peace.gif\" alt=\"Peace\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^suspicious^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/suspicious.gif\" alt=\"Suspicious\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^suspicious^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/suspicious.gif\" alt=\"Suspicious\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^caffine^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/caffine.gif\" alt=\"Caffine\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^caffine^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/caffine.gif\" alt=\"Caffine\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^argue^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/argue.gif\" alt=\"argue\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^argue^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/argue.gif\" alt=\"argue\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^banned2^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/banned2.gif\" alt=\"banned2\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^banned2^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/banned2.gif\" alt=\"banned2\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^banned^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/banned.gif\" alt=\"banned\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^banned^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/banned.gif\" alt=\"banned\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bath^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/bath.gif\" alt=\"bath\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bath^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/bath.gif\" alt=\"bath\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^beg^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/beg.gif\" alt=\"beg\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^beg^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/beg.gif\" alt=\"beg\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bluescreen^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/bluescreen.gif\" alt=\"bluescreen\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bluescreen^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/bluescreen.gif\" alt=\"bluescreen\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^boil^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/boil.gif\" alt=\"boil\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^boil^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/boil.gif\" alt=\"boil\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bye^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/bye.gif\" alt=\"bye\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bye^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/bye.gif\" alt=\"bye\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^callmerip^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/callmerip.gif\" alt=\"callmerip\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^callmerip^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/callmerip.gif\" alt=\"callmerip\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^carnaval^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/carnaval.gif\" alt=\"carnaval\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^carnaval^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/carnaval.gif\" alt=\"carnaval\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^clap^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/clap.gif\" alt=\"clap\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^clap^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/clap.gif\" alt=\"clap\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^coffepot^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/coffeepot.gif\" alt=\"coffepot\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^coffepot^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/coffeepot.gif\" alt=\"coffepot\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^crap^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/crap.gif\" alt=\"crap\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^crap^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/crap.gif\" alt=\"crap\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^curses^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/curses.gif\" alt=\"curses\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^curses^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/curses.gif\" alt=\"curses\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^funny^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/funny.gif\" alt=\"funny\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^funny^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/funny.gif\" alt=\"funny\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^guitar^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/guitar1.gif\" alt=\"guitar\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^guitar^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/guitar1.gif\" alt=\"guitar\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^kissy^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/icon_kissy.gif\" alt=\"kissy\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^kissy^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/icon_kissy.gif\" alt=\"kissy\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^band^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/band.gif\" alt=\"band\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^band^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/band.gif\" alt=\"band\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^ivres^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/ivres.gif\" alt=\"ivres\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^ivres^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/ivres.gif\" alt=\"ivres\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^kaloe^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/kaloe.gif\" alt=\"kaloe\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^kaloe^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/kaloe.gif\" alt=\"kaloe\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^kremala^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/kremala.gif\" alt=\"kremala\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^kremala^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/kremala.gif\" alt=\"kremala\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^moon^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/moon.gif\" alt=\"moon\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^moon^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/moon.gif\" alt=\"moon\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^mopping^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/mopping.gif\" alt=\"mopping\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^mopping^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/mopping.gif\" alt=\"mopping\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^mountza^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/mountza.gif\" alt=\"mountza\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^mountza^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/mountza.gif\" alt=\"mountza\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^pcsleep^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/pcsleep.gif\" alt=\"pcsleep\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^pcsleep^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/pcsleep.gif\" alt=\"pcsleep\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^pinokio^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/pinokio.gif\" alt=\"pinokio\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^pinokio^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/pinokio.gif\" alt=\"pinokio\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^poke^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/poke.gif\" alt=\"poke\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^poke^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/poke.gif\" alt=\"poke\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^seestars^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/seestars.gif\" alt=\"seestars\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^seestars^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/seestars.gif\" alt=\"seestars\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sfyri^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/sfyri.gif\" alt=\"sfyri\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^sfyri^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/sfyri.gif\" alt=\"sfyri\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^spam^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/spam2.gif\" alt=\"spam\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^spam^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/spam2.gif\" alt=\"spam\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^super^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/super.gif\" alt=\"super\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^super^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/super.gif\" alt=\"super\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^tafos^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/tafos.gif\" alt=\"tafos\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^tafos^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/tafos.gif\" alt=\"tafos\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^tomato^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/tomatomourh.gif\" alt=\"tomato\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^tomato^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/tomatomourh.gif\" alt=\"tomato\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^ytold^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/ytold.gif\" alt=\"ytold\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^ytold^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/ytold.gif\" alt=\"ytold\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^beer^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/beer2.gif\" alt=\"beer\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^beer^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/beer2.gif\" alt=\"beer\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^yue^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/yu.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^yue^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/yu.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^eatpaper^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/a-eatpaper.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^eatpaper^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/a-eatpaper.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^fritz^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/fritz.gif\" alt=\"ο fritz!!!\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^fritz^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/fritz.gif\" alt=\"ο fritz!!!\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^wade^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/wade.gif\" alt=\"o Wade!!!\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^wade^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/wade.gif\" alt=\"o Wade!!!\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^lypi^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/lypi.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^lypi^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/lypi.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^aytoxeir^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/megashok1wq.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^aytoxeir^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/megashok1wq.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^victory^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/victory.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^victory^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/victory.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^filarakia^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/filarakia.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^filarakia^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/filarakia.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^hat^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/bonjour-97213.gif\" alt=\"bonjour\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^hat^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/bonjour-97213.gif\" alt=\"bonjour\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^miss^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/curtseyqi9.gif\" alt=\"bonjour2\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^miss^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/curtseyqi9.gif\" alt=\"bonjour2\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^rolfmao^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/rofl.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^rolfmao^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/rofl.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^lock^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/locked.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^lock^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/locked.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^que^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/question.gif\" alt=\"question\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^que^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/question.gif\" alt=\"question\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shifty^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/shifty.gif\" alt=\"shifty\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shifty^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/shifty.gif\" alt=\"shifty\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shy^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/shy.png\" alt=\"shy\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shy^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/shy.png\" alt=\"shy\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^music_listen^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/music.gif\" alt=\"music_listenning\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^music_listen^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/music.gif\" alt=\"music_listenning\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bagface^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/shamed_bag.jpg\" alt=\"bag_face\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^bagface^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/shamed_bag.jpg\" alt=\"bag_face\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^rotate^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/rotfl.gif\" alt=\"rotation\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^rotate^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/rotfl.gif\" alt=\"rotation\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^love^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/love.jpg\" alt=\"love\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^love^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/love.jpg\" alt=\"love\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^speech^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/speech.gif\" alt=\"speech\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^speech^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/speech.gif\" alt=\"speech\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^facepalm^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/facepalm.gif\" alt=\"\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^facepalm^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/facepalm.gif\" alt=\"\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shocked^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/shocked.png\" alt=\"shocked\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^shocked^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/shocked.png\" alt=\"shocked\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^ex_shocked^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/extremely_shocked.png\" alt=\"extremely_shocked\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^ex_shocked^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/extremely_shocked.png\" alt=\"extremely_shocked\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^smurf^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/smurf.gif\" alt=\"smurf\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^smurf^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/smurf.gif\" alt=\"smurf\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^monster^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/monster.bmp\" alt=\"monster\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^monster^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/monster.bmp\" alt=\"monster\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^pig^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/noffe.gif\" alt=\"pig\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^pig^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/noffe.gif\" alt=\"pig\" border=\"0\">");
tagToHtmlMap.put(Pattern.compile(Pattern.quote("^lol^"), Pattern.MULTILINE), "<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/LoL.jpg\" alt=\"lol\" border=\"0\">"); tagToHtmlMap.put(Pattern.compile(Pattern.quote("^lol^"), Pattern.MULTILINE), "<img src=\"" + FORUM_URL + "Smileys/default_dither/LoL.jpg\" alt=\"lol\" border=\"0\">");
//Needs priority over the rest tags //Needs priority over the rest tags
final Pattern pattern = Pattern.compile(Pattern.quote("::)"), Pattern.MULTILINE); final Pattern pattern = Pattern.compile(Pattern.quote("::)"), Pattern.MULTILINE);
Matcher matcher = pattern.matcher(emojiTagedString); Matcher matcher = pattern.matcher(emojiTagedString);
emojiTagedString = matcher.replaceAll("<img src=\"https://www.thmmy.gr/smf/Smileys/default_dither/rolleyes.gif\" alt=\"Roll Eyes\" border=\"0\">"); emojiTagedString = matcher.replaceAll("<img src=\"" + FORUM_URL + "Smileys/default_dither/rolleyes.gif\" alt=\"Roll Eyes\" border=\"0\">");
for (Pattern patternKey : tagToHtmlMap.keySet()) { for (Pattern patternKey : tagToHtmlMap.keySet()) {
matcher = patternKey.matcher(emojiTagedString); matcher = patternKey.matcher(emojiTagedString);

2
app/src/main/res/layout/activity_login.xml

@ -31,7 +31,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:contentDescription="@string/thmmy_img_description" /> android:contentDescription="@string/mthmmy_logo" />
<Space <Space
android:layout_width="match_parent" android:layout_width="match_parent"

5
app/src/main/res/values/strings.xml

@ -1,5 +1,8 @@
<resources> <resources>
<string name="app_name">mTHMMY</string> <string name="app_name">mTHMMY</string>
<string name="forum_url">https://www.thmmy.gr/smf/</string>
<string name="forum_host">www.thmmy.gr</string>
<string name="forum_host_simple">thmmy.gr</string>
<!--Base Activity--> <!--Base Activity-->
<string name="login">Login</string> <string name="login">Login</string>
@ -26,7 +29,7 @@
<string name="no_unread_topics">No unread topics!</string> <string name="no_unread_topics">No unread topics!</string>
<!--Login Activity--> <!--Login Activity-->
<string name="thmmy_img_description">thmmy.gr</string> <string name="mthmmy_logo">mTHMMY</string>
<string name="hint_username">Username</string> <string name="hint_username">Username</string>
<string name="hint_password">Password</string> <string name="hint_password">Password</string>
<string name="btn_login">LOGIN</string> <string name="btn_login">LOGIN</string>

Loading…
Cancel
Save