Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 2 3 4 [5] 6 7 8 9   Go Down

Author Topic: Random image include? (SSI.php)  (Read 195932 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #80 on: April 16, 2004, 07:52:44 am »

merged your question with the thread dealing with ssi.php. Please understand that
a) ssi.php comes without support, as it's not recommended to use any more
b) this has been asked quite often, read this thread.

GauGau
Logged

Vantage2

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Random image include?
« Reply #81 on: April 17, 2004, 02:20:21 am »

First of all I have read and re-read the entire thread, serached on google/yahoo and trawled through the serach results on this board for my answer.

This is the error I get;

Code: [Select]
Fatal error: Call to undefined function: cpg_thumb() in /home/fhlinux195/t/thecourt.org/user/htdocs/main.php on line 93

My <php statements in the page I require the images to be displayed in; main.php is as follows.
             
Code: [Select]
<? include_once("http://www.thecourt.org/media/gallery/ssi.php"); ?>
<?php print cpg_thumb&#40;0,0,1,"",1&#41;; ?>


My ssi.php file, held in /media/gallery has been changed as per the instructions to the following;

Code: [Select]
$url_of_cpg_dir='http://www.thecourt.org/media/gallery/';
$absolute_path_to_coppermine='/home/fhlinux195/t/thecourt.org/user/htdocs/media/gallery/';


Which I know works as previously, I would get an include error.

What might be causing my pronlem here. I know SSI isn't supported, but nowhere in the entire thread is this mentioned. I have tried putting the print statement in main.php within the php include statement to no avail.

Site is supposed to go live on Sunday 18th BTW.. so i'm running short of time.
Logged

Nibbler

  • Guest
Random image include?
« Reply #82 on: April 17, 2004, 02:35:23 am »

Try setting the include as a local path eg /home/user/something/ssi.php it might not like the url.
Logged

Vantage2

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Random image include?
« Reply #83 on: April 17, 2004, 02:52:20 am »

Thank you.. that worked for me.

I am VERY greatful
Logged

Wilson

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Random image include?
« Reply #84 on: April 17, 2004, 09:06:23 am »

Quote
How would you get the top rated pics to display through the ssi?
N can't u have the image title and rating included?

... erhem  :roll:
Logged
Sweet Pie

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Random image include?
« Reply #85 on: April 18, 2004, 09:51:57 pm »

'Bump' is much more likely to get a response.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Wilson

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Random image include?
« Reply #86 on: April 19, 2004, 08:47:10 am »

I've bumped this one already... BUMP 2  :?
Logged
Sweet Pie

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #87 on: April 19, 2004, 09:09:59 am »

I noticed you posting, and the bumps as well; ssi.php goes unsupported from my point of view (stated this often before on this thread). I won't make up my mind about new features. What's the use of a reply that doesn't have an answer. The mod has extremely crappy code (sorry for that :oops: , you're welcome to use it if it works for you...), and I won't make it more crappy by adding features to it. In fact, it's just some simple queries. Maybe someone else will do this for you.

GauGau
Logged

.andy

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
SSI hack - random image on main (non CPG) page.
« Reply #88 on: May 03, 2004, 12:59:05 pm »

Hi,

I just put on the ssi hack. Is it possible to set a max width for a thumbnail? I noticed that the SSI code has an include for the CPG config file, so I tried setting the max width in the config, but this had no effect on the SSI thumbnail. Is there anything in ssi.php that I can set / change to make this happen? It keeps pushing a table too wide with some thumbs. TIA.

Cheers,
.andy
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #89 on: May 03, 2004, 06:49:40 pm »

merged your posting with the thread dealing with ssi.php
Read it carefully, most questions have been answered before. The hack itself goes unsupported.

GauGau
Logged

kfc

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Random image include?
« Reply #90 on: May 30, 2004, 11:54:56 am »

this script kicks ass! ssi.php

But look here http://www.lanmaniac.com/ i have a random pic on the top right of my page, but for some reason it leaves a large gap below the pic. does anyone know why? maybe the source its linked to have a large empty area below it?

Please help.

Thanks!
Logged

Glenn

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Random image include?
« Reply #91 on: June 05, 2004, 08:50:50 pm »

Hi,

I have the ssi script installed and working OK. (Note - I know it is unsupported etc...)

I call the script in an iframe which is in a table
Code: [Select]
<td width="100%" bgcolor="#EED7B7" style="border-left-color: #111111; border-left-width: 1; border-right-color: #111111; border-right-width: 1">
<iframe SRC="rndimage.php" WIDTH="144" name="I1" scrolling="no" align="middle" border="0" frameborder="0" marginwidth="1" marginheight="1" class="bordercolor">
</iframe></td>

