Navigation

Pligg Support

Live Answer Submissions
Answer Author Story Ago
The latest Github version fixes the main issue mentioned on this thread concerning the Follow and Unfollow buttons not working. These changes will be present in a 2.0.2 release in the near future. Here are the 2 fixes related to this issue: https://github.com/Pligg/pligg-cms/commit/c5aa84d4e6044e604cb82c01adc5f48519eb51ec https://github.com/Pligg/pligg-cms/commit/884593440b5f0c6bc6d01671ee91289c2d71a20d I'm waiting Redwine's changes to see what he's come up with. Yankidank Cannot Follow Members 102 days
Yes this what I will do for you, send the changed files as a zip. Do I repost the changes for the users' immediate work around as well? The follow/unfollow is the least of the worries, but I fixed them. The big problem was the whole process that needed to be changed in order to properly apply the messaging rights. As it is now, the queries to get the status of the friend is problematic as it always give you the id of the first found to all the others... You will see the amount of changes made. redwine Cannot Follow Members 102 days
Thanks for the snippet. I've applied a similar solution to Pligg CMS 2.0.2 (still in development right now) so that others can take advantage of this feature. The style.css file will include a blank #categories li.selected { } property awaiting a style. https://github.com/Pligg/pligg-cms/commit/69d8190b8c59be0f1f59bcd4181bbb74bd273ad0 Yankidank Change Subnav Category Color When Selected 102 days
If you are able to pick out just that changed files, it should be simple for me to compare your files to the latest and to merge them in. Just bundle up the files as a .zip and attach (or send as a link). I just posted a couple fixes related to the Follow / Unfollow button URLs. You can see my latest commit notes here: https://github.com/Pligg/pligg-cms/commits/master Yankidank Cannot Follow Members 102 days
I have changed a lot in the logic of the process and the coding to make it work. The way it is now is a maze. redwine Cannot Follow Members 102 days
I have a partial fix that I've pushed to Github. This will make it so that the user search and profile page follow/unfollow button links will work. There is still a problem with the unfollow links that are appearing on the user profile friend list. https://github.com/Pligg/pligg-cms/commit/c5aa84d4e6044e604cb82c01adc5f48519eb51ec Yankidank Cannot Follow Members 102 days
I will finish it today. I posted it yesterday then removed it because of a bug that still lurking around. I am almost done and changed the whole logic of it and believe me it is coming great! redwine Cannot Follow Members 102 days
I can verify that this bug exists. The follow and unfollow buttons from the user search function returns a 404 page. I will try to look into it further if Redwine hasn't posted a fix yet. Yankidank Cannot Follow Members 102 days
Yes, I am working on fixing the whole code of adding friends and simple messaging. I was supposed to finish and post the solution tonight or tomorrow morning but it seems it will take the entire tomorrow as I am finding a lot of bugs. redwine Cannot Follow Members 103 days
Thank you for bringing this flaw up, so that we fix it! :-) redwine Solution fro the sidebar saved stories to display only those belonging to the logged-in user 105 days
Maan it works like a charm! You are perfect! It's great to have you here. user_4343977 Solution fro the sidebar saved stories to display only those belonging to the logged-in user 105 days
**ATTENTION YANKIDANK to uodate the Github*** In \templates\bootstrap\pligg.tpl LINE 174, we find: {include file=$the_template"/functions/bookmark.tpl"} The \templates\bootstrap\functions\bookmark.tpl includes the scripts for the add/remove bookmarks and the ajax call to update the sidebar saved stories. Open \modules\sidebar_saved\update_rightpanel.php 1- On LINE 13 (right before the query) add the following to get the main smarty variable of the logged in user: global $the_template, $main_smarty, $db; $user_logged_id = $main_smarty->get_template_vars('user_logged_id'); Replace the query: $res = "select link_id,link_title,saved_id,saved_user_id,saved_link_id from ".table_links.",".table_saved_links." WHERE saved_link_id = link_id ORDER BY saved_id DESC limit 5"; With this: $res = "select link_id,link_title,saved_id,saved_user_id,saved_link_id from ".table_links.",".table_saved_links." WHERE saved_user_id =$user_logged_id and link_id = saved_link_id ORDER BY saved_id DESC limit 5"; Save and close. NOTE I am still using $user_logged_id to be conform to what I used above in the original fix. If you used YankiDank’s Github commit, then use: global $the_template, $main_smarty, $db; $user_id = $main_smarty->get_template_vars('user_id'); $res = "select link_id,link_title,saved_id,saved_user_id,saved_link_id from ".table_links.",".table_saved_links." WHERE saved_user_id =$user_id and link_id = saved_link_id ORDER BY saved_id DESC limit 5"; Now whenever a story is added/removed, there is no need to refresh as this fix will properly update the sidebar saved stories. redwine Solution fro the sidebar saved stories to display only those belonging to the logged-in user 105 days
@yankidank just write a short how to man! user_7205927 Anybody else besides me (and this site) running Pligg and WordPress together? 105 days
that's just perfect! user_4343977 Fully working implementation to display Total Story Views in the story summary. 106 days
I am glad it's working. I will take a look tomorrow and closely check the refreshing issue and possibly eliminate the need to it. redwine Solution fro the sidebar saved stories to display only those belonging to the logged-in user 106 days
Ok, the solution is to refresh a page, after refreshing page it works fine. :D That's true you were right and I didn't check it. Nevertheless I have strange behaviour on the dynamic part of adding to sidebar saved. When I don't refresh page and I only click to add 1 story to bookmarks it sometimes adds more (for example it still remembers a story that i have added previously,and later removed from bookmarks - and refreshed site). After I refresh site once again it goes back to normal and shows proper stories in 'sidebar saved'. So there is a tiny flaw that could be improved. Please don't get me wrong - I am grateful that you have wrote the code - Thanks very much for your thorough explanation. user_4343977 Solution fro the sidebar saved stories to display only those belonging to the logged-in user 106 days
Furthermore, here is the saved_links table with explanation. (attached) redwine Solution fro the sidebar saved stories to display only those belonging to the logged-in user 106 days
And here are the snapshots redwine Solution fro the sidebar saved stories to display only those belonging to the logged-in user 106 days
"Conclusion: When someone adds to bookmarks a story that is submitted by somebody else then this story shows up on both accounts in sidebar_saved. (on his account and the author of added story account) " That's a completely wrong conclusion my friend! I just added this post as story on my development site by a new user. Then, user redwine added it. It showed in the saved stories for redwine but NOT to Giorgio who submitted the stories. To elaborate more: here is the query to get who saved what and display the stories for each user: $res = "select link_id,link_title,saved_id,saved_user_id,saved_link_id from ".table_links.",".table_saved_links." WHERE saved_user_id =$user_logged_id and link_id = saved_link_id ORDER BY saved_id DESC limit 5"; if you notice in the WHERE clause, we are specifically asking for: WHERE saved_user_id =$user_logged_id This means we are limiting the result to only those stories bookmarked by the logged in user, hence we created the samrty variable in the smartyvariables.php Now if it happens that the submitter of the story bookmarked it and another user bookmarked it as well, then yes it will show to both in the saved stories. Have you tried to refresh the page after bookmarking a story? redwine Solution fro the sidebar saved stories to display only those belonging to the logged-in user 106 days
So, I did a new installation of pligg from github master so I didn't change anything and it still doesn't work. The files are made exactly in a way that 'Yankidank' commited . (So they have right prefixes) Here you have my test case which shows a bug: 1. Create admin account during new installation of pligg. 2. Submit a story from admin account. 3. Register new account : 'user1' 4.Logged in as 'user1' submit a story. So right now you have 2 stories One made by admin and second by user1. 5. While still logged in as 'user1' please add to bookmarks only the story that was submitted by admin (admin is the author). 6. Log out and Log in as admin. 7. Add to bookmarks story that was submitted by user1. 8. Now look to sidebar your sidebar saved storied -> There are 2 stories. Conclusion: When someone adds to bookmarks a story that is submitted by somebody else then this story shows up on both accounts in sidebar_saved. (on his account and the author of added story account) To be exact It will appear on the user account who adds the story (authored by some other person) to his bookmarks (which is good), and on account of the author of that story in sidebar_saved (which is wrong). user_4343977 Solution fro the sidebar saved stories to display only those belonging to the logged-in user 106 days