Navigation

Pligg Support

In this post:
http://pligg.com/support/question/bug-fix-for-the-sidebar-saved-story-module/#question
I fixed a bug in the sidebar_saved Module that was preventing it from loading and displaying the saved stories in the sidebar. The bug was fixed assuming that the purpose of the sidebar_saved module is to list 5 (or the set limit) links in the sidebar, no matter who the logged-in user is. See discussion post:
http://pligg.com/support/question/issue-with-saved-stories/#question
From the discussion in the provided link, I understood from YankiDank that the module was intended to show saved stories that were saved by the logged-in user. In this case, the result is not met.
If you want to show any set of saved stories no matter who saved them, then keep the module as is. However, if you want to only show the saved stories by the logged-in user, then this is the solution:
First, I could not find a Smarty variable for the logged-in user id, so I had to create one as follows:
1. Open \libs\smartyvariables.php
2. Go to line 44 or look for “$main_smarty->assign('user_logged_in', $current_user->user_login);” and paste this right after it:

$main_smarty->assign('user_logged_id', $current_user->user_id);
3. Save and close
4. Open \modules\sidebar_saved\templates\sidebar_saved_index.tpl
5. Go to line 22 or look for “global $the_template, $main_smarty, $db;”
6. Paste this right after it: (this is to import the smarty variable we created above to php and be able to use i
Whenever I try to follow a member by clicking on the follow button I get an error message and I'm unable to follow any member. The message say:

The page you were looking for doesn't exist!
It may have been removed or you may have arrived here by using a bad URL
Try searching for the article you are looking for.
Visit the Homepage to see the most recent stories.
Browse categories and tags to find a related story.

I search for members to follow then click on follow and the button doesn't work or send notification to the member that I'm following the person.
Most of my sites are running WordPress in the root directory (or will be soon) with Pligg in a subdirectory. I did this inorder to be able to run WP as multi-site with the WP domain mapper thinking that down the road I'll possibly be able to multisite the Pligg along side.

I do have one Pligg running several Pligg installs with a single login but haven't got the WordPress to share logins yet. Working on that though! I use RSS to share content from the WP to the Pligg on these sites.

My question is: If you are doing this what are you doing and how deeply tied together are you running this?? I'm looking for ideas to pursue for the benefit of all of us.
To Yankidank and ChuckRost,

I have already submitted 2 fixes and recommendations to help Pliggers with some issues that arise when switching languages, specifically to Arabic. In those fixes I also submitted an accurate translation of lang_arabic for the Simple Messaging module, which can be used and also added to the new Pligg version. I might as well add that I still have a lot to contribute.

Is there a repository where I can also submit these additions, fixes, etc. for you to use what you deem useful for any updates to Pligg CMS?

Thank you!
After you install the Sidebar saved Stories module, you get an error :

" PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY saved_id DESC limit 5' at line 1 in

and the module won't work. To fix it:

open \modules\sidebar_saved\templates\sidebar_saved_index.tpl

go to line 22 and change this:

$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 AND link_author = ".$userid." ORDER BY saved_id DESC limit 5";

To this:

$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 AND link_author = link_author ORDER BY saved_id DESC limit 5";

The error was in:

AND link_author = ".$userid."

It must be :

AND link_author = link_author