MyBB Community Forums

Full Version: Portal Welcome Block Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i was trying to add some of the portal welcome block functions to my welcome block header...

for example

<strong>&raquo;</strong> {$lang->new_announcements}

to display new announcements since last visit.. but it doesnt seem to work ... only displays >> and no text. is the code incomplete ?

i would think that it would work as the same code displays fine on the portal

thanks
Try this,
<strong>raquo</strong> {$lang->new_announcements}
What would that achieve?? Confused

I think I'm right in saying that language variables only work on certain pages, certain language files are called in certain .php files. For example, in portal.php, you'll see this:

// Load global language phrases
$lang->load("portal");

Which loads the portal language file... in memberlist.php, you'll see this:

// Load global language phrases
$lang->load("memberlist");

Which loads the memberlist language file. Because of that, if you use a language variable that hasn't been loaded for that page, it won't know what it means, so it's blank. This is untested, I don't really know how this works so this is an educated guess, but in global.php, find:

// Load language
$lang->set_language($mybb->settings['bblanguage']);
$lang->load("global");
$lang->load("messages");

and change it to:

// Load language
$lang->set_language($mybb->settings['bblanguage']);
$lang->load("global");
$lang->load("messages");
$lang->load("portal");

See what that does.
yea what i tried only gave me nothing or a word ... i thought that it might not load ... will try out what you said ..

as for the purpose just want to show how many new posts there are since last visit in the header welcome block Smile

that indeed does show the number of posts but its showing inbetween {} but any way doesnt matter ... not that important was just aimless...