Download & Extend

Not redirecting to next smackdown node

Project:Smackdown
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I have got this awesome module working, but can't seem to get it to redirect to the next smackdown after voting. Not sure if I've missed something, but if anyone has any advice that would be really helpful.

Comments

#1

First thing to make sure of, is that the selection box is checked on the content type:

Second thing to check is that the js file (smackdown.js) is being loaded:

Third thing to check is that the Drupal DOM variables are present:

If all of these criteria are met - it should be working (and you're using the latest dev with the fix in from #612696: Voting totally broken, uses bad selector)

#2

Ok, something I forgot:

We removed the 'automatically redirect to next smackdown' feature as we watned a way to be able to determine what the next smackdown actually was. So this should (out of the box) simply redirect to the results.

If you want to redirect to another smackdown, you can modify the Drupal.settings.smackdown.location variable in the DOM. Here is how you go about doing that:

In a custom module:

/*
Implement some logic to determine what the next node id should be here...
*/
drupal_add_js(array('library' => array('nextSmackdown' => $next_nid)), 'setting');

In some custom javascript:

/**
* Override the js themed variable for the 'next' smackdown location
*/
Drupal.theme.smackdownLocation = function() {
  return 'node/' + Drupal.settings.library.nextSmackdown;
}

#3

Status:active» closed (fixed)

almost a year no response - closing.

nobody click here