![]() |
Howto get your forum list into a script array (never been done methinks)
Hey all. Once again, I am working on coding one of the coolest things I can think of. I'm working on what I would like to call "the ultimate navbar"...
It floats, has dropdown css menus, its CENTERED (how did I do that ;) and it stays docked at the top of the screen. Go to www.quad4forums.com and select the test theme for a demo of what i've got so far. Now here's my question: How do I get a list of forums into an array? I plan on using the array later as a dropdown list of forums that the user can click on. I planned on basing it somewhat after my scrolling latest threads thing. It uses the following code (heres the important part) and its really cool. Code:
for (Y; Y >-1; Y--) for X = 1 to ubound(forumcount) arrayForumName(X) = forumsomefile.php?somecommand=x arrayForumURL(X) = forumsomefile.php?somecommand=x next x Can this be done? Do I just need to drag it from the database using SQL commands? UGH why is such a simple thing so hard to do. BTW: $forumjump doesn't work in the navbar or header |
$vbulletin->forumcache has an array of all forums, and I believe it's global too.
|
Excellent reply! I am currently googling the topic. If you care to parallel my searching, how exactly do I go about using that? Is it a template thing, or more of a plugin thing?
My first google search of $vbulletin->forumcache was pretty useless. Searching continues... -- Edit: just found out that its a plugin thing. Gonna try to do some template dumps -- --EDIT #2: I think i'm going to need a lot of walkthroughing!!! |
It's a variable. Printing the output might help you out:
PHP Code:
|
cripes! page after page! How do i get it to print in a column?
--------------- Added [DATE]1248482616[/DATE] at [TIME]1248482616[/TIME] --------------- Sooooo... I've written this into a plugin.. Code:
$find = 'hoobajoob'; How do I break it down one more level so I can see whats in all of those arrays? I've been trying with "foreach() but it just gives me php errors. |
PHP Code:
|
What I'm trying to do is put my forums names and their links into one of my dropdown menus. (Custom ones I wrote in java, not the vbMenu ones) You can check it out at www.quad4forums.com and choose the Test Theme.
I've followed along everything you've said so far, but getting into the deeper dimensions of this multi-dimensional array (forumcache) is getting the better of me. I'm going to google some more. If you feel like explaining how to pull the forum names from the forumcache and put them into a <pre> list, you'll be teaching a man how to fish. |
PHP Code:
|
Thank you. I feel kinda silly. My internet connection died right when I was typing a response that I had searched for more threads by you with search terms like "forumcache" and found out the answer somewhat. What you have just told me is WAY more exact though.
Thanks. EDIT: Is there some sort of shortcut to figuring out who has permissions for what? I just print_r'd vbulletin->userinfo['permissions'] and it looks like i'd have a do a comparison of every forum permissions to each users permissions manually (a for-each thing). We have a lot of different usergroups (such as premium users, probationary, etc) and I want to write something that doesn't need to be added to each time we create or delete a usergroup. [high]* carcomp goes to read the vbulletin API some more.[/high] Edit: OK awesome, its working so far. I can get a list of forums based on user permissions. Now I just have to figure out if a forum is a child or not (so the menus can cascade!) Code:
$find = '$hoobajoob'; |
Ok dern it now why when this is enabled, can my users not see any forums? Its like its changing their permissions.
I have the plugin in "cache_templates" |
All times are GMT. The time now is 05:38 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:
|