Support Forum

  • Page:
  • 1

Open / close issue

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi,


My Faq appear all expanded by default.
It's impossible to "close all" or to close a particular question.

When I clic, I just have #nogo appearing at the end of my url.


I installed Jlibrary and it still doesn't work.


Thx for helping
  • Frank's Avatar
  • Frank
  • Free Extensions
  • 3 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Frank,

Do you have a link for your site that you can share?
It is quite possible that you have the JQuery library being loaded twice or the JB library may not be enabled. Let me know.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Hi,

here is my Faq page
[url]http://.com/FAQ/[/url]

Thx
  • Frank's Avatar
  • Frank
  • Free Extensions
  • 3 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Frank,

I think Jason has hit the nail on the head. jQuery is not being loaded on your page. It is required for JB FAQ.

If you have installed the JB Library plugin, then you need to enable it. If you didn't install it, install then enable it.

Let us know if that fixes it for you.
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
It was installed but not enabled, though I was sure I did :blush:

Now works fine !!

I was a bit reluctant to load another plugin on my site just for the Faq, but the result is great.


Thx a lot for helping.
  • Frank's Avatar
  • Frank
  • Free Extensions
  • 3 posts
  • Karma: 0
The administrator has disabled public write access.
Thanks Frank :)
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
I think I am having this same problem, except that I have JB Library installed & enabled. When you click on Open All (sustainableharvest.org/general/frequently-asked-questions), it briefly will open all, then reload the page & go to the homepage with this URL: sustainableharvest.org/#nogo I have tested this on Windows & Mac in Firefox & Chrome.

I have JB Library v1.3.2

Thanks!
Renée
  • barkwheats's Avatar
  • barkwheats
  • Free Extensions
  • 5 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Renee,

Did you add a unique module id to each module?

Thanks Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Can you explain this a little more? I have 3 instances of this module, but not on the same page. I have attached a screenshot of my Module Manager - they each have a different Module ID - is this what you mean?
  • barkwheats's Avatar
  • barkwheats
  • Free Extensions
  • 5 posts
  • Karma: 0
Last Edit: 13 years 10 months ago by barkwheats.
The administrator has disabled public write access.
In the module there is an option to put a module id in. So you need to add a specific moduel id per module instance so that they bahve as separate entities.

Thanks Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Okay, I added the module ID in each of the 3 instances (see screenshot) but it is still redirecting to the home page.

sustainableharvest.org/general/frequently-asked-questions
  • barkwheats's Avatar
  • barkwheats
  • Free Extensions
  • 5 posts
  • Karma: 0
Last Edit: 13 years 10 months ago by barkwheats.
The administrator has disabled public write access.
Hey there,

This is a strange one but there a nice and graceful fix for this. You will need to alter a line of module code though.

IN the file
/modules/mod_jbfaq/tmple/default.php

on line 49 you will have
jQuery('.faqtogglerdiv<?php echo $id ?> a.faqtoggler').removeClass("closed")});

replace it with
jQuery('.faqtogglerdiv<?php echo $id ?> a.faqtoggler').removeClass("closed");
return false});

Save it and you should not be redirected to the main page anymore.
Let me know if that works fine for you.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Thank you - that worked for the "Open All"... but now once they are open, I am redirected to the homepage when clicking "Close All." Do you have a similar fix?

Thanks!
Renée
  • barkwheats's Avatar
  • barkwheats
  • Free Extensions
  • 5 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Renee,

Yes,
you can do something similar with the lines after,

lines 42-45 should be
jQuery('a.hide<?php echo $id ?>').click(function(){
			jQuery('div.answer<?php echo $id ?>').slideUp();
			jQuery('.faqtogglerdiv<?php echo $id ?> a.faqtoggler').removeClass("open");
			jQuery('.faqtogglerdiv<?php echo $id ?> a.faqtoggler').addClass("closed");
return false});

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Hmm, I just put in that code for the "close all" and it still redirects back to the Home page. Any ideas? I've attached my default.php code. Thanks!

File Attachment:

File Name: default.txt
File Size: 2385
  • barkwheats's Avatar
  • barkwheats
  • Free Extensions
  • 5 posts
  • Karma: 0
Last Edit: 13 years 10 months ago by barkwheats.
The administrator has disabled public write access.
Hey there,

Not sure why that isn't. Can you copy this code and replace it in again?
jQuery('a.hide<?php echo $id ?>').click(function(){
			jQuery('div.answer<?php echo $id ?>').slideUp();
			jQuery('.faqtogglerdiv<?php echo $id ?> a.faqtoggler').removeClass("open");
			jQuery('.faqtogglerdiv<?php echo $id ?> a.faqtoggler').addClass("closed");
			return false});

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers