Author Topic: [MOD] PHPNuke Module  (Read 71325 times)

0 Members and 1 Guest are viewing this topic.

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« on: May 09, 2003, 08:32:35 AM »
This mod will show you how to alter 4Images gallery and turn it into a PHPNuke Module.

Download  
Demo (On Working Site)
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
error
« Reply #1 on: May 09, 2003, 08:50:25 AM »
hi,

thank you for the mod, but theres a error when i'm downloading it:

"Sorry, this Module isn't active!"

cu
markus oeder

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #2 on: May 09, 2003, 09:04:34 AM »
Sorry did not activate the download section yet.  Was making a few minor corrections.
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
existing user
« Reply #3 on: May 09, 2003, 05:47:01 PM »
my gallery was installed 1 year ago. now there are 2.600 user registered.

ich have installed a fresh installation of phpnuke 6.5 (0 user) and want to use the 4images-gallery as a nuke-module.

is it possible to covert the user-tables from 4images to phpnuke???
please help!

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #4 on: May 09, 2003, 07:15:26 PM »
The mod above does not include how I integrated the logins for both of them it is just to create the PHPNuke module.

A short answer to your question is yes but carefully!

I will post the addition to this for integrated logins once I have it done.

Gustave
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline limes

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
problem
« Reply #5 on: May 09, 2003, 11:05:27 PM »
hi,

i have done all the modifications to integrate 4images gallery into a PHPNuke Module



but when i'm start "gallery" i get the message:



the file contains:



what's going wrong?

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #6 on: May 09, 2003, 11:39:35 PM »
This will not deal with your modules.php file.

I would have to look and see what you did with your site to know for sure what you have have done with the files.

I went to your site but it looks like your  modules/Gallery/index.php file was not altered at all.
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline SantaZ

  • Hero Member
  • *****
  • Posts: 885
    • View Profile
[MOD] PHPNuke Module
« Reply #7 on: May 10, 2003, 12:46:10 PM »
hello,

I become some errors and canīt find the mistake.

for example: When I can me to register I become these error lines

-------------------------

Warning: Failed opening 'modules/gallery/global.php' for inclusion (include_path='.:..') in /www/htdocs/v035423/images/modules/gallery/register.php on line 29

Fatal error: Failed opening required 'modules/gallery/includes/sessions.php' (include_path='.:..') in /www/htdocs/v035423/images/modules/gallery/register.php on line 30

-------------------------



I have edited all files from ".php?" to "&".
But not the these "index.php" or "register.php". Links who have a fix hit.
Is this OK?


Is it possible that someone send me the corrected files, please.
cu SantaZ

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #8 on: May 10, 2003, 06:43:44 PM »
Quote from: SantaZ

But not the these "index.php" or "register.php". Links who have a fix hit.


This is either an all or not mod.  You have to alter all the files that I mention in the tutorial or it won't work.

You did not put this in one file:

define('ROOT_PATH', 'modules/Gallery/');

Quote from: SantaZ

Is it possible that someone send me the corrected files, please.


If I were to allow people to download the corrected files I would basically be distributing the whole script which I am pretty sure Jan would not allow me to do, because I know if I owned the rights to this script I would not allow somebody else to do this.

This is why I made the tutorial.
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline le_ninja_blanc

  • Pre-Newbie
  • Posts: 6
    • View Profile
[MOD] PHPNuke Module
« Reply #9 on: May 11, 2003, 03:08:06 AM »
The mod works very well on my phpnuke 6.5 but I can't use the comments and the rating system !!!!

When I want to rate a picture or post a comment i have this error :
"Sorry, you can't access this file directly..."

I have replace all .php? by &

Offline le_ninja_blanc

  • Pre-Newbie
  • Posts: 6
    • View Profile
[MOD] PHPNuke Module
« Reply #10 on: May 11, 2003, 03:11:32 AM »
This problem is already present on your website Gallery :
http://www.dahlfamily.net/modules.php?name=Gallery

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #11 on: May 11, 2003, 03:31:57 AM »
I am working on my database integration.  The problem is with your global.php file.  I will post the change here in a minute.

Gustave
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #12 on: May 11, 2003, 03:36:18 AM »
In you global.php file you have to change the following lines  178 and 181.

