Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #71 (permalink)  
Old 04-02-2008, 02:50 AM
New Pligger
 
Join Date: Sep 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
syntax error near 'AND `link_author` = 1 ORDER BY `link_date` DESC LIMIT 1'

I would love to know how to fix this also...... I am trying to find where this line of code even resides at....

Thanks,

Brian
Reply With Quote
  #72 (permalink)  
Old 04-02-2008, 09:39 AM
Casual Pligger
 
Join Date: Feb 2008
Posts: 48
Thanks: 3
Thanked 4 Times in 3 Posts
Quote:
Originally Posted by Relative0 View Post
I would love to know how to fix this also...... I am trying to find where this line of code even resides at....

Thanks,

Brian
It's probably in the link.php file. check whether your WHERE clause is empty or not. I had the same problem but solved.
Reply With Quote
  #73 (permalink)  
Old 04-12-2008, 07:01 PM
New Pligger
 
Join Date: Sep 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ivytony View Post
It's probably in the link.php file. check whether your WHERE clause is empty or not. I had the same problem but solved.
Thanks kindly for the idea, I am guessing that you are right and that I am still doing something wrong. Here is what I have for a few lines of code in store_basic() in the libs/link.php:

Code:
if($this->id===0) {
			$sql = "INSERT INTO " . table_links . " (link_author, link_status, $link_type, link_randkey, link_category,  link_date, link_published_date, link_votes, link_karma, link_title, link_content) VALUES ($link_author, '$link_status', '$link_type', $link_randkey, $link_category, FROM_UNIXTIME($link_date), FROM_UNIXTIME($link_published_date),$link_votes, $link_karma)";
			if($this->debug == true){echo '<hr>store_basic:Insert:' . $sql . '<hr>';}
			$db->query($sql);
			$this->id = $db->insert_id;
		} else {
		// update
			$sql = "UPDATE " . table_links . " set `link_reports`=$link_reports, `link_comments`=$link_comments, link_author=$link_author, link_status='$link_status', link_randkey=$link_randkey, link_category=$link_category, link_modified=NULL, link_date=FROM_UNIXTIME($link_date), link_published_date=FROM_UNIXTIME($link_published_date), link_votes=$link_votes, link_karma=$link_karma, link_field1='$link_field1', link_field2='$link_field2' WHERE link_id=$this->id";

			// Brian had originally Added this ,link_field1='$link_field1', link_field2='$link_field2' WHERE link_id=$this->id"  But it is changed bacl now.
			// In place of  WHERE link_id=$this->id";

			if($this->debug == true){echo '<hr>store_basic:Update:' . $sql . '<hr>';}
			$db->query($sql);
		}
The error that I get is such:

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 'AND `link_author` = 1 ORDER BY `link_date` DESC LIMIT 1' at line 1 in /home/content/html/Pligg98/libs/db.php on line 233


Any ideas? Thanks much,

Brian

Last edited by Relative0; 04-12-2008 at 07:04 PM.. Reason: I wanted to insert the error that I got
Reply With Quote
  #74 (permalink)  
Old 05-06-2008, 02:34 PM
abraxas's Avatar
Pligg Donor
Pligg Version: Plig
Pligg Template: b-Ice
 
Join Date: Feb 2008
Location: Boulder county, CO.
Posts: 104
Thanks: 26
Thanked 1 Time in 1 Post
shoulde be simple, but...

I've uploaded scriptaculous to the module folder, but I can not install it as it does not show up in the admin/module management
Is this where it should show up?

I can not find instructions on installing the modified scriptaculous.

Thank you.
Reply With Quote
  #75 (permalink)  
Old 05-18-2008, 01:26 PM
Casual Pligger
Pligg Version: 9.8
Pligg Template: forum
 
Join Date: Oct 2007
Posts: 51
Thanks: 9
Thanked 1 Time in 1 Post
I am getting this error upon selecting article or video:

