MyBB Community Forums

Full Version: Deleted "you last visited" part, still shows up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I went into global.php, I don't know much php, but I know how to read it fairly decent enough to edit it. I found the welcome message, and delete the last part of the string which it contained the "you last visited" part. It half worked and now it says "you last visited: {2}" what did I do wrong? Here's the full line after the edit: 
$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']));


Thanks.

Thanks.
(2014-10-27, 06:52 AM)ErraticFox Wrote: [ -> ]So I went into global.php, I don't know much php, but I know how to read it fairly decent enough to edit it. I found the welcome message, and delete the last part of the string which it contained the "you last visited" part. It half worked and now it says "you last visited: {2}" what did I do wrong? Here's the full line after the edit: 


$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']));


Thanks.

Thanks.

You can just remove the langauge from the language editor. It is a hella va lot easier.
you should not remove anything from the core files, really, as a general rule.
How would I go about doing that?
Hey you really should put the phpcode back in, that you deleted because you created a language error,
to edit your language, go here

http://YOURSITE.com/admin/index.php?modu...-languages
dear its very simple in which you just have to remove the code of you last visited. No need to edited language files, no need to edit any core files, just simple template edit.

I you can provide me with site URL or code of your welcomeblock_member template, I can help you.

but as you said that you know a bit of PHP that means you may be knowing bit of HTML as well, so select this word in your forum "you last visited" right click and inspect element, it will show you the code which is needed to be removed exactly and will also show you the template from which you need to remove it.

I hope this will solve your issue, if it does not, then please provide site URL and test account so you can be guided.
(2014-10-27, 08:34 AM)DotaInternational Wrote: [ -> ]dear its very simple in which you just have to remove the code of you last visited. No need to edited language files, no need to edit any core files, just simple template edit.

I you can provide me with site URL or code of your welcomeblock_member template, I can help you.

but as you said that you know a bit of PHP that means you may be knowing bit of HTML as well, so select this word in your forum "you last visited" right click and inspect element, it will show you the code which is needed to be removed exactly and will also show you the template from which you need to remove it.

I hope this will solve your issue, if it does not, then please provide site URL and test account so you can be guided.

Oh, ha ha! Really?
(2014-10-27, 08:34 AM)DotaInternational Wrote: [ -> ]dear its very simple in which you just have to remove the code of you last visited. No need to edited language files, no need to edit any core files, just simple template edit.

I you can provide me with site URL or code of your welcomeblock_member template, I can help you.

but as you said that you know a bit of PHP that means you may be knowing bit of HTML as well, so select this word in your forum "you last visited" right click and inspect element, it will show you the code which is needed to be removed exactly and will also show you the template from which you need to remove it.

I hope this will solve your issue, if it does not, then please provide site URL and test account so you can be guided.

It doesn't show the code because inspect element shows plain HTML and not PHP coding and I already know where it needs to be edited because it's a custom sidebar I am making and I do need to edit the language files because I'm using {$lang->welcome_back} which does not show the "last visit part" because it's a variable defined in the global.php. Am I not correct?
(2014-10-27, 06:52 AM)ErraticFox Wrote: [ -> ]but I know how to read it fairly decent enough to edit it

Well, not in this case. {2} is a replacement for the 3rd argument of $lang->sprintf() and since you removed it, it's just a text now. Thus you also need to edit the language string as Micheal said: https://github.com/mybb/mybb/blob/featur...ng.php#L34 To be more precise, you didn't even need to edit global.php - only the lang file.

And no, you can't do it in templates as suggested above.