1
Da_Newb
Javascript for popup link in main menu???
  • 2005/10/18 2:31

  • Da_Newb

  • Just popping in

  • Posts: 9

  • Since: 2005/7/31


I'm trying to make a popup link within the main menu. The new window is a defined size. How would I go about doing this?

TIA

2
JMorris
Re: Javascript for popup link in main menu???
  • 2005/10/18 2:37

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Off the top of my head, I do not know, but if there's any place I can think of where you could find the answer, it would be http://dynamicdrive.com/.

Whith the exception of a few smarty variables, the main menu is just a HTML table, so the scripts at http://dynamicdrive.com/ should work just fine with a little tinkering.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
Da_Newb
Re: Javascript for popup link in main menu???
  • 2005/10/18 2:53

  • Da_Newb

  • Just popping in

  • Posts: 9

  • Since: 2005/7/31


Thanks JMorris, but I already have the script. I'm trying to add a link to wimpy player (http://www.wimpylayer.com) off the main menu as a popup.

4
JMorris
Re: Javascript for popup link in main menu???
  • 2005/10/18 3:34

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Sorry for misunderstanding.

First, set "Update module template .html files from themes/your theme/templates directory?" to Yes in Preferences Main »» General Settings. Next, clone your default template set in Template Set Manager. Then open System »» system_block_mainmenu.html and make your desired changes. Unless you want to completely hard-code your main menu, I would suggest putting your code at the bottome of the template.

Example:
<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}>a>
      
      <{foreach 
item=module from=$block.modules}>
      <
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}>a>
        <{foreach 
item=sublink from=$module.sublinks}>
          <
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}>a>
        <{/foreach}>
      <{/foreach}>
      
[
color=FF0000][/color]
   td>
  tr>
table>


After you've finished with your edits, set "Update module template .html files from themes/your theme/templates directory?" to No in Preferences Main »» General Settings.

That's it. Hope this helps.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

5
Da_Newb
Re: Javascript for popup link in main menu???
  • 2005/10/18 3:58

  • Da_Newb

  • Just popping in

  • Posts: 9

  • Since: 2005/7/31


Thanks, this gives me a bit more direction. although I think I may have to edit the script settings "globally" also. For some reason my changes are not updating. I used to do it through ftp, but it seems things have changed since the upgrade.

huhhhh. anyway, thanks for the help. I'll plug away again tomorrow.

6
JMorris
Re: Javascript for popup link in main menu???
  • 2005/10/18 4:01

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Your template files are cached in the templates_c/ directory for enhanced performance. That's what "Update module template .html files from themes/your theme/templates directory? to Yes" is for. It tells XOOPS to ignore the cached files and overwrite them. If your changes still don't take effect, delete every file in the templates_c folder except index.html

I'm not sure what you mean by globally. There are a lot of javascripts that require an entry in the tags of your site. If this is the case, just insert theme into your theme's theme.html file.

Hope this helps.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

7
Da_Newb
Re: Javascript for popup link in main menu???
  • 2005/10/18 4:32

  • Da_Newb

  • Just popping in

  • Posts: 9

  • Since: 2005/7/31


That is exactly the answer I was looking for, plus more. Thanks so much. Unfortunately, the changes are still not updating. I guess I'll have to mess around a bit. Thanks again!!!

Login

Who's Online

412 user(s) are online (57 user(s) are browsing Support Forums)


Members: 0


Guests: 412


more...

Donat-O-Meter

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

Latest GitHub Commits