Quote
 if (preg_match("/details.php/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
    $self_url .= "?".URL_IMAGE_ID."=".$image_id;
  }
  elseif (preg_match("/categories.php/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
    $self_url .= "?".URL_CAT_ID."=".$cat_id;


to

Quote
 if (preg_match("/details/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
    $self_url .= "?".URL_IMAGE_ID."=".$image_id;
  }
  elseif (preg_match("/categories/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
    $self_url .= "?".URL_CAT_ID."=".$cat_id;


Let me know if this fixes your rate and comment section.

Gustave
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net

Offline le_ninja_blanc

  • Pre-Newbie
  • Posts: 6
    • View Profile
[MOD] PHPNuke Module
« Reply #13 on: May 11, 2003, 03:08:24 PM »
Quote from: n2972s
In you global.php file you have to change the following lines  178 and 181.

Quote
 if (preg_match("/details.php/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
    $self_url .= "?".URL_IMAGE_ID."=".$image_id;
  }
  elseif (preg_match("/categories.php/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
    $self_url .= "?".URL_CAT_ID."=".$cat_id;


to

Quote
 if (preg_match("/details/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
    $self_url .= "?".URL_IMAGE_ID."=".$image_id;
  }
  elseif (preg_match("/categories/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
    $self_url .= "?".URL_CAT_ID."=".$cat_id;


Let me know if this fixes your rate and comment section.

Gustave


Sorry, I have the same problem

Offline n2972s

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.dahlfamily.net
[MOD] PHPNuke Module
« Reply #14 on: May 11, 2003, 11:45:47 PM »
Oops sorry.  I knew I had fixed this but didn't look closely enough at what I had done.

Uncomment the following in useful stuff:

Quote
//if (getenv("QUERY_STRING")) {
//  $self_url .= "?".getenv("QUERY_STRING");
//  $self_url = preg_replace(array("/([?|&])action=[^?|&]*/", "/([?|&])mode=[^?|&]*/", "/([?|&])phpinfo=[^?|&]*/", "/([?|&])printstats=[^?|&]*/", "/[?|&]".URL_ID."=[^?|&]*/", "/[?|&]l=[^?|&]*/", "/[&?]+$/"), array("", "", "", "", "", "", ""), $self_url);
//}
//else {
  if (preg_match("/details.php/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
    $self_url .= "?".URL_IMAGE_ID."=".$image_id;
  }
  elseif (preg_match("/categories.php/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
    $self_url .= "?".URL_CAT_ID."=".$cat_id;
  }
  if (isset($show_result) && $show_result) {
    $self_url .= preg_match("/\?/", $self_url) ? "&" : "?";
    $self_url .= "show_result=1";
  }
  if ($page && $page != 1) {
    $self_url .= preg_match("/\?/", $self_url) ? "&" : "?";
    $self_url .= URL_PAGE."=".$page;
  }
//}


It should look like this:

Quote
if (getenv("QUERY_STRING")) {
  $self_url .= "?".getenv("QUERY_STRING");
  $self_url = preg_replace(array("/([?|&])action=[^?|&]*/", "/([?|&])mode=[^?|&]*/", "/([?|&])phpinfo=[^?|&]*/", "/([?|&])printstats=[^?|&]*/", "/[?|&]".URL_ID."=[^?|&]*/", "/[?|&]l=[^?|&]*/", "/[&?]+$/"), array("", "", "", "", "", "", ""), $self_url);
}
else {
  if (preg_match("/details/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
    $self_url .= "?".URL_IMAGE_ID."=".$image_id;
  }
  elseif (preg_match("/categories/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
    $self_url .= "?".URL_CAT_ID."=".$cat_id;
  }
  if (isset($show_result) && $show_result) {
    $self_url .= preg_match("/\?/", $self_url) ? "&" : "?";
    $self_url .= "show_result=1";
  }
  if ($page && $page != 1) {
   $self_url .= preg_match("/\?/", $self_url) ? "&" : "?";
    $self_url .= URL_PAGE."=".$page;
  }
}


Let me know if that does it.

Gustave
Simply Hosting, Affordable hosting with great support.
http://www.simplyhosting.net