Keyword

Favorite Item Module - Freelancer to do it faster?

  • Markus
  • Markus's Avatar
  • Visitor
14 years 4 months ago #75662 by Markus
Hi,

okay now i have the "add to favs". but where can i see all my favs?

Andreas Renberg said:Markus said:Hi, thx Andreas. But there are some "probs" in your code: com_planeringsverktyg ??? it should be com_k2,or?

Yep, as I said, that was just a direct copy from my original code so it can be used as soon as possible for those of you in a hurry to get this.

However, now it is all fixed and ready!
iqandreas.blogspot.com/2010/06/joomla-k2-favorites-plugin-tr...

Do you have any further questions or suggestions? I'd be happy to hear them and implement them!

Andreas

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

More
14 years 4 months ago #75663 by sigpro_firsttry
Replied by sigpro_firsttry on topic Favorite Item Module - Freelancer to do it faster?
Hi Andreas,

thank you for your work.
The problem on my side is the same as Markus´s. I see the "Add item to favorites" link on top of the K2 item view but i don´t see any link to "all my favorites" or something like that.
I think the favorite items should be listed on the author-page. A backend-option would be fine to set the favorites as private or public.

The second problem is: When re-viewing the k2 item i can add that item to favorites again.
So it doesn´t seem to store the favorites.
The same occurs when i remove the item from favorites. On re-viewing that item i again get the "remove from favorites"-link. So that info doesn´t seem to be stored as well.
When using JA_Purity template i even don´t see the "Add item to favorites" -link.

I attached screenshots of the "jos_k2_favorites" table in phpmyadmin. Maybe it´s about that configuration (especially regarding the "primary key")?

In my opinion we can only set one key as the "primary key"?!

Best!
Attachments:

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

More
14 years 4 months ago #75664 by Andreas Renberg
Replied by Andreas Renberg on topic Favorite Item Module - Freelancer to do it faster?
Markus said:okay now i have the "add to favs". but where can i see all my favs?
I added a FAQ page with that solution, plus a few more questions I have been asked
iqandreas.blogspot.com/2010/06/joomla-k2fave-frequently-aske...


@sigpro - Sorry I didn't have enough time to finish the part on setting up the database today. It's 4AM in my time zone, and I'm getting quite tired, but first thing tomorrow morning I will answer that question more fully.

It's not as common setting only one primary key, but try checking both of the rows in the checkboxes, and below them there should be a list of options. The button with the key on it should set it properly, but make sure both rows are selected first.

You might have to clear all duplicates out of the table in order to make the changes to the database work properly.


If that doesn't fix it, I'll try again tomorrow.

Thanks for the screenshots by the way, it always helps diagnosing problems when you have a clear view of what you see and what problem is actually occurring.

Cheers,
Andreas

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

  • Markus
  • Markus's Avatar
  • Visitor
14 years 4 months ago #75665 by Markus
Hi,

found this Component and Plugin:
www.instantiate.co.uk/joomla-extensions/components/favourite-listings

But this is for com_content. maybe someone can rework this for k2....

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

More
13 years 10 months ago #75666 by Curry Roberts
Replied by Curry Roberts on topic Favorite Item Module - Freelancer to do it faster?
I feel stupid.....this looks easy enough to implement, but no success. I get the link to add/remove favs at the top but I can't get the list of favs to show. Any help? I suppose that what I need is a teacher/child lesson. For example: Go to this.page.toeidt.php and place this code on line 34. Now to get items to show go to this.another.page.php and paste this code on line 47.

Any help from anyone that his this working would be greatly appreciated! :)

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

More
13 years 10 months ago #75667 by sigpro_firsttry
Replied by sigpro_firsttry on topic Favorite Item Module - Freelancer to do it faster?
Hi,

there was a quick explanation at the author´s site that showed how to handle this code.
I remember he offered to install his code as a paid work as well.




Curry Roberts said:I feel stupid.....this looks easy enough to implement, but no success. I get the link to add/remove favs at the top but I can't get the list of favs to show. Any help? I suppose that what I need is a teacher/child lesson. For example: Go to this.page.toeidt.php and place this code on line 34. Now to get items to show go to this.another.page.php and paste this code on line 47.
Any help from anyone that his this working would be greatly appreciated! :)

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

More
13 years 10 months ago #75668 by Curry Roberts
Replied by Curry Roberts on topic Favorite Item Module - Freelancer to do it faster?
I never could get it to work properly, viewing the list of favorites. I can add to favorites, but that is about all. I am sure that there is a step that I am missing, or perhaps placing the code in the wrong place...but nothing I have done seems to work.

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

More
13 years 6 months ago #75669 by gerald sisimayi
Replied by gerald sisimayi on topic Favorite Item Module - Freelancer to do it faster?
Any update on this project? Anyone get it to work?

 

Regards

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

More
11 years 11 months ago #75670 by Shapes
Hello,

Has anyone got this finally working ?

With latest files and info, I have been able to show button and add info to databse, but the remove button does not work, and I can't show favorites, it shows an empty table :
<table></table>

Using latest versions of k2 and Joomla.

Hoping for answers,
Best regards,
David aka Shapes

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

More
11 years 11 months ago - 11 years 11 months ago #75671 by Shapes
Hi again,

I managed to solve one problem here, the "remove" function.

In file "k2fave_k2item.html.php", i changed :

//This POST/GET system is different for a reason.
//These use the "id" property from k2, and the custom "fave" command
switch(JRequest::getCmd(REQ_K2ITEM_COMMAND))
{
case REQ_ADD_FAVE:
K2Fave::addFavorite($userID, $itemID);

//HTML
echo T_NOW_IN_FAVES;

break;

case REQ_REMOVE_FAVE:
K2Fave::addFavorite($userID, $itemID);
//Display the removal confirmation
echo T_REMOVED_FROM_FAVES;

break;

to :

//This POST/GET system is different for a reason.
//These use the "id" property from k2, and the custom "fave" command
switch(JRequest::getCmd(REQ_K2ITEM_COMMAND))
{
case REQ_ADD_FAVE:
K2Fave::addFavorite($userID, $itemID);

//HTML
echo T_NOW_IN_FAVES;

break;

case REQ_REMOVE_FAVE:
K2Fave::removeFavorite($userID, $itemID);
//Display the removal confirmation
echo T_REMOVED_FROM_FAVES;

break;


I now still have the problem to display the favorites, which is still an empty table.

The method I use for now is that I added at the bottom of my "item.php" :
<div class="favorites">
<?php include(JPATH_BASE.DS.'components'.DS.'com_k2'.DS.'k2fave'.DS.'viewfaves.html.php'); ?>
</div>

I would like to have it displayed on the items themselves, and in a module..

Hoping for answers,
Best regards,
David aka Shapes

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


Powered by Kunena Forum