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 ... 5 6 7 8 [9]   Go Down

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

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #160 on: March 02, 2005, 07:41:58 am »

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
Logged

medvidek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Random image together with text
« Reply #161 on: March 06, 2005, 09:25:26 pm »

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

kaalh

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Random image include? (SSI.php)
« Reply #162 on: March 21, 2005, 12:42:48 am »

restrict to public albums hook

line 88

replace :

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

by  :

Code: [Select]
$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!
Logged

medvidek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Random image together with text
« Reply #163 on: March 23, 2005, 11:40:58 am »

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

Horizon

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Random image include? (SSI.php)
« Reply #164 on: March 28, 2005, 03:55:20 pm »

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

Fank`s, Tom :)
Logged

Slump

  • Coppermine newbie
  • Offline Offline
  • Posts: 0
Re: Random image include? (SSI.php)
« Reply #165 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

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Random image include? (SSI.php)
« Reply #166 on: June 28, 2005, 07:35:46 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

Quote
It 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



Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Random image include? (SSI.php)
« Reply #167 on: June 29, 2005, 09:49:50 am »

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

Logged

chupa2k

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Random image include? (SSI.php)
« Reply #168 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 ?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Random image include? (SSI.php)
« Reply #169 on: July 22, 2005, 05:19:57 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


Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Random image include? (SSI.php)
« Reply #170 on: July 22, 2005, 05:58:57 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Random image include? (SSI.php)
« Reply #171 on: July 23, 2005, 01:05:50 pm »

don't PM! Post!
Logged

hobox

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Random image include? (SSI.php)
« Reply #172 on: September 20, 2005, 06:12:03 pm »

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?

« Last Edit: September 20, 2005, 06:28:02 pm by hobox »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Random image include? (SSI.php)
« Reply #173 on: September 20, 2005, 06:43:00 pm »

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

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: Random image include? (SSI.php)
« Reply #174 on: September 26, 2005, 09:20:47 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Random image include? (SSI.php)
« Reply #175 on: September 26, 2005, 10:04:44 am »

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

raummusik

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Random image include?
« Reply #176 on: October 26, 2005, 11:03:00 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
Code: [Select]
<?
$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
Code: [Select]
<? 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 :

Code: [Select]

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Random image include? (SSI.php)
« Reply #177 on: October 27, 2005, 09:28:31 am »

"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
Logged
Pages: 1 ... 5 6 7 8 [9]   Go Up
 

Page created in 0.12 seconds with 19 queries.