PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
janeuk
Regular
Regular


Joined: Oct 13, 2007
Posts: 61

PostPosted: Tue Nov 10, 2009 4:50 am Reply with quote Back to top

Hi,
I was in need of a feedback system, so thought I could try to modify the Reviews module to suit the purpose. I copied the module & database files and renamed it, so it is like a new module but I am finding when I do a test of adding a review, it goes to a page that says it has been saved in the database but then when I go to the Reviews index page it doesn't show any reviews at all and at the bottom of the page it says there are 0 reviews in the database, so must be a database issue. Please could someone tell me what I would have to change in the Reviews module code to make it connect properly with the database - I have changed code such as $prefix_reviews to the same name as what it is in the database, and renamed the module in the admin files but apart from that I'm not sure what else I have to do to make it work properly.

Thanks in advance for any help anyone can give me with this Smile

Jane
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Nov 10, 2009 6:41 am Reply with quote Back to top

Are you getting an errors in your php log?
View user's profile Send private message
janeuk
Regular
Regular


Joined: Oct 13, 2007
Posts: 61

PostPosted: Wed Nov 11, 2009 8:22 am Reply with quote Back to top

Hi,

Yes I do have errors in the php log, which are

[10-Nov-2009 06:27:09] PHP Warning: Missing argument 11 for preview_review(), called in /home/xxxx/public_html/modules/Feedback_1/index.php on line 56 and defined in /home/xxxxx/public_html/modules/Feedback_1/index.php on line 181
[10-Nov-2009 06:27:09] PHP Warning: Missing argument 12 for preview_review(), called in /home/xxxxx/public_html/modules/Feedback_1/index.php on line 56 and defined in /home/xxxxx/public_html/modules/Feedback_1/index.php on line 181


I have checked what the code is on line 56 and 181, but I don't really understand what could be wrong, perhaps you might know what the issue is, I have included the code that is on these lines below

LINE 56 READS

case 'preview_review':
preview_review($date, $title, $text, $reviewer, $email, $score, $cover, $hits, $id, $rlanguage);
break;


LINE 181 READS

function preview_review($date, $title, $text, $reviewer, $email, $score, $cover, $hits, $id, $rlanguage) {
global $admin, $multilingual, $module_name;
if (eregi('<!--pagebreak-->', $text)) {
$text = ereg_replace('<!--pagebreak-->', '&lt;!--pagebreak--&gt;', $text);

Thanks for your help Smile

Paths edited by admin
View user's profile Send private message
janeuk
Regular
Regular


Joined: Oct 13, 2007
Posts: 61

PostPosted: Mon Nov 16, 2009 8:59 pm Reply with quote Back to top

Please can someone help me understand what these errors are, so that I might be able to correct the problem?

Thanks for any help Smile
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Tue Nov 17, 2009 12:38 am Reply with quote Back to top

looks like you removed some of the variables in
case 'preview_review':

you have 10 and there were 12, so thus the missing argument 11 and 12...

probably just a matter of making some more changes to the module, some function somewhere is still expecting those variables to be there.

did you edit the admin files to correspond to your changes? This one near the bottom of Reviews/admin could be the culprit.
Code:

$db->sql_query('INSERT INTO ' . $prefix . '_reviews VALUES (NULL, \'' . $date . '\', \'' . $title . '\', \'' . $text . '\', \'' . $reviewer . '\', \'' . $email . '\', \'' . $score . '\', \'' . $cover . '\', \'' . $url . '\', \'' . $url_title . '\', \'1\', \'' . $rlanguage . '\')');
View user's profile Send private message
janeuk
Regular
Regular


Joined: Oct 13, 2007
Posts: 61

PostPosted: Tue Nov 17, 2009 4:44 am Reply with quote Back to top

Thank you, thats been very helpful Smile Its probably the $url & $url_title which I removed, but never made the same changes in the admin files, so I'll take a look at that.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum