|
» Online Users: 84 |
| 10 members and 74 guests |
| aucjpytio7yildn, hon9pkqeymoonva, kitaqi9chenrea8, nadimdagostinop, ora6fngecounty5, ralfthorburnkh, sacsn9eramentjf, valoriejudson2s, watpperpr, yossaphatdobai3 |
| Most users ever online was 611, 03-21-2008 at 11:10 PM. |
|
» .::. |
tattoo fonts http://www.checkoutmyink.com/category/tattoo-fonts-tattoo
|
|
 |
|
Nukemods Forum
> General
> Site design
|
need help to port a script for nukeThis is a discussion on need help to port a script for nuke within the Site design forums, part of the General category; I am trying to port photopost to use on my nuke site. I have photopost installed but when i go ... |
|
|
 |
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
Junior Member
Status: Offline
Posts: 47
Join Date: May 2003
|
08-09-2003, 10:44 PM
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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]}&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]}&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();?>
|
|
|
|
|
|
|
|
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]}&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();?>
|
|
|
|
 |
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|