Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Dec 23, 2006 5:36 pm Reply with quote

Try changing this section of code to whats posted here
Code:


while($i>0) {
        //echo "$file_names[$i]<br>";
        $title = eregi_replace("(.+)(\.)(.+)","\\1",$file_names[$i]);
        $url = $url_downloads_folder.$file_names[$i];
        $the_sql_querys .= "insert into ".$prefix."_downloads_downloads values
(NULL, '$cat', '0', '$title', '$url', '$description', now(), '$name', '$email',
'$the_hits','$name','0.0000','0','0', '$filesize', '$version', '$homepage');<br><br>";
        $i--;
}
 
View user's profile Send private message Send e-mail
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Sat Dec 23, 2006 9:22 pm Reply with quote

I noticed when I copied the script from Chris' site that the second variable you change to '$name' showed as a double-quote character, which if copied directly, would likely cause a SQL error. You could change it to 2 single quotes '', but Guardian's idea of using the $name variable might be useful for descriptive purposes.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
thebishop
Worker
Worker



Joined: Aug 30, 2005
Posts: 244
Location: Flying to close to the sun

PostPosted: Sat Dec 23, 2006 11:33 pm Reply with quote

If this helps, Here is what jaded had to say about this.
Quote:
JadedHere is your current insert via the script and the current one via the database tables. You can see many things are missing.


Code:


Insert into nuke_downloads_downloads values (NULL, '2', '0', 'winmtr', 'http://www.mysite.com/homefries/downloads/PC_utilities/winmtr.exe', 'PC tools', now(), 'ThePowerCosmic', 'webmaster@mysite.com', '0','0','0','0', '0', '', 'http://www.mysite.com');
 

INSERT INTO `nuke_downloads_downloads` VALUES (1, 1, 0, 'dod1.3_enhancement_pack', 'http://mysite.com/homefries/dod_files/dod1.3_enhancement_pack.exe', 'the dod1.3_enhancement_pack includes an FPS & Ping booster as well as 16 custom crosshairs you can toggle through while playing,a custom VGUI for changing classes,font fixes for amxstats and also ingame wave files that have been reduced or amplified to make the game more pleasant to play.', '2006-11-24 13:41:49', 'ThePowerCosmic', 'Webmaster@mysite.com', 141, '', 0.0000, 0, 0, 13, '1.5 final', 'http://mysite.com');
 
View user's profile Send private message
thebishop







PostPosted: Sat Dec 23, 2006 11:43 pm Reply with quote

kguske, Yes i'm using the fixed version of that script from chris's site.
ravens site will not let me post the code from the script. Sad
 
thebishop







PostPosted: Sat Dec 23, 2006 11:49 pm Reply with quote

BTW, i just want to say that the help i receive from the people on this site is invaluable and I never want anyone to think that i'm just too lazy to do things for myself or to learn. believe me i really try.. So please always let me know if you feel you need to be compensated for your time. i am more then willing to pay you for your knowledge and expertise.


Last edited by thebishop on Sun Dec 24, 2006 6:47 am; edited 1 time in total 
thebishop







PostPosted: Sat Dec 23, 2006 11:57 pm Reply with quote

Guardian2003 wrote:
Try changing this section of code to whats posted here
Code:


while($i>0) {
        //echo "$file_names[$i]<br>";
        $title = eregi_replace("(.+)(\.)(.+)","\\1",$file_names[$i]);
        $url = $url_downloads_folder.$file_names[$i];
        $the_sql_querys .= "insert into ".$prefix."_downloads_downloads values
(NULL, '$cat', '0', '$title', '$url', '$description', now(), '$name', '$email',
'$the_hits','$name','0.0000','0','0', '$filesize', '$version', '$homepage');<br><br>";
        $i--;
}


Ok i added that code and tried it and got the same error.
"#1136 - Column count doesn't match value count at row 1"

EDIT it did work but mysql gave me that error anyway. see post below.


Last edited by thebishop on Sun Dec 24, 2006 6:50 am; edited 3 times in total 
Guardian2003







PostPosted: Sun Dec 24, 2006 5:11 am Reply with quote

Hmm.
OK can you email me the file you are using to webmaster AT code-authors DOT com I'll see if I can take a look at it before I have to go out.
 
thebishop







PostPosted: Sun Dec 24, 2006 6:45 am Reply with quote

Ok i thought this had not worked because mySQL barked an error at me and did not say SUCCESS. so my first email to you had the original script, then after noticing my two new downloads on my site I remailed you the script with the edit you posted above.
 
thebishop







PostPosted: Fri Jan 12, 2007 4:16 am Reply with quote

I tested this script the other day and added 271 new downloads in under two minutes. The script now works great. it's a breeze to add a ton of downloads now.


Last edited by thebishop on Fri Jan 12, 2007 1:47 pm; edited 1 time in total 
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Fri Jan 12, 2007 8:25 am Reply with quote

please post a link to a zip file of thise script as it works now. That way I can add it for download to help many others. Smile

_________________
Themes BB Skins [ Only registered users can see links on this board! Get registered or login! ]
Graphic Tees [ Only registered users can see links on this board! Get registered or login! ]
Paranormal Tees [ Only registered users can see links on this board! Get registered or login! ]
Ghost Stories & More [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
thebishop







PostPosted: Fri Jan 12, 2007 2:45 pm Reply with quote

this script now works for Nuke 7.6-3.3.
heres the link to download the downloadadd.php script for inserting a ton of downloads all at once. HERE


Last edited by thebishop on Sun Jan 28, 2007 1:07 pm; edited 2 times in total 
jaded







PostPosted: Fri Jan 12, 2007 2:48 pm Reply with quote

thank you very much. i am glad it finally got working!
 
thebishop







PostPosted: Fri Jan 12, 2007 7:23 pm Reply with quote

Chatserv got it working for me, i just created the .htaccess file and the new readme because there wasn't really any instructions for it except in the nuke how too.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©