Navigation

Pligg Support

Search Results for "stories"
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
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
We are having problems in our home page. We have thousands of stories already published but new ones are not showing in the home. New stories are fine in the database and rss but they do not appear in the home anymore.
the url is: www.bicify.com
Dear Pliggers, I just faced a very strange problem. After I click submit button and leave (discontinue) the submission process in the middle the story gets published in 'NEW' automatically with zero vote, and with blank title. If I continue the submission process then it works fine. Whenever I discontinue the submission process before hitting the final submit button I face this problem. Is this a bug with the latest Pigg 2.1? I Have tried disabling all the modules. Is there anything that I can edit in submit.php? I guess incomplete stories with improper submission should go directly to 'Discard', instead of going to 'New'. Would be really grateful if someone can help me out. Thanks.
Pligg CMS Version: 1.1.5, Can I Remove {if $is_admin} in All stories and be safe or without problems?

file link_summary.tpl Line 100

{if $isadmin}
| {#PLIGG_Visual_AdminPanel_Discard#}
{/if}
Hi !
I have just installed Pligg.. mostly things seemed to go alright during installation. But when I click on the Home Link I just get an error . The admin link is :

http://getjoy.in/gjcomm/admin/admin_links.php

Can't post any stories either !

Pl help, thanks !.. I am not a PHP guy, just a user..
Under the "Votes" tab towards the bottom there is a feature that makes it so that when a story receives a certain number of negative votes it is then discarded.
Well I spent hours today trying to figure out what was causing my stories to be automatically discarded as soon as I submitted them.
I finally discovered that it was the feature mentioned above.
I had mine set to ten. When I set it to zero, turning it off, my test stories started to appear again.
This would be a nice self moderating feature if it could be made to function properly.

Thanks,

Ivan