Random image include? (SSI.php) - Page 5 Random image include? (SSI.php) - Page 5
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Random image include? (SSI.php)

Started by Brian, October 17, 2003, 03:37:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joachim Müller

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

Vantage2

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;

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.
             
<? 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;

$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.

Nibbler

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

Vantage2

Thank you.. that worked for me.

I am VERY greatful

Wilson

QuoteHow 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:
Sweet Pie

Casper

'Bump' is much more likely to get a response.
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

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

Joachim Müller

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

.andy

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

Joachim Müller

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

kfc

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!

Glenn

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
<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
<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.

Ithildin

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

Joachim Müller

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

GauGau

nacho

#94
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:
QuoteCoppermine 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

// 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!

Joachim Müller

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/////////////////// edit the following lines //////////////////////////////
    $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

Joachim Müller

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

Joachim Müller

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

Joachim Müller

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<?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

Joachim Müller

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 >:(