Re: jQuery-request

Thanks Will, I'll apply it to the News releases

Report
Topic


Re: jQuery-request

  • 2011/3/26 9:20:00
  • Will

Alright, so I based my work off of the default templates so others could also work on it. Here is what I have.

Note this is very crude - it currently add javascript for every news item - once working I would prefer this to be single function that handles all of it. Until then this will work for dev.

EDIT** I think the big problem here is the way it tests for all of the conditions. Instead of doing it in a tree like fashion where it tests for consecutive conditions it instead tests them in a linear fashion which means that even though an initial condition might fail - a subsequent condition may pass. Which would work fine if we were accessing the page directly - but not so much with ajax requests.

Array
Report
Topic


Re: jQuery-request

  • 2011/3/25 16:47:45
  • QM-B

Thanks for your great work so far!

Report
Topic


Re: jQuery-request

  • 2011/3/25 5:09:33
  • Will

So, I got it submitting, but I can't seem to get it to adhere to the rules. Users can continuously rate an article.

Not sure why. I will share what I have this afternoon after work. Perhaps someone else can figure out why.

Another issue that has become apparent is that even though we are rating via ajax, the actual rating is defined separately, so for this to work effectively we will also need to write a new function to fetch the rating that can be queried after the post is successful.

Report
Topic


Re: jQuery-request

  • 2011/3/23 16:28:46
  • QM-B

Thanks for all your work on that! If you would integrate an ajaxrating it would be grate to use a similar to McDonald's modules.. Sounds good for me :thumbup:

Report
Topic


Re: jQuery-request

  • 2011/3/23 16:19:01
  • Will

@david - no problem.

@underdog - missed your message - maybe, I am trimming out all of the fat and making it a new file ajaxrate.php -> The submission goes through but always comes back as an error, and I think that is because the current script isn't checking on whether a post is occurring, but whether or not storyid is set. So I am pulling out the important bits - wrapping them in a post check and will see how it goes.

Currently at some point during the processing of the submission it errors out, if I can't get it working I will send it over for you to take a look at.

Probably won't get to it today though - out and about with the family.

Report
Topic


Re: jQuery-request

  • 2011/3/23 11:19:42
  • david

Thank you for checking into this.

Report
Topic


Re: jQuery-request

  • 2011/3/23 6:15:34
  • Will

The problem is the way the ratenews.php is coded. Still owrking on solution.

Report
Topic


Re: jQuery-request

  • 2011/3/22 4:54:55
  • Will

mrtheme@impresscms.org

Report
Topic


Re: jQuery-request

  • 2011/3/22 4:53:03
  • QM-B

ok.. to which adress?

Report
Topic


Re: jQuery-request

  • 2011/3/22 4:50:43
  • Will

wanna zip it up and send it to me then?

Report
Topic


Re: jQuery-request

  • 2011/3/22 4:48:28
  • QM-B

this is from news.. latest from trunk but with different templates..

Report
Topic


Re: jQuery-request

  • 2011/3/22 4:46:13
  • Will

Which news module is this? Version too please.

Report
Topic


Re: jQuery-request

  • 2011/3/20 7:18:34
  • QM-B

Quote:


UnderDog wrote:
Quote:

Result was 'story doesn't exist'.


Look in news_ratenews.php
In which case should it return that the story doesn't exist? I think it's in the case that it doesn't receive a story ID
That should mean that
?storyid=<{$story.id}>
should be sent differently through smarty.


Tried the same also with
?storyid=<{$news.storyid}>

The same result.. maybe there could be another problem, too.. Think, the functions from news_ratenews.html are not available using this method.. could this be right?

Report
Topic


Re: jQuery-request

Quote:

Result was 'story doesn't exist'.


Look in news_ratenews.php
In which case should it return that the story doesn't exist? I think it's in the case that it doesn't receive a story ID
That should mean that
?storyid=<{$story.id}>
should be sent differently through smarty.

Report
Topic


jQuery-request

  • 2011/3/19 13:58:35
  • QM-B

We're trying to realize a toggled rating-form. But something must be wrong with the code. Result was 'story doesn't exist'. Maybe someone could help us with this?

our script:

<script type="text/javascript"> $(document).ready(function(){ $('.news_rating_container').hide(); $('.news_rating_button').click(function() { $('.news_rating_container').slideToggle("slow"); }); }); jQuery(document).ready(function($) { jQuery.get("news_ratenews.php?storyid=<{$story.id}>", function(data){ $('#ratenews').html(data); }); }); </script>

and the form:
<form method="post" action="<{$xoops_url}>/modules/news/ratenews.php" id="ratenews"> <input type="hidden" name="storyid" value="<{$news.storyid}>" /> <select name="rating"><option>--</option><option>10</option><option>9</option><option>8</option><option>7</option><option>6</option><option>5</option><option>4</option><option>3</option><option>2</option><option>1</option></select>&nbsp;&nbsp; <input class="formButton" type="submit" name="submit" value="<{$lang_rateit}>" /> </form>

Report
Topic


Re: Mega Menu

  • 2011/2/25 4:20:59
  • Will

Cheat dammit!

Go Get wp-ubermenu... setup a wordpress site, build the menu with the UI... copy source and css to other site :)

Or just use wordpress...

http://wpmegamenu.com/

Report
Topic


Re: Mega Menu

Cool tutorials. Thanks! I'll be looking onto those.

Me on OpenHub

Report
Topic


Topic


Re: Mega Menu

Ohh, fine! Thank you.

4 Augen sehen mehr als 2, hat wieder mal bewahrheitet

http://on.fb.me/x5lEdX
Report
Topic



 Top