Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > General > Site design

Reply
 
LinkBack Thread Tools Display Modes
need help to port a script for nuke
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 47
Join Date: May 2003
need help to port a script for nuke - 08-09-2003, 09:34 PM

I am trying to port photopost to use on my nuke site. I have photopost installed but when i go to other pages in photopost it comes up with the message "you cant access this file directly"
I added this code to get the index of photopost to look right:
Code:
if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");

}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
$index = 0;
OpenTable();
but that does not work for the other pages cause i get the error.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
08-09-2003, 10:24 PM

I've been chekcking around and I have read that it is best to use that Photopost within Nukwrap.
You can download Nukewrap(not sure where) and try it. I think it sort of puts the Program you are wanting to use within nuke in an iframe.

Do a search, you'll find it.
I think it is here
http://www.nukeresources.com

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 47
Join Date: May 2003
08-09-2003, 10:35 PM

I dont think its should be that hard to port. The database has already been intagrated, its just a matter of getting the pages to show up right.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
08-09-2003, 10:41 PM

Well, it was hard for me. I spent 4 hours on it the other day and got nowhere...

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Junior Member
 
Status: Offline
Posts: 47
Join Date: May 2003
08-09-2003, 10:44 PM

did you get this far?
http://sweetquads.com/modules.php?name=photopost
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Moderator
 
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
08-10-2003, 07:01 AM

I wanted to go into a category by this link
http://www.sweetquads.com/modules/ph...=500&password=

you should change that to
http://www.sweetquads.com/modules.ph...=500&password=

I tried and it worked, I saw your gallery


Yannick R. aka Mighty_Y
http://support.code-area51.com
http://www.code-area51.com

Search before asking makes my life easier!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Junior Member
 
Status: Offline
Posts: 47
Join Date: May 2003
08-10-2003, 11:19 AM

Thanks for the info mighty_y, i was wondering if you knew how to change that link, is it some thing i need to change for all pages or is there one thing i change for all links? I just dont see anything that jumps out at me as far as changing links. I looked in the index page and i cant find how to change links.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Moderator
 
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
08-10-2003, 11:47 AM

everywhere there is a link like this
http://www.yourdomain.com/modules/photopost/....php
should it be
http://www.yourdomain.com/modules.ph...hotopost&file=....

Yup you should change it in all the files to get the whole module working.
If you can't find the link in index.php look in any of the included files

Hipe This Helps,
Mighty_Y


Yannick R. aka Mighty_Y
http://support.code-area51.com
http://www.code-area51.com

Search before asking makes my life easier!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#9 (permalink))
Junior Member
 
Status: Offline
Posts: 47
Join Date: May 2003
08-10-2003, 12:48 PM

here is the index.php, copuld you help me figure out what i need to change, if i see what i need to do for one then maybe i can figure out the rest, i just cant find a nice easy link to change like http://www...... its all stuff like
Quote:
<a href=\"{$Globals['maindir']}/showgallery.php?ppuser={$topid[$x]}&amp;cat=500\">{$topposters[$x]} <font class=\"small\">($topposts[$x])</font></a>
Code:
<?php
//////////////////////////// COPYRIGHT NOTICE //////////////////////////////
// This script is part of PhotoPost PHP, a software application by        //
// All Enthusiast, Inc.  Use of any kind of part or all of this           //
// script or modification of this script requires a license from All      //
// Enthusiast, Inc.  Use or modification of this script without a license //
// constitutes Software Piracy and will result in legal action from All   //
// Enthusiast, Inc.  All rights reserved.                                 //
// http://www.photopost.com      legal@photopost.com                      //
// Contributing Developer: Michael Pierce (danasoft.com)                  //
//                                                                        //
//            PhotoPost Copyright 2003, All Enthusiast, Inc.              //
////////////////////////////////////////////////////////////////////////////

if (!eregi("modules.php", $PHP_SELF)) { 
   die ("You can't access this file directly..."); 

} 
require_once("mainfile.php"); 
$module_name = basename(dirname(__FILE__)); 
get_lang($module_name); 
include("header.php"); 
$index = 0; 
OpenTable();

require "pp-inc.php";

if ( is_numeric($argv[0]) ) {
    header("Location: {$Globals['maindir']}/showphoto.php?photo={$argv[0]}");
    exit;
}

require "$PP_PATH/languages/$pplang/index.php";
require "$PP_PATH/login-inc.php";

if ( file_exists("install.php") || file_exists("{$Globals['maindir']}/install.php") ) {
    diewell( "For security reasons, please remove the install.php from the PhotoPost directory before proceeding." );
    exit;
}

authenticate();

if ( isset($Globals['ppboards']) && $User['adminedit'] != 1 ) {
    if ( $Globals['ppboards'] == "closed" ) {
        print $Globals['closedmsg'];
        exit;
    }
}

