Skip to content

Node.js based forum software built for the modern web

added relative_path to recent_replies and browsing users

Baris Soner Usakli43a1ce66a14e
diff --git a/public/src/forum/category.js b/public/src/forum/category.js
index 0472569989..c01a22b226 100644
--- a/public/src/forum/category.js
+++ b/public/src/forum/category.js
@@ -53,8 +53,8 @@ define(['composer'], function(composer) {
li.setAttribute('data-pid', posts[i].pid);
- li.innerHTML = '<a href="/user/' + posts[i].userslug + '"><img title="' + posts[i].username + '" style="width: 48px; height: 48px; /*temporary*/" class="img-rounded user-img" src="' + posts[i].picture + '" class="" /></a>' +
- '<a href="/topic/' + posts[i].topicSlug + '#' + posts[i].pid + '">' +
+ li.innerHTML = '<a href="' + RELATIVE_PATH + '/user/' + posts[i].userslug + '"><img title="' + posts[i].username + '" style="width: 48px; height: 48px; /*temporary*/" class="img-rounded user-img" src="' + posts[i].picture + '" class="" /></a>' +
+ '<a href="' + RELATIVE_PATH + '/topic/' + posts[i].topicSlug + '#' + posts[i].pid + '">' +
'<strong><span>'+ posts[i].username + '</span></strong>' +
'<p>' +
posts[i].content +
diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js
index 788a0c1718..0a64153249 100644
--- a/public/src/forum/topic.js
+++ b/public/src/forum/topic.js
@@ -406,10 +406,10 @@ define(['composer'], function(composer) {
var activeEl = $('.thread_active_users');
function createUserIcon(uid, picture, userslug, username) {
- if(!activeEl.find("[href='/user/"+ data.users[i].userslug + "']").length) {
+ if(!activeEl.find('[href="'+ RELATIVE_PATH +'/user/' + data.users[i].userslug + '"]').length) {
var userIcon = $('<img src="'+ picture +'"/>');
- var userLink = $('<a href="/user/' + userslug + '"></a>').append(userIcon);
+ var userLink = $('<a href="' + RELATIVE_PATH + '/user/' + userslug + '"></a>').append(userIcon);
userLink.attr('data-uid', uid);
var div = $('<div class="inline-block"></div>');