rndimage.php contains
Code: [Select]
<html>
<head>
<? include_once("/home/httpd/vhosts/domainname.com/httpdocs/cm/ssi.php"); ?>
<!-- edit above line to match the absolute path to ssi.php on your server -->
<meta http-equiv="refresh" content="30">
<style>
body {
background-color:#EED7B7;
margin-top:0px;
margin-bottom:0px;
margin-left:0px;
margin-right:0px;
padding:10px;
overflow : auto;
}
</style>
</head>
<body>
<CENTER>
<? print cpg_thumb(1,1,1,"",1,"_blank"); ?>
   </CENTER>
</body>
</html>

My question is:
How can I get it to display the thumbnail centered in the frame/cell? The align="middle" in the iframe and the <CENTER> in the php code does not seem to do it...

All suggestions appreciated!

Glenn.
Logged

Ithildin

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Random image include?
« Reply #92 on: July 01, 2004, 12:00:54 pm »

Can somebody tell me what I'm doing wrong??
I tried to include the random picture at my first categorie,
because otherwise there are no thumbs which I can show!

http://www.the-spirit-of-middle-earth.de/gallery/index.php
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #93 on: July 01, 2004, 12:52:10 pm »

you mustn't use ssi.php on coppermine pages, only on non-coppermine pages!

GauGau
Logged

nacho

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
Re: Random image include?
« Reply #94 on: July 07, 2004, 02:09:47 am »

before putting this I read all and each one of the messages already exposed, probe each code exposed by the participants and the error follows:
Quote
Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to MySQL server on 'localhost' (10061)   

my gallery already I work perfectly only needs this one detail

why is the error?..  i think maybe is in this part.. from line 55 of :    ssi.php

Code: [Select]
// get config data
$result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='fullpath'");
$row = mysql_fetch_row($result);
$cpg_album_path=$row[1];
$result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='thumb_pfx'");
$row = mysql_fetch_row($result);
$cpg_thumb_pfx=$row['1'];
$result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='thumbcols'");
$row = mysql_fetch_row($result);
$cpg_thumbcols=$row['1'];
 
please    help me!
« Last Edit: July 07, 2004, 05:23:02 am by nacho »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #95 on: July 07, 2004, 05:47:04 am »

If the mySQL connection can't be established chances are high you're trying to use ssi.php from another server/domain. To tell you more, you'll have to supply full information:
  • post your lines of ssi.php that originally look like this
    Code: [Select]
    /////////////////// edit the following lines //////////////////////////////[/li][/list]
    $url_of_cpg_dir='http://www.yoursite.com/coppermine/';    // full path to your coppermine gallery (with trailing slash)
    $absolute_path_to_coppermine='/path/to/your/coppermine/'; // absolute path on your server to coppermine gallery (with trailing slash)
  • post a link to your coppermine gallery
  • post the link ssi.php is located at
  • post a link to the page you want to use ssi.php on
GauGau
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #96 on: July 07, 2004, 07:10:12 am »

is your index page (http://www.sudcalifornianos.com/index.htm) php-enabled? Please edit the example.php that comes with ssi.php and post a link to it as well.

GauGau
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #97 on: July 07, 2004, 08:53:38 am »

you didn't answer my question: are the html pages you're referring to php-enabled (usually they are not, unless you fiddled with your .htaccess settings like I did on my personal page)?

GauGau
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #98 on: July 08, 2004, 08:21:22 am »

You still didn't answer my question. Unless you do, I'll ignore all other postings from you. Nobody asked anything about .htaccess, I just asked if the pages you're refering to are php-enabled, in other words: does php get parsed on pages that have the extension ".htm" or ".html". You can find out for yourself: create a file with this content
Code: [Select]
<?php print 'This page is php-enabled'?>and save it as test.htm. Then browse it: if you get a blank page, then the result is: pages with htm extension are not php-enabled, so you can't use php includes on them.

GauGau
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #99 on: July 09, 2004, 07:56:26 am »

This might be a language issue, but anyway: html pages are not php-enabled on your server, which means (in short terms): this mod is not meant for you, you can't use it (well, those who have more understanding of the way a webserver works clearly could understand what I was trying to say in my last postings, so the answer would rather be "the mod only works when applied properly", but I think this is a hopeless case ;)). Please understand that this mod comes without support at all, I was just trying to be helpfull (and I already regret replying). Let's not spoil this thread with useless questions and answers you don't understand - let's end this discussion instead. You'll have to live without this mod or learn how to apply it without support.

GauGau

P.S. Bumping on this issue by PM didn't make me more inclined to help you >:(
Logged
Pages: 1 2 3 4 [5] 6 7 8 9   Go Up
 

Page created in 0.06 seconds with 20 queries.