topmenu();
$tablehead = $Globals['pp_lang']['tablehead'];

if ( isset($cat) ) {
    if ($ugview{$cat} == 1 ) {
        diewell( $Globals['pp_lang']['noview'] );
    }

    $query = "SELECT id,catname,password FROM {$Globals['pp_db_prefix']}categories WHERE id=$cat";
    $resultb = ppmysql_query($query,$link);

    list( $catid, $cattitle, $catpass ) = mysql_fetch_row($resultb);
    ppmysql_free_result( $resultb );

    if ( trim($catpass) != "" && $User['adminedit'] != 1 ) {
        if ( !isset($password) ) $password = "";
        
        if ( $password != $catpass ) {
            get_password( $cat );
            exit;
        }
    }
    
    if ( $User['userid'] > 0 && $Globals['displaynew'] == "yes" ) {
        list($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
        $mon = $mon + 1;    
        $lasttimeon = mktime($hour,$min,$sec,$mon,$mday,$year);
        
        $laston = "REPLACE INTO {$Globals['pp_db_prefix']}laston VALUES($cat,{$User['userid']},$lasttimeon)";
        $resultb = ppmysql_query($laston, $link);    
    }

    $tablehead = "$cattitle";    
    childsub($cat);
    $childnav = "<font class=\"small\"><a href=\"{$Globals['maindir']}/index.php\">{$Globals['pp_lang']['home']}</a> $childnav</font>";
    $searchcat = $cat;
}
else {
    if ( $User['username'] != "" && $User['username'] != "Unregistered" ) $childnav = "{$Globals['pp_lang']['welcomeuser']} {$User['username']}!";
    else $childnav = "{$Globals['pp_lang']['welcome']} {$Globals['galleryname']}!";
    $searchcat = 998;
}

printheader( $cat, $tablehead );

if ( $Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "no" ) {
    display_gallery("latest");
}

$count = 0; $catdepth = 0;
$catrows = ""; $cptotal = 0; $posttotal = 0; $totalviews = 0; $diskspace = 0;

if ( !(isset($cat)) ) {
    catrow(0);
}
else {
    catrow($cat);
}

$usertotal = get_totalusers();

$query = "SELECT SUM(views), SUM(filesize) AS fsize FROM {$Globals['pp_db_prefix']}photos";
$totalv = ppmysql_query($query,$link);
list( $totalviews, $diskuse ) = mysql_fetch_row($totalv);
ppmysql_free_result($totalv);

$totalviews = number_format( $totalviews );
$totalphotos = number_format( $totalphotos );
$usertotal = number_format( $usertotal );
$posttotal = number_format( $posttotal );

$diskspace = $diskuse/1048576;
$diskspace = number_format( $diskspace, 1 );
$diskspace = "$diskspace MB";

// Lets get the Top 5 Posters
$query = "SELECT user,userid,COUNT(*) AS pcount FROM {$Globals['pp_db_prefix']}photos GROUP BY user ORDER BY pcount DESC";
$queryz = ppmysql_query($query,$link);
$rowcnt = mysql_num_rows($queryz);
$numfound = 0;

while ( list($theuser, $theuserid, $uphotos) = mysql_fetch_row($queryz)) {
    $numfound++;
    $topposters[$numfound] = $theuser;
    $topid[$numfound] = $theuserid;
    $topposts[$numfound] = $uphotos;
    if ( $numfound == 5 ) break;
}

if ( $numfound > 0 ) {
    $toplist = "
{$Globals['pp_lang']['toposter']}";
    for ( $x=1; $x < ($numfound+1); $x++ ) {
        $toplist .= "<a href=\"{$Globals['maindir']}/showgallery.php?ppuser={$topid[$x]}&amp;cat=500\">{$topposters[$x]} <font class=\"small\">($topposts[$x])</font></a>";
    }
}

// Lets get Who is Online
$oquery = "SELECT userid,date FROM {$Globals['pp_db_prefix']}iponline ORDER BY date DESC";
$oqueryz = ppmysql_query($oquery,$link);
$onumfound = 0; $anononline=0; $whoonline = "";

while ( list($ouser, $odate) = mysql_fetch_row($oqueryz)) {
    $onumfound++;
    
    if ( $ouser != "" && $ouser != "Unregistered" ) {
        if ( $whoonline != "" ) $whoonline .= ", ";
        $whoonline .= "$ouser";
    }
    else $anononline++;
}

if ( $onumfound > 0 ) {
    $whogreet = "{$Globals['pp_lang']['whoonline']}: ";
    if ( $whoonline != "" ) {
        $whoonline = "$whoonline";
        if ( $anononline > 0 ) {
            if ( $anononline == 1 ) $whoonline .= " {$Globals['pp_lang']['and']} $anononline {$Globals['pp_lang']['unruser']}";
            else $whoonline .= " {$Globals['pp_lang']['and']} $anononline {$Globals['pp_lang']['unrusers']}";
        }        
    }
    else {
        if ( $anononline == 1 ) $whoonline .= "$anononline {$Globals['pp_lang']['unruser']}";
        else $whoonline .= "$anononline {$Globals['pp_lang']['unrusers']}";
    }
    $whoonline = "{$whogreet}{$whoonline}.";
}

include( "$PP_PATH/templates/menubar.tmpl" );
include( "$PP_PATH/templates/index.tmpl" );

if ( $Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "yes") {
    display_gallery("latest");
}
if ( $Globals['dispopular'] == "yes" ) {
    display_gallery("most_views");
}
if ( $Globals['disrandom'] == "yes" ) {
    display_gallery("random");
}

printfooter();?>
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#10 (permalink))
Moderator
 
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
08-10-2003, 01:05 PM

I edited this one, compare with yours and then you can do the same for the other files (but try this one out first )
Code:
<?php 
//////////////////////////// COPYRIGHT NOTICE ////////////////////////////// 
// This script is part of PhotoPost PHP, a software application by        // 
// All Enthusiast, Inc.  Use of any kind of part or all of this           // 
// script or modification of this script requires a license from All      // 
// Enthusiast, Inc.  Use or modification of this script without a license // 
// constitutes Software Piracy and will result in legal action from All   // 
// Enthusiast, Inc.  All rights reserved.                                 // 
// http://www.photopost.com      legal@photopost.com                      // 
// Contributing Developer: Michael Pierce (danasoft.com)                  // 
//                                                                        // 
//            PhotoPost Copyright 2003, All Enthusiast, Inc.              // 
//////////////////////////////////////////////////////////////////////////// 

if (!eregi("modules.php", $PHP_SELF)) { 
   die ("You can't access this file directly..."); 

} 
require_once("mainfile.php"); 
$module_name = basename(dirname(__FILE__)); 
get_lang($module_name); 
include("header.php"); 
$index = 0; 
OpenTable(); 

require "pp-inc.php"; 

if ( is_numeric($argv[0]) ) { 
    header("Location: modules.php?name=photopost&file=showphoto&photo={$argv[0]}"); 
    exit; 
} 

require "$PP_PATH/languages/$pplang/index.php"; 
require "$PP_PATH/login-inc.php"; 

if ( file_exists("install.php") || file_exists("{$Globals['maindir']}/install.php") ) { 
    diewell( "For security reasons, please remove the install.php from the PhotoPost directory before proceeding." ); 
    exit; 
} 

authenticate(); 

if ( isset($Globals['ppboards']) && $User['adminedit'] != 1 ) { 
    if ( $Globals['ppboards'] == "closed" ) { 
        print $Globals['closedmsg']; 
        exit; 
    } 
} 

topmenu(); 
$tablehead = $Globals['pp_lang']['tablehead']; 

if ( isset($cat) ) { 
    if ($ugview{$cat} == 1 ) { 
        diewell( $Globals['pp_lang']['noview'] ); 
    } 

    $query = "SELECT id,catname,password FROM {$Globals['pp_db_prefix']}categories WHERE id=$cat"; 
    $resultb = ppmysql_query($query,$link); 

    list( $catid, $cattitle, $catpass ) = mysql_fetch_row($resultb); 
    ppmysql_free_result( $resultb ); 

    if ( trim($catpass) != "" && $User['adminedit'] != 1 ) { 
        if ( !isset($password) ) $password = ""; 
        
        if ( $password != $catpass ) { 
            get_password( $cat ); 
            exit; 
        } 
    } 
    
    if ( $User['userid'] > 0 && $Globals['displaynew'] == "yes" ) { 
        list($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); 
        $mon = $mon + 1;    
        $lasttimeon = mktime($hour,$min,$sec,$mon,$mday,$year); 
        
        $laston = "REPLACE INTO {$Globals['pp_db_prefix']}laston VALUES($cat,{$User['userid']},$lasttimeon)"; 
        $resultb = ppmysql_query($laston, $link);    
    } 

    $tablehead = "$cattitle";    
    childsub($cat); 
    $childnav = "<font class=\"small\"><a href=\"modules.php?name=photopost&file=index\">{$Globals['pp_lang']['home']}</a> $childnav</font>"; 
    $searchcat = $cat; 
} 
else { 
    if ( $User['username'] != "" && $User['username'] != "Unregistered" ) $childnav = "{$Globals['pp_lang']['welcomeuser']} {$User['username']}!"; 
    else $childnav = "{$Globals['pp_lang']['welcome']} {$Globals['galleryname']}!"; 
    $searchcat = 998; 
} 

printheader( $cat, $tablehead ); 

if ( $Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "no" ) { 
    display_gallery("latest"); 
} 

$count = 0; $catdepth = 0; 
$catrows = ""; $cptotal = 0; $posttotal = 0; $totalviews = 0; $diskspace = 0; 

if ( !(isset($cat)) ) { 
    catrow(0); 
} 
else { 
    catrow($cat); 
} 

$usertotal = get_totalusers(); 

$query = "SELECT SUM(views), SUM(filesize) AS fsize FROM {$Globals['pp_db_prefix']}photos"; 
$totalv = ppmysql_query($query,$link); 
list( $totalviews, $diskuse ) = mysql_fetch_row($totalv); 
ppmysql_free_result($totalv); 

$totalviews = number_format( $totalviews ); 
$totalphotos = number_format( $totalphotos ); 
$usertotal = number_format( $usertotal ); 
$posttotal = number_format( $posttotal ); 

$diskspace = $diskuse/1048576; 
$diskspace = number_format( $diskspace, 1 ); 
$diskspace = "$diskspace MB"; 

// Lets get the Top 5 Posters 
$query = "SELECT user,userid,COUNT(*) AS pcount FROM {$Globals['pp_db_prefix']}photos GROUP BY user ORDER BY pcount DESC"; 
$queryz = ppmysql_query($query,$link); 
$rowcnt = mysql_num_rows($queryz); 
$numfound = 0; 

while ( list($theuser, $theuserid, $uphotos) = mysql_fetch_row($queryz)) { 
    $numfound++; 
    $topposters[$numfound] = $theuser; 
    $topid[$numfound] = $theuserid; 
    $topposts[$numfound] = $uphotos; 
    if ( $numfound == 5 ) break; 
} 

if ( $numfound > 0 ) { 
    $toplist = "
{$Globals['pp_lang']['toposter']}"; 
    for ( $x=1; $x < ($numfound+1); $x++ ) { 
        $toplist .= "<a href=\"modules.php?name=photopost&file=showgallery&ppuser={$topid[$x]}&amp;cat=500\">{$topposters[$x]} <font class=\"small\">($topposts[$x])</font></a>";
    } 
} 

// Lets get Who is Online 
$oquery = "SELECT userid,date FROM {$Globals['pp_db_prefix']}iponline ORDER BY date DESC"; 
$oqueryz = ppmysql_query($oquery,$link); 
$onumfound = 0; $anononline=0; $whoonline = ""; 

while ( list($ouser, $odate) = mysql_fetch_row($oqueryz)) { 
    $onumfound++; 
    
    if ( $ouser != "" && $ouser != "Unregistered" ) { 
        if ( $whoonline != "" ) $whoonline .= ", "; 
        $whoonline .= "$ouser"; 
    } 
    else $anononline++; 
} 

if ( $onumfound > 0 ) { 
    $whogreet = "{$Globals['pp_lang']['whoonline']}: "; 
    if ( $whoonline != "" ) { 
        $whoonline = "$whoonline"; 
        if ( $anononline > 0 ) { 
            if ( $anononline == 1 ) $whoonline .= " {$Globals['pp_lang']['and']} $anononline {$Globals['pp_lang']['unruser']}"; 
            else $whoonline .= " {$Globals['pp_lang']['and']} $anononline {$Globals['pp_lang']['unrusers']}"; 
        }        
    } 
    else { 
        if ( $anononline == 1 ) $whoonline .= "$anononline {$Globals['pp_lang']['unruser']}"; 
        else $whoonline .= "$anononline {$Globals['pp_lang']['unrusers']}"; 
    } 
    $whoonline = "{$whogreet}{$whoonline}."; 
} 

include( "$PP_PATH/templates/menubar.tmpl" ); 
include( "$PP_PATH/templates/index.tmpl" ); 

if ( $Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "yes") { 
    display_gallery("latest"); 
} 
if ( $Globals['dispopular'] == "yes" ) { 
    display_gallery("most_views"); 
} 
if ( $Globals['disrandom'] == "yes" ) { 
    display_gallery("random"); 
} 

printfooter();?>


Yannick R. aka Mighty_Y
http://support.code-area51.com
http://www.code-area51.com

Search before asking makes my life easier!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
using ADsNew script of Ads in nuke block (Code not allowed) Liqid Nuke 7.x - Blocks 1 07-12-2005 02:01 PM
How-To-Port-Nuke Themes-For PHPbb? dosdawgs Nuke 6.5 to 6.9 - Themes 0 01-05-2005 04:23 AM
Need BIG help making a php script work with nuke buttonjackpot Site design 0 09-11-2004 10:17 PM
Question about phpbb port to nuke Mike Open topics 4 04-08-2003 11:52 PM
New User Registration by Administrator - Nuke 6.0/Phpbb Port bobbychat Purged Topics 4 03-09-2003 01:00 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31