|
» .::. |
tattoo fonts http://www.checkoutmyink.com/category/tattoo-fonts-tattoo
|
|
 |
|
Nukemods Forum
> PHP-Nuke 6.5 to 6.9
> Nuke 6.5 to 6.9 - Modules
|
CafePres mod, need help.This is a discussion on CafePres mod, need help. within the Nuke 6.5 to 6.9 - Modules forums, part of the PHP-Nuke 6.5 to 6.9 category; I am trying to install a CafePres Mod and I get the following error:
Fatal error: Call to undefined function: ... |
|
|
 |
|
|
|
|
Junior Member
Status: Offline
Posts: 15
Join Date: May 2003
|
CafePres mod, need help. -
07-09-2003, 10:27 AM
I am trying to install a CafePres Mod and I get the following error:
Fatal error: Call to undefined function: session_pagestart() in /usr/local/apache/htdocs/modules/Forums/cafeshop.php on line 31
Here is my code for the cafeshop.php file
Code:
<?php
/***************************************************************************
* CafePress Modification for phpbb
* -------------------
* begin : 1 December 2002
* copyright : (C) 2002 Edward Polack
* email : pollix@drunksquids.com
* original author : Jack Keller (cell7.org) as a stand alone for his site.
*
* $Id: cafepress.php
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
//
// Start output of page
//
$page_title = 'Your Store';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
function open_store($storeid)
{
global $target, $template;
global $QUERY_STRING;
//Set to 0 to use your own stylesheet
$UseCafePressStyleSheet = 0;
if (!isset($target) || $target == "store")
{
$get = "store.aspx?s=$storeid";
}
else
{
$qstr = $QUERY_STRING;
$target = preg_replace("/http:\/\/www.cafeshops.com\/cp\//", "", $target);
$qstr = preg_replace("target=$target/","",$qstr);
$get = "store.aspx?s=$storeid";
}
$fp = @fopen("http://www.cafeshops.com/cp/".$get,"r");
$countdown = 0;
$oncountdown = 0;
$out = 0;
while (!feof($fp))
{
$line = fgets($fp,4096);
$line = stripslashes($line);
if ($UseCafePressStyleSheet == 1)
{
if (preg_match("/stylesheet/i",$line))
{
$out = 1;
}
}
if (preg_match("/<script/i",$line))
{
$out = 1;
}
if ($target == "prod")
{
$line = preg_replace("/\/cp\//","http://www.cafeshops.com/cp/",$line);
$line = ereg_replace("img/hat","http://www.cafeshops.com/cp/img/hat",$line);
$line = ereg_replace("img/jerseys","http://www.cafeshops.com/cp/img/jerseys",$line);
if(eregi("",$line))
{
$countdown = 2;
$oncountdown = 1;
}
if(eregi("",$line))
{
$countdown = 6;
$oncountdown = 0;
}
}
else
{
// following line fixes broken image bug if a product has no customized image on it
$line = preg_replace("/\/cp\//","http://www.cafeshops.com/cp/",$line);
if (eregi("<!-- ### Items",$line))
{
$out = 1;
}
if (eregi("<!-- ### end of Items",$line))
{
$out = 0;
}
}
if ($out)
{
// following if statement fixes problem with product page javascript
if (preg_match("/language/i",$line))
{
$line = ereg_replace("src=\"/","src=\"http://www.cafeshops.com/",$line);
}
// Added to amend links to absolute cafepress links - Dean (http://www.countersnipe.co.uk/)
$line = ereg_replace("href=\"/","target=\"_blank\" href=\"http://www.cafeshops.com/",$line);
$template->assign_block_vars( 'cafeshop', array(
'LINE' => $line
)
);
}
if (preg_match("/stylesheet/i",$line))
{
$out = 0;
}
if (preg_match("/<\/script/i",$line))
{
$out = 0;
}
if ($countdown > 1)
{
$countdown = $countdown - 1;
}
elseif ($countdown == 1)
{
$out = $oncountdown;
$countdown = 0;
}
}
fclose($fp);
}
// The yourstore can also go yourstore,yourstore2 depending
// on the stores you may have put your friends stores on there
// too if you want.
$template->set_filenames(array('body' => 'cafeshop_body.tpl'));
open_store("maddenwars"); //Make sure to change 'your_store' to your store ID!!
$template->pparse('body');
//
// Generate the page
//
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
I know its something simple.
Thnx.
shopop24
|
|
|
|
|
|
|
|
Moderator
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
|
07-09-2003, 10:30 AM
Let me modify your file, wait a bit
|
|
|
|
|
|
|
|
Junior Member
Status: Offline
Posts: 15
Join Date: May 2003
|
07-09-2003, 10:32 AM
k, thnx.
|
|
|
|
|
|
|
|
Moderator
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
|
07-09-2003, 10:34 AM
Code:
<?php
/***************************************************************************
* CafePress Modification for phpbb
* -------------------
* begin : 1 December 2002
* copyright : (C) 2002 Edward Polack
* email : pollix@drunksquids.com
* original author : Jack Keller (cell7.org) as a stand alone for his site.
*
* $Id: cafepress.php
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/Forums/nukebb.php");
define('IN_PHPBB', true);
$phpbb_root_path = 'modules/Forums/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);
init_userprefs($userdata);
//
// End session management
//
//
// Start output of page
//
$page_title = 'Your Store';
include('includes/page_header.'.$phpEx);
function open_store($storeid)
{
global $target, $template;
global $QUERY_STRING;
//Set to 0 to use your own stylesheet
$UseCafePressStyleSheet = 0;
if (!isset($target) || $target == "store")
{
$get = "store.aspx?s=$storeid";
}
else
{
$qstr = $QUERY_STRING;
$target = preg_replace("/http:\/\/www.cafeshops.com\/cp\//", "", $target);
$qstr = preg_replace("target=$target/","",$qstr);
$get = "store.aspx?s=$storeid";
}
$fp = @fopen("http://www.cafeshops.com/cp/".$get,"r");
$countdown = 0;
$oncountdown = 0;
$out = 0;
while (!feof($fp))
{
$line = fgets($fp,4096);
$line = stripslashes($line);
if ($UseCafePressStyleSheet == 1)
{
if (preg_match("/stylesheet/i",$line))
{
$out = 1;
}
}
if (preg_match("/<script/i",$line))
{
$out = 1;
}
if ($target == "prod")
{
$line = preg_replace("/\/cp\//","http://www.cafeshops.com/cp/",$line);
$line = ereg_replace("img/hat","http://www.cafeshops.com/cp/img/hat",$line);
$line = ereg_replace("img/jerseys","http://www.cafeshops.com/cp/img/jerseys",$line);
if(eregi("",$line))
{
$countdown = 2;
$oncountdown = 1;
}
if(eregi("",$line))
{
$countdown = 6;
$oncountdown = 0;
}
}
else
{
// following line fixes broken image bug if a product has no customized image on it
$line = preg_replace("/\/cp\//","http://www.cafeshops.com/cp/",$line);
if (eregi("<!-- ### Items",$line))
{
$out = 1;
}
if (eregi("<!-- ### end of Items",$line))
{
$out = 0;
}
}
if ($out)
{
// following if statement fixes problem with product page javascript
if (preg_match("/language/i",$line))
{
$line = ereg_replace("src=\"/","src=\"http://www.cafeshops.com/",$line);
}
// Added to amend links to absolute cafepress links - Dean (http://www.countersnipe.co.uk/)
$line = ereg_replace("href=\"/","target=\"_blank\" href=\"http://www.cafeshops.com/",$line);
$template->assign_block_vars( 'cafeshop', array(
'LINE' => $line
)
);
}
if (preg_match("/stylesheet/i",$line))
{
$out = 0;
}
if (preg_match("/<\/script/i",$line))
{
$out = 0;
}
if ($countdown > 1)
{
$countdown = $countdown - 1;
}
elseif ($countdown == 1)
{
$out = $oncountdown;
$countdown = 0;
}
}
fclose($fp);
}
// The yourstore can also go yourstore,yourstore2 depending
// on the stores you may have put your friends stores on there
// too if you want.
$template->set_filenames(array('body' => 'cafeshop_body.tpl'));
open_store("maddenwars"); //Make sure to change 'your_store' to your store ID!!
$template->pparse('body');
//
// Generate the page
//
include('includes/page_tail.'.$phpEx);
?>
hope this will do it
|
|
|
|
|
|
|
|
Junior Member
Status: Offline
Posts: 15
Join Date: May 2003
|
Thnx -
07-09-2003, 10:41 AM
Thnx Mighty_Y.
You have been a lot of help lately. I appreciate all your work and assistance. Donation coming your way bro on nukemods.
Take care.
shopop24
|
|
|
|
|
|
|
|
Moderator
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
|
07-09-2003, 03:02 PM
Thanks, really appreciate that
|
|
|
|
 |
| 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
|
|
|
|