Hi i am using this module for a long time and i have to use drupal 5.x. I saw that there is an ajax loading feature for quick tabs 6.x but i also need this feature for 5.x. Can you help me about this situation?

Thanks.

CommentFileSizeAuthor
#3 quicktabs_ajax_for_5.zip66.36 KBjoachim

Comments

pasqualle’s picture

Assigned: Unassigned » katbailey
Priority: Critical » Normal

i have to use drupal 5.x

Come on, Drupal 6 was released a year ago. I can't understand why you have to use Drupal 5. You have to upgrade if you need new features..

I pass this question to Katherine, as my answer is: I am not sure if it is possible, probably it could work in D5 also but I simply do not have the time to work with D5.

iron2’s picture

Becouse the website that i use drupal 5.x, have more than 50 external modules which lots of them havent upgraded to 6.x and hundreds of small patches so it is really hard to upgrade 6.x.

I think there are also lots of websites that uses 5.x. So I would appreciate if you do this feature for 5.x. And i guess it could work.

Thanks.

joachim’s picture

Status: Active » Needs work
StatusFileSize
new66.36 KB

katbailey writes on IRC: " I mean, how ugly can it be? :-P"

Answer is: VERY ugly!

I had to backport the ajax from the D6 version for a project that's very near deadline. So I cut corners, and only implemented the essentials I needed:
- ajax only works with views
- the ajax setting is hardcoded as TRUE -- all quicktabs will use ajax, there is no UI setting.
- the views limit is not considered at all (so I also made it non-required in the settings form)

Along the way I had to make a lot of ugly hacks because a lot of the D6 module depends on funky stuff in D6, eg the behaviours, the progress bar, and the cookie that tells you if the user has javascript. I've tried to work around those absences -- eg I've nicked the progress widget code from flag module (and the throbber icon is just a freebie off the interwebs; the one from Panels admin UI might be more drupal-ish). Warning: my javascript is not good, as I didn't have time to go read up!
There's also jQuery workarounds for stuff that doesn't work in the earlier version, hasClass in particular IIRC.

In short -- this WORKS but it's only part of the whole picture, and the code is littered with hacky stuff and comments like /* arg why won't this work */
It's **definitely** one for the Drupal badlands ;)
-- but if someone can take this and push it along some more, good luck!

MGParisi’s picture

I would also like a 5.X version... 6.x is great, and has allot of great modules, but my site is also not ready to be updated to 6... Simply put, allot of 6.X modules are still at Dev status, and some are not converted at all. I loved your old version, though I ended up using panel tabs, because at the time you had some conflicts in the 5.x branch that was not solved. I load allot of images because all of the tabs are loaded at once. It would be nice to reduce my front page load time, and it would also allow me an easier transition to 6.X if I could implement your version then upgrade to the 6 version.

pasqualle’s picture

Many features from the D6 version are almost impossible to backport into D5. You will have to upgrade your site to D6 and then start using the new features in the Quick Tabs module.
It is time to upgrade to D6, no excuses..

iron2’s picture

I understand that some features cant backport into Drupal 5.x but ajax loading is not a hard issue. I am not a php coder so it is hard to me but lots of people in here can do this. All i need is this code.

I explained why i cant use Drupal 6.

pasqualle’s picture

@iron2: I think it is as hard in D5 as I do not even want to try to implement it..
but if someone could make a reasonable patch, we will review and commit if it works.. So, who can do it?

joachim’s picture

Well I did part of the D5 implementation and it made my head bleed. Not a simple issue at all.

MGParisi’s picture

Its not hard... but you cant do it... How can you say that? WoW...

Do I want to move to 6.x? NO! But I have too, and have been spending a week and will spend many more in the future doing so!

Mike

P.S. If you want Quick Tabs for 5.x, pray someone will do it, or PAY someone... if you dont know what your talking about SHUT UP!

pasqualle’s picture

no fighting here, please..

MGParisi’s picture

Iron2's comment was disrespectful to many developers who give allot of their time to modules, providing features they themselves do not even need... Then give them away! Im not fighting, but the "I want you to do it for me... and I want it for free..." is simply not acceptable. If you want a feature, do it yourself, pay for it, or ask if someone can do it for you (but respect there answers).

iron2’s picture

@MGParisi,

Read my second post in this issue. I didnt want to be rude and i also know that someone can do this with paying. But drupal is a free cms and there are lots of developers doing it better. And also i wont use this feature with my own. I tried it myself but i couldnt, if i could do that i would share it from here without a PAY. That is why drupal is so strong.

PS: You cant say me to shut up! You can just ignore this topic, go and find someone for paying you to code something.

joachim’s picture

I've found a problem with this and Devel module which I wonder if someone can help me figure out....

With the page timer in Devel set to show, the time gets printed at the end of the stuff the ajax callback returns. Result: a jquery error because the parser is flummoxed.
I don't understand what I'm doing wrong: I don't see any different between what we're doing in this patch and, say, http://api.drupal.org/api/function/taxonomy_autocomplete/5 which doesn't get Devel module's timer printed.

Any thoughts?

mr.j’s picture

I have sets of tabs that I have created as a block (manually) for 5.x. Each tab is also a block and each loads via ajax.
I use the component module to load them via ajax. It is very simple (for a developer).
http://drupal.org/project/component

I was looking for a module that might make it easier for non-developers to create the tabs but looks like this one won't be it.

@Pasquale
Many people have sites which are large that require weeks, if not months, of testing to upgrade, and with many modules still in development status it is not a good idea to upgrade yet. Not everyone running drupal uses it on their hobby blog that can be upgraded overnight.

MGParisi’s picture

@mr.j

I totally agree with you, one of the flaws of Drupal is that by the time the Modules start to become stable the next Drupal Version is released. Or thats what seemed to happen with D5!

Though also, being a module developer, once you switch versions its hard, and a pain to keep up on two versions...

I am a great coder, but I am not good at reading ot working with other peoples code. If I was, I would take up this module.

Mike

iron2’s picture

@mr.j,

Could you give some information about using component module with ajax?

mr.j’s picture

ok but if you aren't a coder I am sorry for not answering further questions, I don't want this to turn into a support thread for the snippet of code I am about to post.

1. Get component module, read docs and install it. Now when you want to get just the content for a block you can do a get request for something like /component/block/block/5

2. Make a html list for the tabs and point each tab link's url to a component module url.

3. Use your preferred script to handle the returned content. In our case we used jquery ui.tabs, with a block with code something like this (it loads block #10 with the page, then gets block #18 and #20 later via ajax when the tabs are clicked):

<div id="tabbed" class="tabs">
<ul>
  <li class="tabs-selected"><a href="#1" title="Tab 1"><span><strong>Tab1</strong></span></a></li>
  <li><a href="/component/block/block/18" title="Tab2"><span><strong>Tab2 (block 18)</strong></span></a></li>
  <li><a href="/component/block/block/20" title="Tab3"><span><strong>Tab3 (block 20)</strong></span></a></li>
</ul>
<?php

// Print first tab content when page loads
$block = module_invoke('block', 'block', 'view', 10);
print '<div id="tab1">' . $block['content'] . '</div>';

// Add support files to enable jquery tabs
$themeP = path_to_theme();
drupal_add_css($themeP . '/js/ui.tabs/ui.tabs.css', 'theme', 'all', false);
drupal_add_js($themeP . '/js/ui.tabs/ui.tabs.js', 'theme', 'header', false, true);
		
// Sets up jquery tabs
$inline_js = '$(document).ready( function() { $("#tabbed > ul").tabs(); });';
drupal_add_js($inline_js, 'inline', 'header', false, true);

?>
</div>
pasqualle’s picture

Status: Needs work » Closed (won't fix)

Drupal 5 version of the Quick Tabs module is no longer supported. Closing.
If you have this same problem with later versions, feel free to reopen this issue.