Jump to the post that solved this thread.
Solved: 4 Years, 7 Months, 4 Weeks ago Index Nav Bit Name --> Forums
#1
Solved: 4 Years, 7 Months, 4 Weeks ago
I've gotten to the point that I can change the nav bit names in most places, like I've changed Help Docs to Guides and Portal to Home.

BUTTTT for the life of me I can't find information on how to change on the index page to say:
Board Name > Forums

I looked in the index.lang and tried to add this in the top but it doesn't change anything:
$l['nav_index'] = "Forums";

Update, along with the above, I added this to index.php:
add_breadcrumb($lang->nav_index, "index.php");

So the index now shows that there is a bread crum BUT there is not name of 'Forums' behind it.


Attached Files Thumbnail(s)
   
Reply
#2
Solved: 4 Years, 7 Months, 4 Weeks ago
in this threads, your problem is solved
https://community.mybb.com/thread-207281.html

<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">Guides</a></li>
[Image: ziuma.jpg]    
Reply
#3
Solved: 4 Years, 7 Months, 4 Weeks ago
No it is not. This is a completely different issue than changing the nav bit names of the Help Documents.

I would not have posted this question if that answer had solved my issue for the index page too, trust me I tried. There needs to be one more step to finish my issue with the index page. It is missing a breadcrum name. I have tried adding one in like I had for the help docs but have no luck.

So, if anyone has an answer, this issue is NOT solved.

[Image: Capture.png]
Another Screenshot.
Reply
#4
Solved: 4 Years, 7 Months, 4 Weeks ago
do you want to change (Home) to Forums

admin control panel>> templates & style >> templates >> your templates (expand templates) >> navigation templates >> nav_bit_active

change
<a href="portal.php">Home</a>

with
<a href="portal.php">Forums</a>
[Image: ziuma.jpg]    
Reply
#5
Solved: 4 Years, 7 Months, 4 Weeks ago
No, I want the text "Forums" to appear after Elspeth when on the index page. Just as shown in the screenshot.

It is in the navbit. And I do know it will require edits to the core files.

I must not be explaining something correctly, THEREFORE I will start over from the beginning.

I am TRYING to add a navbit crum name to the index.php page. I want it to say "Board Name > Forums" so essentially it should say "Elspeth > Forums".

I followed instructions from where I had asked about changing the nav bit bread crum name on Help Documents to Guides which you can see here: https://community.mybb.com/thread-207281...pid1259205 

However this does not work for editing the index.php lang files or the like.

So far I have added this to the top of index.lang :
$l['nav_index'] = "Forums";
And then I added this to index.php :
add_breadcrumb($lang->nav_index, "index.php");

It ended up adding a {sep} after the inital "Elspeth" but it did not add "Forums" after the sep, which you can see here: https://s30.postimg.org/dz9kg38zl/Capture.png


SOOOOOOO what is the last step I am missing to add "Forums" behind that {sep} in the navbit breadcrums.
Reply
#6
Solved: 4 Years, 7 Months, 4 Weeks ago
Try it with my plugin: => https://community.mybb.com/mods.php?action=view&pid=588

No solution for you. Wink
Reply
#7
Solved: 4 Years, 7 Months, 4 Weeks ago
@SvePu

Is this so difficult that I need a plugin? I'd rather not continually install more and more plugins, I already have enough.

Do you perhaps have an answer on how to do this? Instead of downloading a plugin to do it for me? I'd really like to learn this stuff. Smile
Reply
#8
Solved: 4 Years, 7 Months, 4 Weeks ago
How you did it in your first post should be working - if you make sure to insert:
add_breadcrumb($lang->nav_index, "index.php");

after this in index.php:
// Load global language phrases
$lang->load('index');

Otherwise the language string "Forums" isn't loaded for the breadcrumb.
Reply
#9
Solved: 4 Years, 7 Months, 4 Weeks ago
You could edit the global.php core file:

Search (#940)
// Add our main parts to the navigation
$navbits = array();
$navbits[0]['name'] = $mybb->settings['bbname_orig'];
$navbits[0]['url'] = $mybb->settings['bburl'].'/index.php';

Replache all with:
// Add our main parts to the navigation
$navbits = array();
$navbits[0]['name'] = my_strpos($_SERVER['PHP_SELF'], 'index.php')?$mybb->settings['bbname_orig'].' > Forums':$navbits[0]['name'] = $mybb->settings['bbname_orig'];
$navbits[0]['url'] = $mybb->settings['bburl'].'/index.php';

But editing of core file it's only a brute force method.
Reply
#10
Solved: 4 Years, 7 Months, 4 Weeks ago
Thank you both for the answers!!

I ended up with doylecc's answer, I had actually added that line under
$plugins->run_hooks('index_start');

So I moved it to where you said and it now works beautifully! Crazy how just putting something in the wrong spot can make it not work. Don't y'all just love coding? xD

Thanks guys! Smile
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)