Simple collapse/expand for any prosilver container

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Anti-Spam Guide
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Simple collapse/expand for any prosilver container

Post by Jessica »

I'd like to create a simple collapse expand for a prosilver "container" that's created by this code:

Code: Select all

<div class="forumlist">
      <div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
         <ul class="topiclist">
            <li class="header">
               <dl class="icon">
               <dt>TITLE</dt>
              </dl>
            </li>
         </ul>
         
         <ul class="topiclist forums">
         <li class="row">
   <div style="text-align: center;">

       CONTENT HERE

</div>
         </li>
         </ul>
       </div>
      
<span class="corners-bottom"><span></span></span></div></div>
</div>
    </div>

basically it creates the container that forums are also in (as a category). a lot of other MODs also have the containers.

I just want a simple collapse/expand button that has no jQuery scrolling (so it doesn't conflict with other jQuery scripts), but still uses cookies (remembers the status). I don't care if it's an image or just + and -.

I don't want it for the categories, I want it for the box that's created by the code I posted. therefore I can use it for the boxes that are created for other MODs

can anyone create a simple collapse/expand button like what I want please?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
Jabhi
Registered User
Posts: 572
Joined: Mon Feb 27, 2012 6:12 am

Re: Simple collapse/expand for any prosilver container

Post by Jabhi »

I don't tried but you check this.
http://www.phpbbandbbcodes.com/viewtopic.php?f=6&t=1685

Credits:
Developer - Sniper_E
Go phpBB go... Respected : Developers, Supporters.
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Simple collapse/expand for any prosilver container

Post by Jessica »

okay thanks, but I need to figure out how to add it to the code I posted so it won't be just for categories
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: Simple collapse/expand for any prosilver container

Post by martin123456 »

View my stats box for a demo

http://www.blades-place.com/index.php



your code wont collapse any thing as you dont have the collapse in there try this code and you also need this

http://www.christianbullock.com/2011/ph ... th-cookies

Code: Select all

<div class="forumlist">
      <div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
         <ul class="topiclist">
            <li class="header">
               <dl class="icon">
               <dt> SITE STATISTICS</dt>
              </dl>
            </li>
         </ul>
         
       <!-- IF SCRIPT_NAME eq 'index' --><div class="portaltrigger portalactive"></div><!-- ENDIF -->
      <div class="collapsethis">
         <ul class="topiclist forums">
         <li class="row">
	<div style="text-align: center;">

        >>>>>>>>>>    place your entire code here and change this part <dt> SITE STATISTICS</dt> << to what ever you want <<<<<<<<<<<

</div>
         </li>
         </ul>
       </div>
	   
<span class="corners-bottom"><span></span></span></div>
</div>
    </div>
You can change or remove the <div style="text-align: center;">somecode </div> if you needed to

edit i just clicked where you got that code from :lol: :lol: :lol:

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Simple collapse/expand for any prosilver container

Post by Jessica »

I can't use that expand/collapse because of jQuery conflicts. that's why I want to use one that won't need to use jQuery :/
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: Simple collapse/expand for any prosilver container

Post by martin123456 »

Trust me you can view my source and your see.

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Simple collapse/expand for any prosilver container

Post by Jessica »

I already tried using that expand/collapse btw on my test forum for categories, but they won't work because of jQuery conflicts. so I can't use it :/
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
RMcGirr83
Former Team Member
Posts: 22061
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Simple collapse/expand for any prosilver container

Post by RMcGirr83 »

What do you mean by "jQuery conflicts"? You should only ever need just one jQuery library in your files.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Simple collapse/expand for any prosilver container

Post by Jessica »

ugh. I have other jQuery scripts from other MODs (on test board)

because of THAT the scrolling doesn't work! that's why I don't want the scrolling.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
RMcGirr83
Former Team Member
Posts: 22061
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Simple collapse/expand for any prosilver container

Post by RMcGirr83 »

Maybe I didn't make myself clear. You only need one jQuery library. It doesn't matter if it comes from one mod or 13,000 mods, you still only need one jQuery library and you should remove the others.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
Jabhi
Registered User
Posts: 572
Joined: Mon Feb 27, 2012 6:12 am

Re: Simple collapse/expand for any prosilver container

Post by Jabhi »

And place that jquery in correct place, sothat all mods get it's effect ...
Go phpBB go... Respected : Developers, Supporters.
User avatar
DionDesigns
Registered User
Posts: 515
Joined: Sun Feb 26, 2012 11:22 pm
Location: Uncertain due to momentum.

Re: Simple collapse/expand for any prosilver container

Post by DionDesigns »

RMcGirr83 wrote:Maybe I didn't make myself clear. You only need one jQuery library. It doesn't matter if it comes from one mod or 13,000 mods, you still only need one jQuery library and you should remove the others.
I suspect the issue is a conflict between jQuery plugins...many of which are poorly-written and can easily cause conflicts. Kinda like MODs. :)

