Jump to content

Navigation Bar Links Support


Ryan Boyd

Recommended Posts

Just a quick suggestions, you should do one of the Stack form fields and save it as an array in the database. This way they can add as many as they would like. BUT this won't really be needed when 4.1 gets released since you can add as many links as you want to the menu. On the other hand it was a GREAT concept for your first plugin.

Here's an example:

$form->add( new \IPS\Helpers\Form\Stack( 'stack_name', \IPS\Settings::i()->settings_variable ? json_decode( \IPS\Settings::i()->settings_variable ) : array(), FALSE, array( 'placeholder' => 'First Link | http://example.com' ), NULL, NULL, NULL, 'stack_name' ) );

That's what I'd do, but its up to you.

For each value you can separate it with a (pipeline) or something so that way you can store the array like this

So First Link | http://example.com and Second Link | http://link.com turns into

array(
	[0] => array(
		'name' => 'First Link'
		'link' => 'http://example.com'
	)
	[1] => array(
		'name' => 'Second Link'
		'link' => 'http://link.com'
	)
)

If you need any help let me know!

Link to comment
  • 3 weeks later...
On 10/27/2015, 1:52:08, MOC said:

I installed the plugin, added two nav tabs, but they arent appearing.  Where are they supposed to appear?

My normal nav is HOME / Gallery / Chat.  Shouldnt they appear after that ?

 

It should appear, if it didn't, use support tools -> clear cache.

If it didn't work, try to re-install the plugin on 4.1.x.

 

On 11/3/2015, 11:24:08, sadams101 said:

Great plugin! No idea why IPB hasn't make it easier to add external links to their menu. 

It works great on the desktop version, but I do not see where the links show up in the mobile version...or do they work in the mobile version?

 

 

This plugin was made for Desktop version.

I'm still new to IPS coding :p

 

On 11/4/2015, 12:42:21, sadams101 said:

Thank you for pointing me to that...I've been playing around with it and they clearly didn't imagine that anyone would want their tabs/links in a particular order. Moving them around within the design box doesn't work either...very strange coding indeed.

 

Please read the description.

 

On 11/4/2015, 12:44:13, Hulu said:

I don't think it's messed up, I think the order of the menu is stored as cookies, or somehow... I haven't checked the source yet.

Update: Actually, I just tested this and it seems to be working just fine...

7lh5xwr.png

 

 

Just got my Mac back from maintenance, updated my IPS to 4.1.4 on localhost, plugin didn't work after I upgraded to IPS 4.1.4.

I had to clear cache -> install it again.

 

Let's hope IPS gives us some better documentation/API at least.

 

Best regards

UKF

Link to comment
  • 5 weeks later...

@UKF_HHA, is it possible to add more links other than the four? Like "add another link" option, so you can add more custom links besides the four? It would be a nice feature to add to this plugin in the future. Sort of like how the Navigation Menu for IP.Content was, where you add new links to the menu just by clicking on the option "add another link".

Link to comment
7 hours ago, Morisato said:

@UKF_HHA, is it possible to add more links other than the four? Like "add another link" option, so you can add more custom links besides the four? It would be a nice feature to add to this plugin in the future. Sort of like how the Navigation Menu for IP.Content was, where you add new links to the menu just by clicking on the option "add another link".

 

I will see what I can do, I have finals, then a semester break :(

And thank you for the feedback :)

 

Best regards

UKF

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...