TinyPortal

Development => Block Codes => Topic started by: matstone on November 16, 2007, 03:17:37 AM

Title: Collaspable Article Categories (script box)
Post by: matstone on November 16, 2007, 03:17:37 AM
I am no way a pro but, have managed to make a collaspable article category box using a script box and a html page. There may be another way using php but, seeing as I am about clueless there, this works. Menu Size and colors are all changable with some pic edits and some css changes. Just slap me if this isn't something that should be posted here.

you can see imy menu here:
http://fishinfanatics.com/EasyAngling/index.php

It begins with the Slashdot menu downloaded from here:
http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

I uploaded the folder to my server and I then created a html page with links to my article catagories and inserted that code into a script box.




Title: Re: Collaspable Article Categories (script box)
Post by: Hairy on November 16, 2007, 03:46:44 AM
I think this will be handy for me, similar to the accordion menu snippet but different features. I think I will use both of them.

Cheers
Title: Re: Collaspable Article Categories (script box)
Post by: matstone on November 17, 2007, 08:41:50 PM
Quote from: Hairy on November 16, 2007, 03:46:44 AM
I think this will be handy for me, similar to the accordion menu snippet but different features. I think I will use both of them.

Cheers

I was happy it worked and it's a great way to shrink up a ton of links to article catagories. Could be used for almost any link related box I imagine.
Title: Re: Collaspable Article Categories (script box)
Post by: bloc on November 18, 2007, 02:45:03 PM
Yes, the Slashdot routine is a great one. Its put to good use at the Online manual for SMF too. ( http://docs.simplemachines.org/ )
Title: Re: Collaspable Article Categories (script box)
Post by: matstone on November 18, 2007, 03:22:00 PM
Quote from: Bloc on November 18, 2007, 02:45:03 PM
Yes, the Slashdot routine is a great one. Its put to good use at the Online manual for SMF too. ( http://docs.simplemachines.org/ )

Oh I like that.
Title: Re: Collaspable Article Categories (script box)
Post by: catchpen on November 19, 2007, 02:41:06 AM
Thanks, bookmarked for future use when I get a good collection of articles.
Title: Re: Collaspable Article Categories (script box)
Post by: rockskullz on March 29, 2008, 05:30:20 PM
Can you post the code you used in your html block?
Title: Re: Collaspable Article Categories (script box)
Post by: matstone on March 29, 2008, 07:23:04 PM
I used the below code in a "Script box".
You will need to reference to the "sdmenu file" which you can download at the link above.

Quote<center><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Article Navigation</title>

<link rel="stylesheet" type="text/css" href="http://www.fishinfanatics.com/sdmenu/sdmenu.css" />
   <script type="text/javascript" src="http://www.fishinfanatics.com/sdmenu/sdmenu.js">
      /***********************************************
      * Slashdot Menu script- By DimX
      * Submitted to Dynamic Drive DHTML code library: http://www.dynamicdrive.com
      * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
      ***********************************************/
   </script>
   <script type="text/javascript">
   // <![CDATA[
   var myMenu;
   window.onload = function() {
      myMenu = new SDMenu("my_menu");
      myMenu.init();
   };
   // ]]>
   </script>

<style type="text/css">
<!--
.style47 {color: #F6F6F6}
a:link {
   color: #0000FF;
}
.style55 {
   color: #CB6036;
   font-weight: bold;
}
-->
</style>

</head>

<body>

<div style="float: center" id="my_menu" class="sdmenu">
                  
      <div>
        <span>Fishing</span>
        The Fishing Basics (http://fishinfanatics.com/EasyAngling/index.php?cat=57)
        LM Bass Fishing (http://fishinfanatics.com/EasyAngling/index.php?cat=1)
      SM Bass Fishing (http://fishinfanatics.com/EasyAngling/index.php?cat=4)
        Crappie & Panfish (http://fishinfanatics.com/EasyAngling/index.php?cat=5)
        Catfish Fishing (http://fishinfanatics.com/EasyAngling/index.php?cat=6)
      The Toothy Fish (http://fishinfanatics.com/EasyAngling/index.php?cat=7)
      Any Other Fish (http://fishinfanatics.com/EasyAngling/index.php?cat=32)
      Fishing Tackle (http://fishinfanatics.com/EasyAngling/index.php?cat=10)
Fishing Equipment (http://fishinfanatics.com/EasyAngling/index.php?cat=39)
Fishing News (http://fishinfanatics.com/EasyAngling/index.php?cat=38)
Kids and Fishing (http://fishinfanatics.com/EasyAngling/index.php?cat=43)</div>
     

      <div>
        <span>Boating</span>
      Bass Boats (http://fishinfanatics.com/EasyAngling/index.php?cat=34)
      Jet Boats (http://fishinfanatics.com/EasyAngling/index.php?cat=35)
        Kayaks (http://fishinfanatics.com/EasyAngling/index.php?cat=36)
      Other Boats (http://fishinfanatics.com/EasyAngling/index.php?cat=37)</div>
     
          <div>
        <span>Other</span>
        The Outdoors (http://fishinfanatics.com/EasyAngling/index.php?cat=9)
Vacation Destinations (http://fishinfanatics.com/EasyAngling/index.php?cat=44)
      Un-Catagorized (http://fishinfanatics.com/EasyAngling/index.php?cat=33)    </div>

      
      </div>

</body>
</html></center>
Title: Re: Collaspable Article Categories (script box)
Post by: rockskullz on April 04, 2008, 07:43:38 AM
Thanks for sharing. I added it to our site. Very cool!

http://www.offroad-review.com