marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Linking directly to the thumbnails section

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Linking directly to the thumbnails section »
Welcome, Guest. Please Login or Register.
12/14/17 at 02:06:43
Home Help Search Login Register
   marty.net message board
   General
   General Stuff
   Linking directly to the thumbnails section
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Linking directly to the thumbnails section  (Read 788 times)
Xeon
Guest

E-Mail
Linking directly to the thumbnails section
« on: 04/03/04 at 19:54:08 »
Reply with quote Modify message

Hi Marty!

Ok, all the installation and configuration problems are solved.
No more headaches.

I tried the PHP tutorial and it works like a charm!

However, though......if we code :


Code:
<?php
$qs = urlencode($HTTP_SERVER_VARS['QUERY_STRING']);
$str = `/home/xeoniesc/public_html/cgi-bin/store/cpshop.cgi http://www.xeonies.com/Test.php http://www.xeonies.com/cgi-bin/store/cpshop.cgi $qs`;
echo $str;
?>


This code will embed the main store page within our PHP page.(http://www.xeonies.com/Test.php)

Is it possible to embed the thumbnail section of a particular store within our PHP page instead?
Like embedding this(http://www.xeonies.com/cgi-bin/store/cpshop.cgi?storecrc=1240119166) into my PHP page.

In the code above, I tried replacing the http://www.xeonies.com/cgi-bin/store/cpshop.cgi with http://www.xeonies.com/cgi-bin/store/cpshop.cgi?storecrc=1240119166 but it says :

Quote:
Content-Type: text/plain The configuration file (cpshop.cgi?storecrc=1240119166.config) has not been generated. Please run the administration script before proceeding.


Is there a way?

Thanks!
Xeon.
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Linking directly to the thumbnails section
« Reply #1 on: 04/04/04 at 03:05:05 »
Reply with quote Modify message

I'm no PHP coder, but you could do something along these lines:

After the $qs = ... line, you could add something defaulting the query string to a specific store.

Code:
<?php
$qs = urlencode($HTTP_SERVER_VARS['QUERY_STRING']);
if ($qs == "") {$qs = "storecrc=1240119166"; }
$str = `/home/xeoniesc/public_html/cgi-bin/store/cpshop.cgi http://www.xeonies.com/Test.php http://www.xeonies.com/cgi-bin/store/cpshop.cgi $qs`;
echo $str;
?>

I think that'd have the general effect you're looking for.  Then you might want to hard code the home page URL to that same page.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Xeon
Guest

E-Mail
Re: Linking directly to the thumbnails section
« Reply #2 on: 04/04/04 at 07:04:57 »
Reply with quote Modify message

Thanks Marty!
Hmmm......I tried your code, but everything is the same as before : no difference.

Any more suggestions or advice would be greatly welcomed!

Thanks a lot, Marty!
Xeon.
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Linking directly to the thumbnails section
« Reply #3 on: 04/04/04 at 10:59:35 »
Reply with quote Modify message

Fundamentally, it should work -- perhaps the problem is my PHP syntax?  As I said, I'm no PHP coder.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Xeon
Guest

E-Mail
Re: Linking directly to the thumbnails section
« Reply #4 on: 04/05/04 at 05:49:04 »
Reply with quote Modify message

Yeah, Marty.
Ed says your syntax is fine and it should work, so I guess the problem is with my servers, maybe.

I'll try to see what's going on.

Thanks!
Xeon.
Logged
Xeon
Guest

E-Mail
Re: Linking directly to the thumbnails section
« Reply #5 on: 04/06/04 at 06:16:53 »
Reply with quote Modify message

PROBLEM SOLVED!

Credit goes to Ed Grovesnor of JMF Publishing House!

The final code is :
Code:
<?php
if (!$HTTP_SERVER_VARS['QUERY_STRING'])   {
   $qs = urlencode("storecrc=1240119166");
}

else   {
   $qs = urlencode($HTTP_SERVER_VARS['QUERY_STRING']);
}

$str = `/home/xeoniesc/public_html/cgi-bin/store/cpshop.cgi http://www.xeonies.com/Test.php http://www.xeonies.com/cgi-bin/store/cpshop.cgi $qs`;
echo $str;
?>


Thanks Marty and Ed!
Xeon.
Logged
jmfpub
Green Dragon
*

Posts: 7



Probably my fault!
  jmfpub jmfpub   jmfpub

WWW E-Mail
Re: Linking directly to the thumbnails section
« Reply #6 on: 04/06/04 at 09:01:23 »
Reply with quote Modify message

You're welcome Xeon.  And maybe some day   I'll actually figure out why that worked and why Marty's suggestion didn't.  For now I'm just glad it's working for you.
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.