Keyword

Favorite system

  • Nick
  • Nick's Avatar Topic Author
  • Offline
  • Elite Member
More
13 years 7 months ago #93745 by Nick
Favorite system was created by Nick
I'm working on a favorite system, but I need some help of some javascript programmers to make it pretty. (AJAX is killing me...)

Currently you can only just favorite the items (soon categories) but can't see 'em. I'll add that functionality this week.

Also, this is a hack/mod. Not a plugin, so I need help with that as well.

You can check it out at animekyun.com (NSFW).

This is how it works:

Using the object provided by K2 and Joomla Framework, I can define the userID ItemID and CatID. These variables are then inserted in hidden fields. Only the submit button is visible in the form of a heart. Once it's clicked, the variables are passed onto a php script which queries the DB. It first checks if item is already existing for the user. If not, it will insert the itemid, userid, and catid into the DB. Each favorite has it's own auto increment id just in case i would ever need it.
Once the query is complete, it will notify the user that it's done.

I am however facing 1 little problem. For some reason my javascript is not returning the response of the php script. The php echoes "Success!" on completion but it's not returned. Instead I have the javascript say "Favorited" once it's complete but it should also append my response to that which is not happening. Firebug also reports a undefined response.

Included are the AJAX framework script, the PHP insertion script and the Item.php file.

You need to make your own dbconnect.php script which has the database info for the php insertion script. just define the variables listed in the insertion script.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #93746 by Carlos Salas
Replied by Carlos Salas on topic Favorite system
This sounds great!! Do you fixed it? I'd like to help.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #93747 by gerald sisimayi
Replied by gerald sisimayi on topic Favorite system
Hi,

 

Did you ever get this to work, I would be very interested in it if you did...

 

Regards

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum