![]() |
vBa CMPS: Dynamic Navigation menu - all your Custom CMPS Pages
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%"> Code:
<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. |
Doesn't belong to the hack but: Which journal script are you using? Looks nice :)
|
Found on www.bearfacts2.com - Boofo's site - they are working on it over there :)
OblivionKnight, sabert00the, Bane and Boofo (hope I didn't leave anyone out) |
Loving this hack! Also, regarding the Journal hack on the site you mentioned: don't see it. Can you tell me where to look?
|
Upfdated to get rid of a small bug: if you are getting multiple instances of each item for users who are in more than one usergroup, please update your module with the module code in the first post.
|
yup, nice hack and nice journal too....
|
nice hack!
*clicks install |
Fix works, thanks. Also, I still don't see the journal. :) I know that's not what this thread is for, but I'm really wondering.
|
@Silverdawn222
http://www.bearfacts2.com/forums/showthread.php?t=804 |
woow this is one step further to get a function i once mentioned...links that open content in the centerblock and in that content a respond/comment field on newsitems from external cms progs. :)
|
Hi,
Can't seem to visit that thread, even when I register... But thanks. :) |
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 |
Natch how to get the result of links in the centerblock as in your example?
|
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...
|
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. :)
|
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... |
DMPS? You mean CMPS.... :D It looks i have to look more often on the vbadvanced homepage
|
Do you have a serious question?
|
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.
|
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. |
Getting closer to understand this, tnx Natch ;)
|
can someone give me a link to the journal?
|
Great hack btw this is going to be very useful, but I have a problem with it
Its fine when adding a page that just includes standard html, but I have just tried to add a page with a java page redirect script, the page itself works fine, but it does not get added to this page nav module. Do you know if you could fix this. I really need this as I use the redirect script to take the user to my forums Thanks |
If you added the page in as a part of the CMPS script (as in AdminCP -> vBa CMPS -> Add Page) then it should work - I don't understand how you have added the page isf you didn't add it this way.
|
I did actually add it that way, well i just saved the page again and its working now, thanks
|
NP - glad u got it working :D
|
arghhhhh this isnt working for me... :(
|
Got it to work... Odd... I had to edit each page and click the "All Yes" in Usergroups and ssave it even though all were set to yes....
|
Ok I moved my site to a new server. Everything works except the cmps_index.php if I turn this or the Featured Article mods on. I have removed both and reinstalled and the cmps_index.php still shows up as a white page if either is turned on. Ideas?
|
White page as a general rule means missing templates - some hacks require you to re-install the templates - take a look at the Articles Hack installer and the CMPS installer - they both have "Re-install templates" options for upgrading...
|
Already redid the CMPS ones... :(
|
Actually i found its not the templates, its the module that you have to make up that causes the blank page from my experience...not sure how you overcome that yet.
|
Well I had to remove it altogether. No use it taking up space when I cant get it to work again. :(
|
i dont get the box appearing....
I followed everything 100% |
ok it did work, but nothings in the box
|
All this script does is create a list of the pages you have installed for your CMPS system - if you don't use the extra pages feature or you don't use CMPS then this is of no use to you.
Please check that your current style has the new template, and that you have got the module in place. Please also post the site url's or PM them if you are still having problems. |
<a href="http://www.blaminator.co.uk" target="_blank">www.blaminator.co.uk</a>
I had to make my own silly navigation menu, yours is a few blocks down, its jsut blank yes i do have other pages |
OK - can you give me temp acces to your AdminCP - cos at the moment I cannot see how you could have my script installed and the tempaltes installed correctly without them showing up: there is nothing complicated in this script.
|
Natch the menu works fine, but have you got any examples of creating submenus with it...say i want to have
vb Tutorials Section - CMPS hacks - vb hacks - my life story |
Well, that would defintely go beyond the scope of this, as all pages in the CMPS are on one level.
One could create multi-dimensional menus, but it would require you manually dividing up your CPMPS apges into groups somehow: possibly by giving all tempaltes of items in the same group an identical prefix... eg: adv_portal_tut_tutorial1 adv_portal_tut_tutorial2 adv_portal_tut_tutorial3 adv_portal_faq_faq1 adv_portal_faq_faq2 adv_portal_faq_faq3 Then you can add a filter into the module to parse each group into a separate array, then walking thru each array inside a UL... |
All times are GMT. The time now is 05:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|