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

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

Joachim Müller

the example doesn't work "out-of-the-box". Read the doc that comes with the ssi mod; it explains what settings you have to make.

Joachim

medvidek

GauGau: Is there a way to display the name of the image (I mean the description name added in the gallery) under the random image? It is already shown as an ALT text but I would like to show it under the image itself.

kaalh

restrict to public albums hook

line 88

replace :

$query = "SELECT * from {$CONFIG['TABLE_PICTURES']} WHERE approved='YES' ";
if($cgp_limit_album!=""){$query.="AND aid='".$cgp_limit_album."'";}


by  :

$query = "SELECT {$CONFIG['TABLE_PICTURES']}.* from {$CONFIG['TABLE_PICTURES']},{$CONFIG['TABLE_ALBUMS']} WHERE approved='YES' AND {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND {$CONFIG['TABLE_ALBUMS']}.visibility = 0 ";
if($cgp_limit_album!=""){$query.="AND {$CONFIG['TABLE_PICTURES']}.aid='".$cgp_limit_album."'";}



KaalH!

medvidek

Quote from: medvidek on March 06, 2005, 09:25:26 PM
Is there a way to display the name of the image (I mean the description name added in the gallery) under the random image? It is already shown as an ALT text but I would like to show it under the image itself.

Anyone can help please?

Horizon

Hi,
may somebody can say, why it takes white page:
http://foto.clubas.net/ssi.php

