Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules
Author Message
draxx
Involved
Involved



Joined: Nov 19, 2003
Posts: 282

PostPosted: Tue Jun 09, 2009 6:56 pm Reply with quote

OKay I got this classifieds module - it was already integrated with nuke. It uses the nuke user table for the login etc.

However it does not run like a module.

I added the standard opening stuff to its index php and it loaded perfectly.
But when I click on a category or something else it does not use index.php - it uses a different php.

So I edited the different.php file and put the standard nuke stuff in the header but when I click on something in the module it crashes
it says:

Warning: main(mainfile.php) [function.main]: failed to open stream: No such file or directory in /var/www/virtual/domain.com/htdocs/modules/Classifieds/showproduct.php on line 19

Fatal error: main() [function.require]: Failed opening required 'mainfile.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/virtual/domain.com/htdocs/modules/Classifieds/showproduct.php on line 19


I'm sure theres something I can do to bypass this but Im just not sure what. Any suggestions?
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Jun 09, 2009 7:10 pm Reply with quote

I have a cleaned up version of NukeC on my site for download. The latest one (beta 2) has the upload feature fixed and several security fixes. nukeWYSIWYG editor integrated also.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
draxx







PostPosted: Tue Jun 09, 2009 7:26 pm Reply with quote

Whats the link for that? I saw an article that said that it was "fixed" but you couldent upload.

Problem is I already paid for this one in part because it handles auctions so Id still want to get this to work for the auctions.

Where is yours? I would run both Smile
 
draxx







PostPosted: Tue Jun 09, 2009 7:38 pm Reply with quote

Okay Duh - got it- am installing it now.

Still though - What can be done about this mainfile issue? Any ideas?
 
nuken







PostPosted: Tue Jun 09, 2009 8:04 pm Reply with quote

How did you include mainfile in showproduct.php?
 
draxx







PostPosted: Tue Jun 09, 2009 8:43 pm Reply with quote

First I tried this:
define('INDEX_FILE', true); //comment this out to hide right blocks
if (defined('INDEX_FILE')) { $index = 1; } else {$index = 0; } // auto set right blocks for pre patch 3.1 compatibility

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- Community Classifieds";


include("header.php");
title("Community Classifieds");

OpenTable();

Then I tried a direct server path to the file:


require_once("/var/www/virtual/domain.com/htdocs/mainfile.php");

When I did that path to the file the errors stopped but it displayed a blank screen. Sad
 
Palbin
Site Admin



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

PostPosted: Tue Jun 09, 2009 9:52 pm Reply with quote

It sounds like this will need significant structural changes to make this a module. I would not call it a module it just has an integrated db. Unless you really understand what you need to do I would just try to run it in a simple module with an iframe.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
draxx







PostPosted: Tue Jun 09, 2009 10:11 pm Reply with quote

Thats how I started it off - with an iframe. But the frame doesnt change my left and right blocks when people click - it just updates the frame. So I dont get the ad impressions I could get.

Also - If we can run it like a module nuke-sent will be able to somewhat protect it. Curious - Why would it work with its index.php but not another file that acts like index.php - displays data from a table? etc. ?

Oh and Is there a way to force the whole page to update with the frame?

Oh and thanks Nuken - once again you are there Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules

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 ©