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

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 2 Guests are viewing this topic.

Joachim Müller

delete your cookie and then join the party ;).

Joachim

Atreiou

Oppsssssss

well... now I'm fucked...  :-X

Atreiou

If I delete the row:

<? include_once("/home/vhosts/xr-italia.com/var/www/html/galleria/ssi.php"); ?>

the errors go away....

look now...

Trauma

Hey Ga where it says in your script number of thumbs how can i make it show all thumbs do i put all instead of a number?
Also is it possible for me to add a target="_blank" in the script if so where thanks again.
Whats Playing
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.hatchet-man.net%2Fwinamp%2F&hash=6e665018f7f67ae28a8ceca9cbcf90236ebc2099)

Joachim Müller

Quote from: Trauma on December 10, 2004, 08:19:24 PM
Hey Ga
The name is "GauGau" or "Joachim" if you don't mind. Of course you have read this thread and you realize this mod goes unsupported and is not recommended to be used any longer, that's probably why you directly address me ::).
Quote from: Trauma on December 10, 2004, 08:19:24 PMwhere it says in your script number of thumbs how can i make it show all thumbs do i put all instead of a number?
no, you simply can't. If you need an "all" attribute, you're free to come up with a hack.

Quote from: Trauma on December 10, 2004, 08:19:24 PMAlso is it possible for me to add a target="_blank" in the script if so where thanks again.
yes, shouldn't be to hard to search for <a href=and add the target attribute as you like.

Joachim

Atreiou


Trauma

Quote from: GauGau on December 11, 2004, 04:34:08 PM
Quote from: Trauma on December 10, 2004, 08:19:24 PM
Hey Ga
The name is "GauGau" or "Joachim" if you don't mind. Of course you have read this thread and you realize this mod goes unsupported and is not recommended to be used any longer, that's probably why you directly address me ::).
Quote from: Trauma on December 10, 2004, 08:19:24 PMwhere it says in your script number of thumbs how can i make it show all thumbs do i put all instead of a number?
no, you simply can't. If you need an "all" attribute, you're free to come up with a hack.

Quote from: Trauma on December 10, 2004, 08:19:24 PMAlso is it possible for me to add a target="_blank" in the script if so where thanks again.
yes, shouldn't be to hard to search for <a href=and add the target attribute as you like.

Joachim
Thanks GauGau i dont mind using the mod even though its not supported when they realase a new version of coppermine are you going to make a supported version?
Whats Playing
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.hatchet-man.net%2Fwinamp%2F&hash=6e665018f7f67ae28a8ceca9cbcf90236ebc2099)

Ozh

(sorry to go off-topic but ... where the f*ck is the "New Thread" button on this board ? I can swear I see nothing ...)

Casper

There is no new thread on the mods board for regular users, just devs.
If you have a new mod, post it on a thread that asks or talks about it, or start a new thread on the general board, and we will move it if appropriate.
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

Ozh

ho ok
thx casper, feel free to delete my 2 posts here

Joachim Müller

Quote from: Trauma on December 11, 2004, 07:30:47 PM
Thanks GauGau i dont mind using the mod even though its not supported when they realase a new version of coppermine are you going to make a supported version?
The mod will work with cpg1.4 as well. I have a total redo of the mod on my todo list, but it's not top priority, so I'm not sure if or when I'm going to start this.

Joachim

Kamui Shirou

Im no PHP guru but Im want to export the latest images to my Portal System for IPB.If anyone knows how to set this up for the UnrealPortal for IPB 2.0 Let me know?

medvidek

This question was asked few times but I did not find the reply. Is there a chance to change the size of the random image? (For example I want to change the HEIGHT size to fit the image in the design).

And one more question. Is it possible to show random image from selected CATEGORY? Not only ALBUM.

Thanks for your time!

medvidek

#153
Quote from: medvidek on December 17, 2004, 12:30:54 AM
This question was asked few times but I did not find the reply. Is there a chance to change the size of the random image? (For example I want to change the HEIGHT size to fit the image in the design).

Of course the best thing would be to show random image of the medium image and to change the size of this medium image. It is not good idea to make small pictures larger but larger pictures smaller ;)

I found how the change the width of the small image used in random preview but the image is than just few large pixels ;))))

medvidek


Quote
This question was asked few times but I did not find the reply. Is there a chance to change the size of the random image? (For example I want to change the HEIGHT size to fit the image in the design).

After three days I found the solution.

If you want to change the size of the random image, you can just add "height" parameter on the line 142:

FIND THIS LINE:
$return_value.= "<img src=\"".$url_of_cpg_dir.$cpg_album_path.$row['filepath'].$cpg_thumb_pfx.$row['filename']."\" border=\"0\" alt=\"\" title=\"";

CHANGE IT TO:
$return_value.= "<img src=\"".$url_of_cpg_dir.$cpg_album_path.$row['filepath'].$cpg_thumb_pfx.$row['filename']."\" border=\"0\" alt=\"\" height=\"190\" title=\"";


Problem is that your picture will be in terrible quality. But you can change the loading of thumbnail image for loading of NORMAL image.

Go to line 59 and look for:

$result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name=thumb_pfx'");

CHANGE IT TO:

$result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='normal_pfx'");

Since now you will load normal image on your main page where the hieght size will be defined as you wish.

blowndeadline

Here is a quick question, why is this such a complicated thing to accomplish? You would think that 90% of everyone that uses a photo gallery would want to display a image from that gallery on their main page since Coppermine isn't a CMS?
I still haven't figured it out and it looks like I will just use Flash ans MySQL to call a random image from the database, might be easier!

Great gallery none the less!

Mike

Tranz

Quote from: blowndeadline on January 11, 2005, 09:44:17 AM
Here is a quick question, why is this such a complicated thing to accomplish? You would think that 90% of everyone that uses a photo gallery would want to display a image from that gallery on their main page since Coppermine isn't a CMS?
I still haven't figured it out and it looks like I will just use Flash ans MySQL to call a random image from the database, might be easier!

Great gallery none the less!

Mike
er, It's been done. It's even a sticky in this sub-board.

onuzu

Hi all,

Can the ssi.php work with CPG 1.3.2? I just installed the latest version newly and would like images to show on my other pages

Joachim Müller


carper

Hi,
I try to use the ssi mod but the pics don't show up in the example.php 
.


Warning: main(/srv/www/www.monegrosbtt.com/ssi.php): failed to open stream: No such file or directory in /srv/www/dominios/www.monegrosbtt.com/example.php on line 38

http://www.monegrosbtt.com/example.php

Si, ademas hay alguien que me contesta en cristiano, seria la releche.
Gracias