MyBB Community Forums

Full Version: Where is {$folderlinks}?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,
I'm about to cry Undecided I spend more than 2hours to find where {$folderlinks} is located and edit it.

Why? I want to edit it:
[Image: e4cLW01.png]
I want (need) to add icons there.

I found {$folderlinks} in usercp_nav_messenger :
<tr>
	<td class="tcat">
		<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['usercppms']}.gif" id="usercppms_img" class="expander" alt="[-]"/></div>
		<div><span class="smalltext"><strong><i class="fa fa-envelope"></i> {$lang->ucp_nav_messenger}</strong></span></div>
	</td>
</tr>
<tbody style="{$collapsed['usercppms_e']}" id="usercppms_e">
	<tr><td class="trow1 smalltext"><a href="private.php?action=send" class="usercp_nav_item usercp_nav_composepm"><i class="fa fa-pencil-square-o"></i> {$lang->ucp_nav_compose}</a></td></tr>
	<tr>
		<td class="trow1 smalltext">
			{$folderlinks}
		</td>
	</tr>
	{$ucp_nav_tracking}
	<tr><td class="trow1 smalltext"><a href="private.php?action=folders" class="usercp_nav_item usercp_nav_pmfolders"><i class="fa fa-pencil-square-o"></i> {$lang->ucp_nav_edit_folders}</a></td></tr>
</tbody>

Where can find and edit it?
It's a variable in inc/functions_user.php:

$folderlinks .= "<div><a href=\"private.php?fid=$folderinfo[0]\" class=\"usercp_nav_item {$class}\">$folderinfo[1]</a></div>\n";

You can try editing the classes:
		if($folderinfo[0] == 4)
		{
			$class = "usercp_nav_trash_pmfolder";
		}
		else if($folderlinks)
		{
			$class = "usercp_nav_sub_pmfolder";
		}
		else
		{
			$class = "usercp_nav_pmfolder";
		}
Thank you for you reply!

I prefer do not play with this Toungue
I'll add content with CSS.

Solved.
(2014-06-10, 05:13 PM)Destroy666 Wrote: [ -> ]It's a variable in inc/functions_user.php:

$folderlinks .= "<div><a href=\"private.php?fid=$folderinfo[0]\" class=\"usercp_nav_item {$class}\">$folderinfo[1]</a></div>\n";

You can try editing the classes:
		if($folderinfo[0] == 4)
		{
			$class = "usercp_nav_trash_pmfolder";
		}
		else if($folderlinks)
		{
			$class = "usercp_nav_sub_pmfolder";
		}
		else
		{
			$class = "usercp_nav_pmfolder";
		}

Ok quick question. I made a custom template and I have included it in global through:
eval("\$inboxdetails = \"".$templates->get("inboxdetails")."\";");

Now, when I put "{$folderlinks}" in the custom template, nothing shows up. Why is that?
Because that's how PHP works. You can't use a locally defined variable in a globally called template.. http://php.net/manual/en/language.variables.scope.php