Advanced search  

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]

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

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

0 Members and 1 Guest are viewing this topic.

Glenn

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Random image include?
« Reply #40 on: January 25, 2004, 06:55:15 am »

OK - Stupid question...

(I know it not supported etc...)   :D

Will this work in a html file or does it have to be in a php file?

I have it working in a php file on my server but not in a html.

Regards,

Glenn.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #41 on: January 25, 2004, 08:52:53 am »

the extension doesn't matter, as long as the file is being parsed by the php-interpreter. Usually, this is the case with the extension .php and not with files ending with .html

GauGau
Logged

Viktor

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Random image include?
« Reply #42 on: February 16, 2004, 12:37:47 pm »

OK i got it working myself the ssi i mean it really works great but my template runs on tables and i inserted the code into my table fine but some images are unusual sizes and stretch the table making my site out of proportion.
Is there anyway I can border the random images so they are all the same size within my page?
Logged

Viktor

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Random image include?
« Reply #43 on: February 17, 2004, 12:11:48 am »

bump
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Logged

Quelyn

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 5
  • Ph34r Fr3ddy
    • e m o c r a p
SSI.php
« Reply #45 on: February 26, 2004, 07:10:40 am »

Not to be a bugger, I tried to read this thread thoroughly, and the "If you don't care about security" preface to the ssi.php kinda disenchanted me.  Are there any scripts that are in the works perhaps, that would produce an effect similar to http://www.runaked.com/forums/ without taking risks on an old unsupported one?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #46 on: February 26, 2004, 07:17:39 am »

take a look at the rss feed mod: http://forum.coppermine-gallery.net/index.php?topic=2960

GauGau
Logged

Quelyn

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 5
  • Ph34r Fr3ddy
    • e m o c r a p
Random image include?
« Reply #47 on: February 26, 2004, 07:29:00 am »

Thanks so much for the quick reply, I'll look into the other thread now :D
Logged

le_guy41

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
SSI mod with Flash ?
« Reply #48 on: March 09, 2004, 04:00:49 pm »

Hello, i'm a newbie in PHP, MySQL and i wanted to have a random thumb pic of coppermine gallery on my home web page.

I tried the ssi mod which works perfect on an html page.

But the problem is that i wanted to integrate this pic in a flash swf.
I've read quite a lot on how to do that. And the only way is to have a file of the jpeg pic and all the comments apart.
In fact flash could load the url of the coppermine pic as it can only load text variables. And the thumb pic would be saved as file on the root of my domain.

Can anyone help me with this ? Can the ssi mod still be used for this ?

Thank u for sparing a little time to help me.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #49 on: March 09, 2004, 11:31:28 pm »

ssi.mod goes unsupported and is not recommended. Anything is possible, you'll just have to code it. In fact, just look at the queries from ssi.php and use it for the swf thingy in question...

GauGau

P.S. merged your separate thread with the ssi.mod discussion
Logged

Disc13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
ssi.php help please
« Reply #50 on: March 15, 2004, 10:28:23 pm »

Hi, I've just installed ssi.php and it works great, I now have a latest picture entry onto the front of my website. My question goes like this- I'm trying to have the latest four images uploaded, not just one. The problem is when I up the number of thumbnails to show, the thumbnails show in a row- I want them to show in a column. I'd imagine I'd have to modify something in ssi.php, maybe add a <br /> to some line of code somewhere, but I have never done php and have no idea where to begin. Can anyone help me with this? Any assitance would be greatly appreciated, thanks in advance!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #51 on: March 16, 2004, 08:01:04 am »

this has been asked before in this very thread I moved your posting to - please search it.

GauGau
Logged

tbone2004

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Random image include?
« Reply #52 on: March 16, 2004, 10:24:46 am »

Thanks so much for the script and your hard work. I read the documentaion that came with the zip file and had no problen at all installing it to work with CPG 1.2

gauqau, correct me if I'm wrong

Disc13, with php you can put php script within html, just make sure you save the file with the .php extenstion, you could do it this way

Code: [Select]
<center><table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#FF0000">
  <tr>
        <td width="25%" align="center"><?php 
print cpg_thumb&#40;0,0,1,"",1&#41;; 
?>
</td>
 <td width="25%" align="center"><?php 
print cpg_thumb&#40;0,0,1,"",1&#41;; 
?>
</td>
    <td width="25%" align="center"><?php 
print cpg_thumb&#40;0,0,1,"",1&#41;; 
?>
></td>
           <td width="25%" align="center"><?php 
print cpg_thumb&#40;0,0,1,"",1&#41;; 
?>
</td>
  </tr>
</table></center>



With using
Code: [Select]
print cpg_thumb(0,0,1,"",1); several times that will give you the same affect as using
Code: [Select]
print cpg_thumb(0,0,4,"",1);  am i right?