Fank`s, Tom :)

Slump

Hi Gaugau,

thx for your SSi.php code, it's very nice  ;D

but i would like to modifiy it to view only one random picture by category and not by album...

and is it possible to know how many categories there are ?
so, we could view only one random picture by category for all the categories  ;)

thx for your help

Jerome


vuud

Quote from: Slump on June 28, 2005, 07:07:53 PM
Hi Gaugau,

thx for your SSi.php code, it's very nice  ;D

but i would like to modifiy it to view only one random picture by category and not by album...

and is it possible to know how many categories there are ?
so, we could view only one random picture by category for all the categories  ;)

thx for your help

Jerome



I feel wierd about promoting cross threads, but in the readme for this section GauGau states this about SSI.php

QuoteIt uses php-includes, so the pages it can be used on must be PHP-enabled. As the mod doesn't take into account the privacy settings of coppermine, it is not recommended to use it anymore. It goes unsupported and only remains on this board for historical reasons and reference.

Have you looked at cpmfetch?  It does what you are looking for and is currently supported (at least by me and one or two users of it).  See the thread in this child board or check the website at http://cpmfetch.fistfullofcode.com

Vuud



Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Joachim Müller

@Slump: Vuud is right: ssi.php is not recommended for usage any more, I recommend you do as suggested and take a look at cpmFetch. Neither I (nor anyone else) currently supports ssi.php, and I will definitely not develop it any further or code custom hacks. Take ssi.php as it is if you must (you have been warned not to use it at all though!), but there's no support for it, nor will I look into any issues with it.

@Vuud: you don't have to feel sorry for promoting cpmFetch, it's the tool that the dev team recommends using as well. You're doing a great job developing it, so it comes only naturally that you tell people about it as well.

@all: ssi.php is only there for historical reasons, but shouldn't be used. Instead: use cpmFetch!


chupa2k

I need help ,
Im using the ssi.php for random , All is great but i got alot of .swf files and other media and it displays it as broken image because it trys displaying it as <img and not object tag .
Can someone help ?

vuud

Quote from: chupa2k on July 22, 2005, 01:40:30 PM
I need help ,
Im using the ssi.php for random , All is great but i got alot of .swf files and other media and it displays it as broken image because it trys displaying it as <img and not object tag .
Can someone help ?

CpmFetch will / should use the representative images for other media, or the default image for it (ie: the flash graphic).

You can try that.  I'd like to see how well that part works for someone - I tested it on a few, but I don't have many.

Vuud


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

chupa2k

I'm on it , PM you when im done .

Joachim Müller


hobox

#172
Ok, went through this looong thread and got a couple of examples of how this could be done. I maybe stupid and I can't even find the ssi.php anywhere among the mods.

Tried (after fixing some minor errors) the first script example and it works as long as  I just run it but with this error message:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/userx/public_html/gallery/randshow.php:2) in /home/userx/public_html/gallery/bridge/smf.inc.php on line 148

If I include the file in an another file I just get:

Coppermine Photo Gallery seems not to be installed correctly, or you're running coppermine for the first time. You'll be redirected to the installer. If your browser doesn't support redirect, click here.

Is my problem that Coppermine is bridged with smf?


Joachim Müller

as you have read this thread, you surely have noticed that ssi-mod goes unsupported and is no longer recommended. We recommend cpmFetch instead.

willstein

yeah guys fetch works great and it's real easy to install.
Question: Is there any way to refresh the random pictures without refreshing the page?

Joachim Müller

questions related to cpmFetch should not be posted here on this thread, don't cross-post.

raummusik

Quote from: GauGau on December 22, 2003, 11:31:18 PM
did you have a look at the readme and the example that comes with ssi.zip? It's all in there!
The syntax is<?
$cpg_include_link=1; // thumbnails are links? 0=no, 1=yes
$cpg_link_singlepic=0; // link points to album or single pic? 0=album, 1=single pic
$cpg_how_many=8; // how many thumbs do you need?
$cgp_limit_album=""; // specify certain album, ""=all
$cpg_random=0; //get random pic 0=no, 1=yes
print cpg_thumb($cpg_include_link,$cpg_link_singlepic,$cpg_how_many,$cgp_limit_album,$cpg_random);
?>
or shortened<? print cpg_thumb($cpg_include_link,$cpg_link_singlepic,$cpg_how_many,$cgp_limit_album,$cpg_random,"_blank"); ?>
In your case, this means: show a thumbnail with
0 = no link pointing to the large pic
0 = no link to a single pic
4 = display a row of four thumbnails
0 = do not restrict to a special album (in other words: from any album)
0 = don't show a random pic (switching random off means showing the last uploaded)

I'd really appreciate if you did some reading before asking questions.

GauGau

i used this gau thingy too and it rocks.. one question : when it loads in internet explorer.. first i see a white background, then it switches to black . i cannot find where i can define the white background (on load) to black background. would look nicer for me cause the whole page has black background and this comes only in internet explorer.. in firefox not . the problem is that i got the gallery on another domain so i had to include a iframe in my main.htm file, so the code works fine. its only an optical issue.. lets paste my code :



<body bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" topmargin="0">
<div align="center">
  <?
$cpg_include_link=1; // thumbnails are links? 0=no, 1=yes
$cpg_link_singlepic=1; // link points to album or single pic? 0=album, 1=single pic
$cpg_how_many=5; // how many thumbs do you need?
$cgp_limit_album=""; // specify certain album, ""=all
$cpg_random=1; //get random pic 0=no, 1=yes
print cpg_thumb($cpg_include_link,$cpg_link_singlepic,$cpg_how_many,$cgp_limit_album,$cpg_random,"Hauptframe");
?>
</div>
</body>

</html>



here i tried to change body bgcolor... but it changes another background, and not the one i need to be changed.. the funny is that its only on load (while the pics getting out of the db , just for a short moment, but just annoying..

any ideas where to change this onload white background ?

cuuu

Joachim Müller

"Unsupported" actually means "no support at all" - is this so hard to understand? You seem to be well aware that this mod is deprecated and unsupported (you told me so in the PM you sent me, which is in fact bumping this thread). Ignoring my wish not to be PMed for support doesn't improve my readiness to help you on this issue either. The dev team recommends the use of cpmFetch instead of ssi.php (as I have repeated many times over on this board). Style sheet issues you might have (white backgorund turning black after load) don't relate at all to this mod nor cpmFetch. If you insist on using ssi.php, you're on your own - that's it!

Coming to think about it: I guess it's time I locked this thread - people just don't seem to take "no" (as in "no support") for an answer ::).

Joachim