The best solution is to avoid using jQuery plugins. They further bloat an already-bloated (and as of 1.7, sluggish) library, and they open the door to additional problems like the one the OP is experiencing.

To the OP, indirectly: I cannot understand why such a MOD would require a jQuery plugin. jQuery has a built-in function called slideToggle() that will accomplish the expand/collapse!
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Simple collapse/expand for any prosilver container

Post by Jessica »

so I can just use slideToggle()? How do I add that to the code?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
RMcGirr83
Former Team Member
Posts: 22061
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Simple collapse/expand for any prosilver container

Post by RMcGirr83 »

DionDesigns wrote: I suspect the issue is a conflict between jQuery plugins...many of which are poorly-written and can easily cause conflicts. Kinda like MODs. :)
In my defense, I can not possibly be expected to write every single mod that would never possibly interfere with another mod.
The best solution is to avoid using jQuery plugins. They further bloat an already-bloated (and as of 1.7, sluggish) library, and they open the door to additional problems like the one the OP is experiencing.
but what about the advantage of using the most recent library of jQuery, a highly rated js library? PS one man's "bloat" is another man's utopia
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
DionDesigns
Registered User
Posts: 515
Joined: Sun Feb 26, 2012 11:22 pm
Location: Uncertain due to momentum.

Re: Simple collapse/expand for any prosilver container

Post by DionDesigns »

RMcGirr83 wrote:
DionDesigns wrote: I suspect the issue is a conflict between jQuery plugins...many of which are poorly-written and can easily cause conflicts. Kinda like MODs. :)
In my defense, I can not possibly be expected to write every single mod that would never possibly interfere with another mod.
There is no reason you must defend yourself. The conflict issues with MODs (and jQuery plugins) is endemic to any platform which allows additions/modifications to its functionality.
RMcGirr83 wrote:
DionDesigns wrote:The best solution is to avoid using jQuery plugins. They further bloat an already-bloated (and as of 1.7, sluggish) library, and they open the door to additional problems like the one the OP is experiencing.
but what about the advantage of using the most recent library of jQuery, a highly rated js library? PS one man's "bloat" is another man's utopia
As a developer, I try to listen to my potential customers in an attempt to develop what THEY want, and I try to keep my own likes and dislikes out of the development process when they conflict with what the customers want.

My customers have told me, loud and clear, that they want software which works as advertised with as little effort on their part as possible, and co-exists with everything else on their system.

That means doing development using a "least-common-denominator" approach with platforms such as jQuery. No software I write will require a version of jQuery later than 1.5.1 (the last version which didn't cause slowdowns in real-world code), and I do not use plugins unless it is absolutely required (has only happened once).

Now, back to the topic.
Jessica wrote:so I can just use slideToggle()? How do I add that to the code?
Yes, the slideToggle() function will do what you want. It would be added to an element that, when clicked, would toggle the display of another element. If you have some specific code to which you want to add this feature, please post it in a reply, and I can show you how to add the clickable element.

Return to “[3.0.x] MOD Requests”