URL is invalid or blocked: (http://)

EDIT: Nevermind - fixed

Last edited by xmlham; 05-18-2008 at 01:32 PM..
Reply With Quote
  #76 (permalink)  
Old 05-18-2008, 01:58 PM
Casual Pligger
Pligg Version: 9.8
Pligg Template: forum
 
Join Date: Oct 2007
Posts: 51
Thanks: 9
Thanked 1 Time in 1 Post
Quote:
Originally Posted by Relative0 View Post
Thanks kindly for the idea, I am guessing that you are right and that I am still doing something wrong. Here is what I have for a few lines of code in store_basic() in the libs/link.php:

Code:
if($this->id===0) {
			$sql = "INSERT INTO " . table_links . " (link_author, link_status, $link_type, link_randkey, link_category,  link_date, link_published_date, link_votes, link_karma, link_title, link_content) VALUES ($link_author, '$link_status', '$link_type', $link_randkey, $link_category, FROM_UNIXTIME($link_date), FROM_UNIXTIME($link_published_date),$link_votes, $link_karma)";
			if($this->debug == true){echo '<hr>store_basic:Insert:' . $sql . '<hr>';}
			$db->query($sql);
			$this->id = $db->insert_id;
		} else {
		// update
			$sql = "UPDATE " . table_links . " set `link_reports`=$link_reports, `link_comments`=$link_comments, link_author=$link_author, link_status='$link_status', link_randkey=$link_randkey, link_category=$link_category, link_modified=NULL, link_date=FROM_UNIXTIME($link_date), link_published_date=FROM_UNIXTIME($link_published_date), link_votes=$link_votes, link_karma=$link_karma, link_field1='$link_field1', link_field2='$link_field2' WHERE link_id=$this->id";

			// Brian had originally Added this ,link_field1='$link_field1', link_field2='$link_field2' WHERE link_id=$this->id"  But it is changed bacl now.
			// In place of  WHERE link_id=$this->id";

			if($this->debug == true){echo '<hr>store_basic:Update:' . $sql . '<hr>';}
			$db->query($sql);
		}
The error that I get is such:

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 'AND `link_author` = 1 ORDER BY `link_date` DESC LIMIT 1' at line 1 in /home/content/html/Pligg98/libs/db.php on line 233


Any ideas? Thanks much,

Brian
Check on Page 3...Genghis posted a modified link.php file that gets rid of the error

Does anyone have this error:

Fatal error: Call to undefined function: verify_ownership() in /home/xxxx/domains/xxxxx.com/public_html/submit.php on line 220

Last edited by xmlham; 05-18-2008 at 02:04 PM..
Reply With Quote
  #77 (permalink)  
Old 05-21-2008, 01:58 PM
New Pligger
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hey, i'll try this code, it seems to be exactly what i need
Reply With Quote
  #78 (permalink)  
Old 07-24-2008, 08:31 PM
Constant Pligger
 
Join Date: Apr 2006
Location: USA
Posts: 576
Thanks: 31
Thanked 24 Times in 20 Posts
Cool

This is a great mod, just having one problem right now though.

Fresh install of latest version of pligg with GarrX9 template. Replaced existing scriptaculous code with that provided in this thread. Uploaded the stuff correctly, and remembered to put the template files in the correct directory.

The problem comes when reaching step 3 of the submission process. After filling out step 2 and clicking the button to move on, the page that should be step 3 is all white with no code in sight.


Any ideas on what could be wrong?
__________________
God bless,
-en3r0

Torrop.com - Torrent and P2P News
MemeVote.com - Find and vote on Memes
Reply With Quote
  #79 (permalink)  
Old 07-27-2008, 01:11 AM
Constant Pligger
 
Join Date: Apr 2006
Location: USA
Posts: 576
Thanks: 31
Thanked 24 Times in 20 Posts
Any suggestions would be much appreciated!
__________________
God bless,
-en3r0

Torrop.com - Torrent and P2P News
MemeVote.com - Find and vote on Memes
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
[MOD] Thickbox Module for Pligg cent Modification Tutorials 35 11-19-2008 09:54 AM
Fixes to Profile Extra Fields Module v0.2 and Extended Profile Module v0.1 redwine Modification Tutorials 3 10-18-2008 10:28 AM
What functions do I lose if I disable scriptaculous module deeplygreen General Help 1 02-05-2008 06:21 PM
READ ME FIRST: Pligg Module Thread Rules Yankidank Pligg Modules 0 12-01-2007 04:16 PM
Lightbox Thickbox Scriptaculous jbquery revolver Modification Tutorials 3 04-18-2007 12:54 PM


Search Engine Friendly URLs by vBSEO 3.2.0