PDA


View Full Version : Dynamenu 1.0 Released.


Albus
05-23-2005, 05:10 PM
BAH! Brian, would you move this to the Add-On releases forum...sheesh...

Let's get the obvious out of the way first. I know a new vBa release is due out anytime. I'm stuck with vB 3.0.7 for a few more months, and a suspect others are too. Therefore I am releasing it anyway. I will port it later assuming the next vBa version doesn't come with a similar module stock.

Now for the module. I started like most here and began making simple modules that merely tossed up a single template or maybe performed a simple top reputation query and had to eval each row. I wanted a good automatic menuing system that didn't require me to edit a template everytime I added a vBa page or forum but couldn't find one. The available static modules were nice, but I wanted more. So I wrote one. This is my first 'real' module.

What it does is lists all your vBa pages in one menu section and all your forums in another. It also displays popup descriptions if available. It is compliant with all vB permissions and options that apply, such as CANVIEW and 'hideprivateforums'. It is completely dyamic and highliy configurable. Configuration options are listed below:

// item bullet [ this is anything you want to bullet the lists with ]
'itembullet' => '· ',

// page display [ 0 = no, 1 = yes ]
'pagedisplay' => 1,

// page exclude [ comma delimited list of pageid's you'd like excluded ]
'pageexclude' => '',
// this is to mask out forum wrappers and other pages you want hidden

// page sorting [ 1 = pageid asc, 2 = pageid desc, 3 = title asc, 4 = title desc ]
'pagesorting' => 1,

// forum display [ 0 = no, 1 = yes ]
'forumdisplay' => 1,

// forum exclude [ comma delimited list of forumid's you'd like excluded ]
'forumexclude' => '',

// status icons [ 0 = no, 1 = yes ]
'statusicons' => 1

A demo may be seen on my site: http://wizardingrealm.com

If you install this, please post back here and let me know how it went. Instructions are included in the package.

NOTE: zip file updated on Sunday, May 29, 2005 to new version.

Boosted MR-S
05-23-2005, 06:10 PM
Great menu kinda of the same way I was going with my Nav Version 2

Albus
05-23-2005, 06:13 PM
Thanks. I like the fact that I don't have to edit the templates once it's installed when I add a new page or forum. That's really the best part.

Torqued
05-23-2005, 06:45 PM
I like it... but where do I change the colors for the mouseovers?

I'm using it @ my blog at http://www.torqued.org/news

Albus
05-23-2005, 07:11 PM
It uses the fjsel class. You can either change the template to change the class altogether, or edit that class in Main CSS.

NOTE: To anybody who looks at that in closer detail, you'll see that onmouseover I use a little known feature. the class attribute can actually contain a space delimited list of classes, not just one.

;)

Torqued
05-23-2005, 07:43 PM
Ok.. got the colors sorted... but ran into a couple of other problems...

A link that should be http://www.torqued.org/news/forum/forumdisplay.php?f=6

Is missing the parts above that are in bold... and they look like this:

http://www.torqued.org/news/forumdisplay?f=1

therefore my nav links are broken.. :confused:

Albus
05-23-2005, 07:50 PM
Edit the template and replace:
<a href="forumdisplay?$session[sessionurl]f=$navforumbit[forumid]">$navforumbit[title]</a>
with
<a href="$vboptions[bburl]/forumdisplay?$session[sessionurl]f=$navforumbit[forumid]">$navforumbit[title]</a>
and that should fix it. Let me know if it doesn't.

Torqued
05-23-2005, 07:59 PM
<a href="$vboptions/forumdisplay[B].php?$session[sessionurl]f=$navforumbit[forumid]">$navforumbit[title]</a>

It works if I add the .php in bold above. ;)

Albus
05-23-2005, 08:04 PM
dude...that's odd. I'm not using mod_rewrite or anything and my original code worked fine when it shouldn't have...I'll upload a new zip shortly. Good catch.

Zip has now been updated. Thanks Torque. :)

