The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBa CMPS: Dynamic Navigation menu - all your Custom CMPS Pages Details »» | |||||||||||||||||||||||||||
vBa CMPS: Dynamic Navigation menu - all your Custom CMPS Pages
Developer Last Online: Apr 2022
What this does: creates a Navigation menu (best as a left or right side block) which is populates automagically by the custom pages you have inserted into your CMPS. It should only show the user the pages that they have permissions to view.
Step 1: create and upload a new module modules/navmenu.php with the contents PHP Code:
Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> <thead> <tr> <td class="tcat"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('cmps_pagesmenu')"><img id="collapseimg_cmps_pagesmenu" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_cmps_pagesmenu].gif" alt="" border="0" /></a> <span class="smallfont"><strong>$vba_options[portal_blockbullet] Navigation</strong></span> </td> </tr> </thead> <tbody id="collapseobj_cmps_pagesmenu" style="$vbcollapse[collapseobj_cmps_pagesmenu];text-align:$stylevar[left]"> $pages_menubits </tbody> </table> <br /> Code:
<tr> <td class="$bgclass" style="text-align:right"> <span class="smallfont"> <!-- edit this entry to alter the index.php if your cmps portal has a different filename --> <a href="$vboptions[homeurl]/index.php?$session[sessionurl]<if condition="$pagename!=home">$vba_options[portal_pagevar]=$pagename</if>" title="link to $title page">$title</a> </span> </td> </tr> Module Title: Page Navigation File To Include: navmenu.php Templates used: adv_portal_pagesmenu, adv_portal_pagesmenubits HTH y'all I like it Demo <= this shows only one link available due to Guest permissions Login with test/testicular to see the menu populate with extra pages EDIT:// Altered the module; if you have installed this prior to now, please update the contents of your module with the edited one above. Show Your Support
|
Comments |
#12
|
|||
|
|||
Hi,
Can't seem to visit that thread, even when I register... But thanks. |
#13
|
|||
|
|||
Yea, same here.
I suspect that Boofo will verify people as being members here since he is also a Moderator here and I'm sure he has the capability of seeing if they are verified & etc... HoC |
#14
|
||||
|
||||
Natch how to get the result of links in the centerblock as in your example?
|
#15
|
||||
|
||||
I'm not sure I understand the question - there's nothing in my hack that is not in standard CMPS - it's just Custom Pages - I am just parsing the adv_pages table for userperms and pages and outputting an array of links...
|
#16
|
||||
|
||||
Then i hope you specify the use of this function a bit better because when i add urls in the template they all open in blanc pages, not in the center block. Maybe i'm missing something.
|
#17
|
||||
|
||||
You don't add URL's in the template ... that's the whole point!
1. Do you have the CMPS installed? 2. Do you have any custom pages installed? You can install this, leave the DEFAULT templates, and you will have a navigation menu with all your custom CMPS pages added. If you want to add new links to this (NOT SUPPORTED - this is not the point of this hack), you will need to ensure they have target="_parent" in the <a href definition or you will open links in new pages (as per the default vB behaviour... |
#18
|
||||
|
||||
DMPS? You mean CMPS.... It looks i have to look more often on the vbadvanced homepage
|
#19
|
||||
|
||||
Do you have a serious question?
|
#20
|
||||
|
||||
Yes i have. Now this is installed i can't see how to create new links to it that open content in centerblocks as on your example site.
|
#21
|
||||
|
||||
I suggest you read the manual for CMPS - in your CMPS admin cp you have the facility to "Create Page" - this will call on a new template, or simply a construction based on the modules you have already installed ...
Well if you create a template and add that intothe page definition up the top there,m then that tempalte's contents will go intothe place of the "Custom PAge Content" module in the center at the top of your custom page ... Make sense ? Now I had heaps of content from my old vBindex install - I just used those templates for my custom pages - I have customised this hack to not list all the custom pages - I have about 50 extra pages that are linked behind the "Tutorials" vB dropdown menu - this menu is populated automagically using a different script I dev'ed up. So my version of this has an extra bit that adds AND !strstr("tut-",$pagename) to the determination of the items for the menu so that these aren't displayed in the NAvigation menu - but that's just for me - you can see far more Custom Page content by looking at the Tutorials menu... I hoppe that makes things a bit clearer. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|