2009-06-10, 05:36 PM
Ok I've found a bug in here.
While testing MyDownloads (a plugin I am making) (which is not in the root of MyBB but under /mydownloads folder), I've found that the link to the private message and to the user who has sent me the private message, links to /mydownloads/private.php and /mydownloads/member.php..etc
In global.lang.php
Find:
Replace with:
In global.php find:
Replace with:
And in functions.php (we could fix it by editing init.php too)
Should be:
There might exist a better fix but this one works.
While testing MyDownloads (a plugin I am making) (which is not in the root of MyBB but under /mydownloads folder), I've found that the link to the private message and to the user who has sent me the private message, links to /mydownloads/private.php and /mydownloads/member.php..etc
In global.lang.php
Find:
$l['newpm_notice_one'] = "<strong>You have one unread private message</strong> from <a href=\"{1}\">{2}</a> titled <a href=\"private.php?action=read&pmid={3}\" style=\"font-weight: bold;\">{4}</a>";
Replace with:
$l['newpm_notice_one'] = "<strong>You have one unread private message</strong> from <a href=\"{1}\">{2}</a> titled <a href=\"{5}/private.php?action=read&pmid={3}\" style=\"font-weight: bold;\">{4}</a>";
In global.php find:
$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, get_profile_link($pm['fromuid']), htmlspecialchars_uni($pm['fromusername']), $pm['pmid'], htmlspecialchars_uni($pm['subject']));
Replace with:
$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, get_profile_link($pm['fromuid']), htmlspecialchars_uni($pm['fromusername']), $pm['pmid'], htmlspecialchars_uni($pm['subject']), $mybb->settings['bburl']);
And in functions.php (we could fix it by editing init.php too)
/**
* Get the profile link.
*
* @param int The user id of the profile.
* @return string The url to the profile.
*/
function get_profile_link($uid=0)
{
$link = str_replace("{uid}", $uid, PROFILE_URL);
return htmlspecialchars_uni($link);
}
Should be:
/**
* Get the profile link.
*
* @param int The user id of the profile.
* @return string The url to the profile.
*/
function get_profile_link($uid=0)
{
global $mybb;
$link = str_replace("{uid}", $uid, $mybb->settings['bburl'].'/'.PROFILE_URL);
return htmlspecialchars_uni($link);
}
There might exist a better fix but this one works.