PDA

View Full Version : Created new page, need to preserve subnav links


seventhaxis
11-17-2014, 12:28 AM
site: www.parallaxgaming.com
new page: www.parallaxgaming.com/archives.php

I created an archive page (see above) for me to manually enter and keep track of posted news articles on our site by year. However, the subnav links do not match the homepage. I can make them match the forum root (e.g. new posts, private messages) by using the following code:

define('THIS_SCRIPT', 'index');

but I cannot make it keep the vB root subnav that you see on the homepage (not forums). What script do I need to define here to make it match the homepage? I tried vbcms (listed in content.php) but that did not work. I also tried a few others without much luck (news, home, etc).

John Lester
11-17-2014, 05:47 AM
Because things are done differently on the 4.1.x vs the 4.2.x we need to know which version of vB you are running.

ozzy47
11-17-2014, 09:12 AM
He is running 4.1.0

First thing I would do is upgrade to the latest 4.2.2 version, as the version you are running has security vulnerabilities.

seventhaxis
11-17-2014, 10:42 AM
Sorry, first opportunity to reply. Ozzy is right, we're running 4.1.10 -- we won't be updating however.

ozzy47
11-17-2014, 10:46 AM
Can I ask why is that? You would rather run a product with knows security vulnerabilities, versus one that has not had any known ones?

seventhaxis
11-17-2014, 10:54 AM
I don't want to upgrade because of styling issues. What security exploits are you referring to?

ozzy47
11-17-2014, 10:59 AM
There has been a number of security issues found in previous versions. You can read this for verification, https://vborg.vbsupport.ru/showthread.php?p=2519949#post2519949

seventhaxis
11-17-2014, 11:27 AM
I currently have the API globally disabled. Why would this specific exploit affect me? I'll have to revisit the idea of updating but I still want to know how to address this issue, even only for my own knowledge.

Lynne
11-17-2014, 04:54 PM
Your version doesn't have the Navigation Manager, right? And when you go to the Archive page (which you seem to have removed), does it have it's own Nav Tab that becomes active and you want to add the sub-nav stuff under that? If so, I think you need a plugin to do that.

seventhaxis
11-17-2014, 05:33 PM
Yes, no nav manager. I'm using your tutorial actually to create new pages. I want to use the default sub-navtabs that I have listed on the main CMS page (/content.php, e.g. Recent News).

Here are the links. I would like the subnav links on 1. to be available on 2.
1. http://parallaxgaming.com/content.php
2. http://parallaxgaming.com/archive.php

Lynne
11-17-2014, 05:45 PM
Here is a tutorial on creating a new navtab and submenus - https://vborg.vbsupport.ru/showthread.php?t=226914

seventhaxis
11-17-2014, 06:02 PM
Yes, I understand. I'm asking for help on which script to define

define('THIS_SCRIPT', 'index');

If I use index, the submenus are the same as the forums. If I use forms (which I have created myself) then it uses the same submenu as my about page. If I use downloads2, it uses the same submenus as my Downloads page -- I want the same submenues as content.php page.

Lynne
11-17-2014, 08:44 PM
If you have your own unique page that your are creating, then you want to name it something unique. Or, I suppose if you don't mind if the Articles navtab is highlighted when you go to your unique page, then you could just write a plugin to have the navtab hightlighted when on your page (and thus it would have the same submenu). The only want to have the same submenu is to either have the Articles navtab highlight when you are on your page, or to write a plugin and include all the same links for your submenu.

seventhaxis
11-18-2014, 10:34 AM
Yes, I want the Articles navtab highlighted -- how do I do that? Anything I have put in the define THIS SCRIPT code has not worked at this point. I know how to make other tabs highlight -- I want the Articles (or in my case, Home) tab highlighted while visiting my archives.php page.

Lynne
11-18-2014, 03:06 PM
You put your own script name in your THIS_SCRIPT for your page and then write a plugin to highlight that other navtab. (Try a search in the vb4 forum for that tutorial or a search out here - I know that code has been posted a bunch but I don't have time to search for it.)