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.
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.
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:
@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.
The problem is the way the ratenews.php is coded. Still owrking on solution.
this is from news.. latest from trunk but with different templates..
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.
Quote:
Result was 'story doesn't exist'.
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:
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/
Ohh, fine! Thank you.
4 Augen sehen mehr als 2, hat wieder mal bewahrheitet