Torqued
05-23-2005, 08:17 PM
Can you explain to me a bit more about how the "page" function works? :confused: :) Where does that info get defined?

Albus
05-23-2005, 08:31 PM
In the vba cmps admin thing. You can create pages in addition to the default portal page. In these pages you can alter the active modules, override default settings and/or display custom content. That's all stock vBa stuff. Look in the manual for more info on that. What the pages element of this menu does is automatically add them to the menu when you create a new page, no need to edit the template.

vBa Manual (http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4)

Albus
05-24-2005, 11:24 PM
Is there anything you guys would like it to do that it doesn't?

PMichaud
05-28-2005, 10:06 PM
It would rock my socks if it supported small icons (like bullets) to tell whether the forum has a new post in it or not (just like the default forumview). I've been trying to get that to work.

Albus
05-28-2005, 10:15 PM
I'll look into adding that. But you can use images as static bullets if you wish for now. Just set the following option in the module code:

'itembullet' => '<img src="' . $vboptions[bburl] . '/images/image.gif" border="0" alt="" />&nbsp;',

Albus
05-29-2005, 02:32 AM
Expect an update tomorrow. :)

Albus
05-29-2005, 12:41 PM
I took your idea and ran with it as well as made some other slight improvements. There is now an additional $moduleoption you can set to enable the display of mini statusicons. There is a default set included in the new package. In addition, I have adjusted the main template so that if only one section is displayed (I.E. Pages or Forums, but not both) the section header doesn't display since there is no need.

Do not hesitate to email me at the contact listed in the install file is you need further assistance or explanation.

PMichaud
05-29-2005, 06:50 PM
Ok, very nice, but there's one error -- I'm looking for hte cause of it, but it's making a foreach loop in functions_forumlist.php mess up around line 139 -- in the fetch_last_post_array() function.

edit:

you call it in nav.php on line 160:

// make sure we have a last post array
if (!is_array($lastpostarray)) { fetch_last_post_array(); }

the $iforumcache global doesn't seem to get along with the vb function... not sure why.

hope that helps

Albus
05-29-2005, 07:18 PM
That's funny. Most of that is straight out of functions_forumlist.php which is stock vb. That line is thier stuff. Post your $moduleoptions settings and the exact PHP error message please and I'll look into it.

PMichaud
05-29-2005, 09:40 PM
// module options
$moduleoptions = array(

// item bullet [ this is anything you want to bullet the lists with ]
'itembullet' => '&middot;&nbsp;',

// page display [ 0 = no, 1 = yes ]
'pagedisplay' => 0,

// page exclude [ comma delimited list of pageid's you'd like excluded ]
'pageexclude' => '',

// page sorting [ 1 = id asc, 2 = is desc, 3 = title asc, 4 = title desc ]
'pagesorting' => 1,

// forum display [ 0 = no, 1 = yes ]
'forumdisplay' => 1,

// forum exclude [ comma delimited list of forumid's you'd like excluded ]
'forumexclude' => '21',

// status icons [ 0 = no, 1 = yes ]
'statusicons' => 1

);

Warning: Invalid argument supplied for foreach() in /includes/functions_forumlist.php on line 139

Albus
05-29-2005, 10:28 PM
Ok. We'll trouble shoot this. The first thing I want you to do is set forumexclude to '' and see if the error disappears. If it does, check the ID 21 itself (we admins do make errors) and ensure that it's valid. Then report the findings here.

PMichaud
05-29-2005, 10:33 PM
No change when I do that.

You can get ahold of me on AIM at Opini or MSN at theharbinger777@hotmail.com

Albus
05-29-2005, 11:11 PM
Ok. I'll contact you shortly. I have some kids to deal with right now. :)

Albus
05-30-2005, 12:52 AM
Problem solved via intense debug session. I'll post a new version, in a new thread shortly.

cmiller1014
06-03-2005, 01:51 AM
I must be an idiot. Fully installed 1.2 as shown in the install file and it doesnt show up. And yes it is enabled :(