1
fluent
Xoops DHTML drop down menus
  • 2003/12/1 20:23

  • fluent

  • Just popping in

  • Posts: 43

  • Since: 2003/11/22



Hiya,

For a site I'm making with Xoops, The designer would like to use pulldown menu's instead of the blocks on the left.

Take the menu to the left on this site, we Have:

User Menu
View Account
Edit Account
Notifications
Logout
Inbox

We would like to turn this into javascript dhtml menu's whereby "User Menu" is an image accross the top and the other options are a drop down dhtml menu from that.

My questions are:

1. Is this a Theme or a template?

2. Has it been done before to anyones knowledge? (I have looked in the downloads section)

3. Is it Hard / Not recommended for any reason?

When will the documentation be released, whats there currently is a bit bare... there might not be enough infomation for me to do this... do I need to revert to the source or is there beta docs somewhere?

2
Herko
Re: Xoops DHTML drop down menus
  • 2003/12/1 20:37

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


It can be done. The user menu is a block with a template, so that's where you have to start. The easiest thing would be to get the modules/system/templates/system_user_block.html file (or whatever it is called) and dissect how this is built. You can probably use the smarty variables to build your DHTML/Javascript dropdown menu.

Harder is the placement of the menu. Pehaps someone with a little more experience in that can help you with that

Herko

3
hsalazar
Re: Xoops DHTML drop down menus
  • 2003/12/3 16:55

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


fluent:

Here are some partial answers.

1. The User Menu is shown in a block, so a solution setting it up automatically as in the default XOOPS installation is out of the question, more so if you want to put the menu in the header. On the other hand, since the User Menu doesn't have automatically generated links, but has static links, it's VERY easy to create a Javascript DHTML for it, using any of the myriad DHTML menu options available for free.

2. The use of dynamic DHTML menus in XOOPS HAS been done before, by no less than onokazu. That's why in the admin section each module has a popup with the annoying behavior of showing where it wants.

3. Hard? It depends on your scope. If you just want to rebuild the User Menu it's, as I said, VERY easy. If you want to rebuild the whole Main Menu, then it's a different story altogether.

To do this, there are two possibilities. The first one is to define what you'll have on your site, build a customized Javascript DHTML menu and include it in your theme, and then deactivate in the site the block Main Menu. This is fairly easy to do. You can see a sample of the experiments I've done for XOOPS here:

http://www.puntoflotante.com/tests/tema.html

The second possibility, more advanced, would be to use a menu able to read its configuration variables from a database table. Now that would be an accomplishment, as it would allow you to create a truly dynamic menu.

For most purposes, though, the first approach is enough, and as you see, can be done quite effectively.

Cheers.

4
Gamut
Re: Xoops DHTML drop down menus
  • 2003/12/9 11:24

  • Gamut

  • Just popping in

  • Posts: 34

  • Since: 2002/1/5 1


Horacio,

Where did you get the javascript for your demo horizontal menu athttp://www.puntoflotante.com/tests/tema.html ?

It looks good, and is certainly a solid first step towards
getting away from the screen real estate hogging sidebar block menus.

Gamut

5
Shine
Re: Xoops DHTML drop down menus
  • 2003/12/9 13:08

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


He got it from:
http://www.softcomplex.com/products/tigra_menu/

Grtz., Shine

6
svaha
Re: Xoops DHTML drop down menus
  • 2003/12/9 13:59

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


You will also find lots of menus/tooltips and so on here (for free) :http://www.dynamicdrive.com/
I've installed one of these gadgets just for fun on my site rainbowshaman. To prevent this from displaying over the entire site, I made an <if rblocks> statement.
It is very easy to install.
The same goes for the menus. Only problem I found so far is to get it on the right place, but that's just because I use Zaja theme's and first had to figure out how this is all done.
Have fun.

7
wammes
Re: Xoops DHTML drop down menus
  • 2003/12/9 18:51

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


Quote:
1. The User Menu is shown in a block, so a solution setting it up automatically as in the default XOOPS installation is out of the question, more so if you want to put the menu in the header. On the other hand, since the User Menu doesn't have automatically generated links, but has static links, it's VERY easy to create a Javascript DHTML for it, using any of the myriad DHTML menu options available for free.


I've been into this also. I wanted to replace the login/user block with one element in my theme (I called it something like a passport for my users). But I believe the usermenu does create dynamic content. It notices you when you have a new pm and for admin users it shows the admin link. So you can't replace the complete main menu, user menu and login menu in your theme with something else. You will loose functionality since these menus are created dynamically in a block. You'll have to hack core files to get extra smarty variables (like the number of new pm's) in your theme, at least I think so...

8
SirTanksAlot
Re: Xoops DHTML drop down menus

Accessing the Number of PM's etc was addressed in another thread today...

https://xoops.org/modules/newbb/viewtopic.php?topic_id=12950&forum=20&viewmode=flat&order=ASC&start=10

Jace303 posted the following code snippet that can be pasted into the smarty template file to lookup the info that is not normally passed to the main theme file WITHOUT having to hack the core file.

(This type of thing probally needs to get added to the documentation somewhere... if it's not there already.. I need to go look... :)

<{php}>
GLOBAL 
$xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
$criteria->add(new Criteria('to_userid'$uid));
$msgcount $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount'$msgcount);
<{/
php}>


<{if 
$msgcount 0}>
<
class="highlight" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ff0000; font-weight: bold;"><{$msgcount}></span>)</a>
<{else}>
<
a href="<{$xoops_url}>/viewpmsg.php">Inbox</a>
<{/if}>

9
wammes
Re: Xoops DHTML drop down menus
  • 2003/12/10 9:31

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


SirTanksAlot,

thank you very much for pointing me at this. I wasn't very satisfied with my solotion for this (a core hack). I'll implement this immediately in my theme! Never thought of it in this way... Always thought that if I used global $xoopsUser in an other file I had to make a lot of inclusions. I don't know exactly how it works be it can lead you into a loop including each time a file.
But anyway, thank you very much!

10
shammee
Re: Xoops DHTML drop down menus
  • 2005/3/9 6:07

  • shammee

  • Just popping in

  • Posts: 4

  • Since: 2005/2/17


Hi Everyone,

I just got Sothink DHTMLMenu 5.0 which includes the ability to create truly dynamic DHTML menu from database in PHP/MySQL. If interested, you might want to read their instructions (to use with their product) by clicking the link below.

LINK: <a href="http://www.sothink.com/webtools/dhtmlmenu/store/phpdb/index.php?bResult=1">
Using PHP to create dynamic menu from mySQL database </a>

I will be trying it soon this week on my site athttp://www.soulful-writer.com and will let you know. However, try it yourself since I do not know much of PHP and XOOPS format so I have to do a lot of reading and trial. I was thinking that perhaps, one could create a module or several modules (for different group of users and permissions) of the menu. Furthermore, you can use your own template or one of theirs.

Hope this helps.

Login

Who's Online

196 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 196


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits