vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=226914

Bounce 17 Nov 2009 21:47

Right... think i've sussed it,

I put in index which displayed it :) BUT.....

the rest of the links that were already there disappeared :(

anyway of keeping them and adding the drop down at the end of

* New Posts
* Private Messages
* FAQ
* Calendar
* Community
* Forum Actions
* Quick Links

thank you thou lynne :up:

BlackJacket 17 Nov 2009 22:54

Sorry, but where do i add this code to?

Thanks :)

EidolonAH 18 Nov 2009 00:20

Quote:

Originally Posted by NittoMOD (Post 1916192)
Sorry, but where do i add this code to?

Thanks :)

+1 here, do we just throw it in the navbar template then:confused:

DesignWerks 18 Nov 2009 00:37

Quote:

Originally Posted by Lynne (Post 1914740)
OK, I'll give you an example of what I did on my site and maybe it will help you figure out what you really want..

I have torrents offered on my site. I have a torrents.php page, and few forums for the torrents and some upload pages and stuff. So, I want to link to that page - torrents.php. So, I have "link.php" set to "torrents.php". And, I have THIS_SCRIPT defined as "TORRENTS" at the top of the torrents.php page. Since I also want it to show that link when they are in the two torrents forums, I included that in the condition also. So, I used this as my unique condition:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As for my "unique_name", I just used "torrents".

Is it possible to add a unique condition to a Section page? or barring that is there a way to use the page title, section title or SEO URL Alias perhaps? (sorry if this is obvious - I am new to php) I would like to have a section named "Marketplace" for information on my classifieds program. It's an important part of my site so needs to be more visable, plus I want to add external links to my classifieds pages for easier navigation.

I successfully created my new tab and named it Marketplace
link.php is set to "http://www.mydomain.com/content.php?2-Marketplace"
unique_name is Marketplace

taffy056 18 Nov 2009 00:47

Quote:

Originally Posted by NittoMOD (Post 1916192)
Sorry, but where do i add this code to?

Thanks :)

I think you must place the code into the plugin system at global_state_check , but I could be mistaken, truthfully I am a bit lost on this one lol

cellarius 18 Nov 2009 01:04

Lynne states where the code has to go - into a plugin at:
Quote:

Originally Posted by Lynne
hook location - global_state_check

Don't know how she could make that clearer ;)

Lynne 18 Nov 2009 01:09

Quote:

Originally Posted by hIBEES (Post 1916149)
Right... think i've sussed it,

I put in index which displayed it :) BUT.....

the rest of the links that were already there disappeared :(

anyway of keeping them and adding the drop down at the end of

* New Posts
* Private Messages
* FAQ
* Calendar
* Community
* Forum Actions
* Quick Links

thank you thou lynne :up:

If you want to just add to the submenu list that is there, then this is NOT the article for you. This article tells you how to add a whole TAB and then submenu links under it. If all you want is to add to the existing submenu, then I am pretty sure there are template_hooks to use.
Quote:

Originally Posted by NittoMOD (Post 1916192)
Sorry, but where do i add this code to?

Thanks :)

It goes into a plugin, as I said in my post. However, read what I wrote above... this article shows you how to add an entire tab - it isn't used to just add to an existing tab.
Quote:

Originally Posted by DesignWerks (Post 1916234)
Is it possible to add a unique condition to a Section page? or barring that is there a way to use the page title, section title or SEO URL Alias perhaps? (sorry if this is obvious - I am new to php) I would like to have a section named "Marketplace" for information on my classifieds program. It's an important part of my site so needs to be more visable, plus I want to add external links to my classifieds pages for easier navigation.

I successfully created my new tab and named it Marketplace
link.php is set to "http://www.mydomain.com/content.php?2-Marketplace"
unique_name is Marketplace

I haven't tried many other conditions with this. If you want to do it for a Section, then you would also have to modify the existing navbar to not show the Home tab when you are on that section, otherwise it isn't unique. Right now, the Home tab shows whenever you are in the CMS area of the site. So, you'd have to change that condition to say "in the CMS but NOT in section xx" otherwise both tabs will be highlighted and only one of the submenus will be shown. I'm not sure what the exact condition would be since I'm not that familiar with all the variable names used with the new CMS ($sectionid == 2 ?).

zbahadir 18 Nov 2009 01:50

Thanks Lynne,
http://www.bizimforumlar.com/vbtest/test.php

EidolonAH 18 Nov 2009 02:12

Quote:

Originally Posted by cellarius (Post 1916266)
Lynne states where the code has to go - into a plugin at:


Don't know how she could make that clearer ;)

Sure, if you understand it all to the level that Lynne does then that might be 'very' clear, but to persons like myself it meant absolutely nothing to me. Had we been directed to the plugin manager as a clear and helpful guide for the not so knowledgeable in vbulletin coding would have then we wouldn't have to ask such boring question would we. Seriously, I get sick to death of that sort of tone, why couldn't you have directed us to the plugin manager instead of giving us your sarcasm.

cellarius 18 Nov 2009 02:21

You do know what a smiliey is and means, do you? Now, if I wanted to be ironic or sarcastic about something, I'd point you to the Wikipedia article on emoticons. But I don't, however hard you try to misunderstand me :)

Lynne 18 Nov 2009 02:38

I added a bit more to the first post including the part about going to the Plugin Manager. However, this article really isn't for the total novice. You need to understand what a condition is and be able to write one.

Lionel 18 Nov 2009 08:16

I looked but did not find the answer. How do you add a phrase in this code for Sublink 1?

<li><a href="sublink1.php">SubLink 1</a></li>

I tried ' . $vbphrase['my_phrase'] .'
I tried {vb:rawphrase my_phrase}

never mind ... I needed to globalize it

EidolonAH 18 Nov 2009 08:42

What ever level we understand coding Lynne should not matter, I accept my understanding of coding needs improvement, but that's not the point. We are trying to get our heads around vB4, which is no walk in the park and we look to people like yourself for help. You do a fantastic amount of good here and I personally truly appreciate that, but clear and straight forward guides help more than being told we lack understanding.

To cellarius, I apologise, I find myself enduring a great deal of keyboard warriors here and there and I mistook your post as yet another jibe from another coward hiding behind a keyboard. Didn't mean to be offensive and I am sorry for offending you.

cellarius 18 Nov 2009 09:42

Neither did I want to mock you or anything, sorry for perhaps coming off like that - so, we're good here :)

Anyway, I really see where you are coming from, I learned a lot from tutorials like this very one. I understand what you mean, but it is always about finding a middle way in texts like this. There's some basics you need to build upon if you want to do some in-depth explaining, or the tutorials would get overly complex. There's other articles about the plugin system, and even a section in the manual. If one had to explain that every time again, the articles would be cluttered. Finding this middle way is not always easy, tho, and you won't be able to need everyones needs :o

Dave-ahfb 18 Nov 2009 15:24

How can we change the display order of the navbar. Meaning put new items(per this tutorial), so that they show between "blogs" and "whats new"


All times are GMT. The time now is 07:21.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.