XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Suggestion - Ability to add a link to Nav bar
Magnumxe
Member
***




Posts: 24
Registered: 9-19-2020
Member Is Offline


[*] posted on 9-20-2020 at 01:21 AM
Suggestion - Ability to add a link to Nav bar


A nice feature would be the ability for the Admin to add a few (I know the number and Size should be limited to not cause other issues from wrap around) links.

For instance, my forum https://www.daveschultz.com/forum/ is a subsite feature of the Main Site https://www.daveschultz.com

It would be nice to have the ability to add a link title Home , which has a destination of https://www.daveschultz.com/forum/
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 477
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 9-20-2020 at 01:24 AM


This is achievable through editing the config.php file, which has comments on how to do exactly that.



View user's profile View All Posts By User
Magnumxe
Member
***




Posts: 24
Registered: 9-19-2020
Member Is Offline


[*] posted on 9-20-2020 at 01:36 AM


Excellent - I'll check it out. That said, there is a percentage of admins who installed their forum with Installatron or Soflicious (or whatever their installers are) who might might be familiar with FTP and editing .php files. I'm sure can personally deal with adding my links to the navbar, but a tool to do it as as user interface might be a nice touch for a dream suggestion.
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 477
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 9-20-2020 at 02:05 AM


preview:



delete.png - 18kB
View user's profile View All Posts By User
Magnumxe
Member
***




Posts: 24
Registered: 9-19-2020
Member Is Offline


[*] posted on 9-20-2020 at 02:40 AM


Thanks for pointing me in the right direction

navbar.jpg - 114kB
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 477
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 9-20-2020 at 02:47 AM


I've added the request here too:

https://bugs.xmbforum2.com/view.php?id=606
View user's profile View All Posts By User
Magnumxe
Member
***




Posts: 24
Registered: 9-19-2020
Member Is Offline


yes.gif posted on 9-20-2020 at 08:25 PM
Suggestion for clarity


So yesterday, I added to two links to my navbar, by modifying the Config file. Today, I decided to add a third.

Code:
// Plugin Settings $i = 3; // Plugins are the links in the navigation part of the Header. Plugins built-in by default include Search, FAQ, Member List, Today's Posts, Stats and Board Rules. // To add extra plugins (links of your own), just edit the code between Start Plugin Code and End Plugin Code. If you with to add more than one, simply copy that block, paste it and add the second one. // Start Plugin code $plugname[$i] = 'Maniacal Ravings'; // This is the name of your plugin. eg. Avatar Gallery, TeddyBear, etc. $plugurl[$i] = 'https://www.daveschultz.com'; // This is the location, link, or URL to the plugin $plugadmin[$i] = false; // Is this plugin only for admins? Set to true if the plugin can only be seen/used by (super-)admins, false when it's can be used by anyone $plugimg[$i] = 'https://www.daveschultz.com/forum/images/demiZeJeans/top_bbrules.gif'; // This is the path (full URL) to the image to show in front of the text. $i++; // End plugin code. // Start Plugin code for plugin #2 $plugname[$i] = 'Big Kahuna Hosting'; // This is the name of your plugin. eg. Avatar Gallery, TeddyBear, etc. $plugurl[$i] = 'https://www.bigkahunahosting.com'; // This is the location, link, or URL to the plugin $plugadmin[$i] = false; // Is this plugin only for admins? Set to true if the plugin can only be seen/used by (super-)admins, false when it's can be used by anyone $plugimg[$i] = 'https://www.daveschultz.com/forum/images/demiZeJeans/top_bbrules.gif'; // This is the path (full URL) to the image to show in front of the text. $i++; // End plugin code for plugin #2 // Start Plugin code for plugin #3 $plugname[$i] = 'Old Hippies Ads'; // This is the name of your plugin. eg. Avatar Gallery, TeddyBear, etc. $plugurl[$i] = 'https://www.oldhippiesads.com/'; // This is the location, link, or URL to the plugin $plugadmin[$i] = false; // Is this plugin only for admins? Set to true if the plugin can only be seen/used by (super-)admins, false when it's can be used by anyone $plugimg[$i] = 'https://www.daveschultz.com/forum/images/demiZeJeans/top_bbrules.gif'; // This is the path (full URL) to the image to show in front of the text. $i++; // End plugin code for plugin #3 // To make multiple plugins, copy and paste this plugin-code, so you have multiple entries.


But it didn't show up. I read the instructions again (little spelling error "If you with" instead of wish) and I followed to a T.

I saw the line

$i = 1;


And wondered if that might have been needing to be changed to 3 - but I asked myself why two links showed when it was set to 1. I changed to t3 and Bingo.

I only wasted 5 minutes, where a pro might have known to do that without thinking - but then again a pure rookie might have spent an hour and given up. My point, is the next time you modify the config file for production, you might want to fix the typo and clarify changing that i=#number if you add more than the two provided.
View user's profile View All Posts By User
Magnumxe
Member
***




Posts: 24
Registered: 9-19-2020
Member Is Offline


[*] posted on 9-20-2020 at 08:30 PM


Also, is there a way to add a target new to those links?
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-19-2023 at 11:03 PM


The "$i = 1;" can stay that way. No need to change it, ever.

After every link you add, there's this statement "$i++;" which will increase the value of $i by 1.

Which means, that this is how it will be interpreted, automatically.


$plugname[1] = 'Maniacal Ravings'; // This is the name of your plugin. eg. Avatar Gallery, TeddyBear, etc.
$plugurl[1] = 'https://www.daveschultz.com'; // This is the location, link, or URL to the plugin
$plugadmin[1] = false; // Is this plugin only for admins? Set to true if the plugin can only be seen/used by (super-)admins, false when it's can be used by anyone
$plugimg[1] = 'https://www.daveschultz.com/forum/images/demiZeJeans/top_bbrules.gif'; // This is the path (full URL) to the image to show in front of the text.

$plugname[2] = 'Big Kahuna Hosting'; // This is the name of your plugin. eg. Avatar Gallery, TeddyBear, etc.
$plugurl[2] = 'https://www.bigkahunahosting.com'; // This is the location, link, or URL to the plugin
$plugadmin[2] = false; // Is this plugin only for admins? Set to true if the plugin can only be seen/used by (super-)admins, false when it's can be used by anyone
$plugimg[2] = 'https://www.daveschultz.com/forum/images/demiZeJeans/top_bbrules.gif'; // This is the path (full URL) to the image to show in front of the text.


$plugname[3] = 'Old Hippies Ads'; // This is the name of your plugin. eg. Avatar Gallery, TeddyBear, etc.
$plugurl[3] = 'https://www.oldhippiesads.com/'; // This is the location, link, or URL to the plugin
$plugadmin[3] = false; // Is this plugin only for admins? Set to true if the plugin can only be seen/used by (super-)admins, false when it's can be used by anyone
$plugimg[3] = 'https://www.daveschultz.com/forum/images/demiZeJeans/top_bbrules.gif'; // This is the path (full URL) to the image to show in front of the text.




Having all of those plugin-links open in a new window ... Edit this line in header.php
Code:
$pluglinks[] = $img.'<a href="'.$plugurl[$plugnum].'"><font class="navtd">'.$plugname[$plugnum].'</font></a>&nbsp;';




Oops ... Didn't see the date on this topic before answering :-/



View user's profile View All Posts By User

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 90.9% - SQL: 9.1%]