Cheers,
Mark
Logged

Disc13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Random image include?
« Reply #53 on: March 16, 2004, 10:59:25 am »

thanks for trying to help, but having that same line of code over and over simply prints out the latest picture multiple times.
Logged

sdh

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Doesn't work, please help
« Reply #54 on: March 16, 2004, 05:02:02 pm »

I have the SSI.php script and edited it according to the readme. But I can't get it working. :cry:

the ssi.php is in my fotoalbum map (and this map is in the webservers root. The ssi.php files says;
$url_of_cpg_dir='http://www.magnek.nl/fotoalbum';
$absolute_path_to_coppermine='/home/virtual/site16/fst/var/www/html/fotoalbum/';

The last path is the document_root according to phpinfo.php (also tried /var/www/html/fotoalbum/ssi/php/ and http://www.magnek.nl/fotoalbum/ssi.php)

Now I want to have a random thumbnail in a index.htm, so in the body I put:

<? include_once("/fotoalbum/ssi.php"); ?>
<? print cpg_random(); ?>

I have tried some more combinations (like http://www etc) but no luck so far. It probably is some dumb miscombination.
Who can help me please
Logged

Disc13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Random image include?
« Reply #55 on: March 16, 2004, 08:36:52 pm »

where is the index page you're trying to link from? older versions of php don't seem to handle relative paths really well (even though they are supposed to), and they won't accept http://www. addresses. My work around for a lot of my php was to put in the whole absolute address, '/home/virtual/site16/fst/var/www/html/fotoalbum/ssi.php' should work.
Logged

Disc13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Random image include?
« Reply #56 on: March 16, 2004, 10:12:06 pm »

Quote from: "gaugau"
this has been asked before in this very thread I moved your posting to - please search it.

GauGau


i still don't see where an answer to my column question here anywhere...

i tried modifying the ssi.php thing itself, trying to add random <br /> tags to places, but my lack of php knowledge ends up in giving me errors.

i'd imagine it would go somewhere in here, rite after the image tag before it calls the next image,

Code: [Select]
$return_value.= "<img src=\"".$url_of_cpg_dir.$cpg_album_path.$row['filepath'].$cpg_thumb_pfx.$row['filename']."\" border=\"0\" alt=\"\" title=\"";
if ($row['title']!="") {$return_value.= $row['title']." ";}
if ($row['caption']!="") {$return_value.= $row['caption']." ";}
if ($row['keywords']!="") {$return_value.= $cpg_lang_keywords . ": " . $row['keywords']." ";}
if ($row['hits']!="") {$return_value.= $row['hits']." ".$cpg_lang_views." ";}
if($cpg_random=="1")  {$return_value.= $cpg_lang_random;}
$return_value.= "\" align=\"left\" class=\"padright\" />";
if ($cpg_include_link==1){$return_value.="</a>";}
$return_value.=$td_end."\n";
$counter++;
if ($counter==$cpg_thumbcols){$counter=0;$return_value.=$tr_end;}


am I right in my thinking? again, any help would be appreciated.... thanks in advance!
Logged

sdh

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Random image include?
« Reply #57 on: March 16, 2004, 10:24:27 pm »

Quote from: "Disc13"
where is the index page you're trying to link from? older versions of php don't seem to handle relative paths really well (even though they are supposed to), and they won't accept http://www. addresses. My work around for a lot of my php was to put in the whole absolute address, '/home/virtual/site16/fst/var/www/html/fotoalbum/ssi.php' should work.


Index-page is in root, in this root the fotoalbum-map (with coppermine ofcourse) also is placed. I tried your suggestion, but nope. PHPversion according to phpinfo.php is PHP/4.3.4.
So any other tips/suggestions that I can give a try?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #58 on: March 17, 2004, 08:34:31 am »

@Disc13: take a look at the html output ssi.php return: it's a table! Find the </td> tags and replace them with </td></tr>. Find the <td> tags and replace them with <tr><td>. Take a look at my posting at the start as well: this mod goes unsupported, it does what it does - no support or feature requests taken. Take it as is or leave it.

GauGau
Logged

simoxy

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://www.noseriders.com
Random image include?
« Reply #59 on: March 19, 2004, 09:29:21 am »

my coppermine gallery is on a different server to my main part of my website, how do I cahnge
Quote
<? include_once("/home/yourdomain/public_html/coppermine/ssi.php"); ?>

so that it calls the ssi.php from my other server?

i tries just adding the address in front but that didn't seem to work!
Logged
go get in the surf!
Pages: 1 2 [3] 4 5 6 7 ... 9   Go Up
 

Page created in 0.029 seconds with 19 queries.