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 8 9   Go Down

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

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #60 on: March 19, 2004, 09:38:44 am »

depends on the settings your webhost has for the inclusion of urls instead of path/file. Generally speaking: try
Code: [Select]
<? include_once("http://yourdomain.com/coppermine/ssi.php"); ?>If this doesn't work, you simply can't use the mod on remote domains.

GauGau
Logged

cifri

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
picture thumbs,,help????
« Reply #61 on: March 19, 2004, 08:24:58 pm »

hello guys, i am trying to insert this code into my index.html and this is what i get,

Quote
// // http://www.chezgreg.net/coppermine/ // // ------------------------------------------------------------------------- // // Updated by the Coppermine Dev Team // // (http://coppermine.sf.net/team/) // // see /docs/credits.html for details // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // ------------------------------------------------------------------------- // // hack from the nuke port for the standalone version // // by gtroll // // modify aid!=4 AND aid!=6 AND aid!=7 // // to fit the album(s) you want not to show // // ------------------------------------------------------------------------- // define('IN_COPPERMINE', true); require('include/init.inc.php'); $numberpic=5; // you can change the number of pictures here global $prefix, $dbi; function truncate_string444($str) { $maxlength = 20; // maximum lenght of name in block if (strlen($str) > $maxlength) return substr($str, 0, $maxlength)." ..."; else return $str; } $content="
"; $result = db_query("SELECT count(*) from cpg_pictures WHERE aid!=4 AND aid!=6 AND aid!=7", $dbi); $nbEnr = mysql_fetch_array($result); $count = $nbEnr[0]; while ($stop<$numberpic) { srand(time()+$stop); $random_number = rand(0, $count-1); $result2 = db_query("SELECT pid, aid, filepath, filename from cpg_pictures WHERE aid!=4 AND aid!=6 AND aid!=7 AND approved='YES' LIMIT $random_number,1", $dbi); // aid numbers can be changed as need to respect permissions $picture = mysql_fetch_array($result2); $img = ""; $content .= "$img
" . truncate_string444($picture['filename']) . "

"; $stop++; } $content .= "
Go to gallery
"; print $content; ?>

[edit GauGau]
removed double posting, changed existing one to show the output as quote
[/edit]
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Random image include?
« Reply #62 on: March 19, 2004, 08:49:20 pm »

Please don't double post  :evil: .  If you don't get an answer after more than a day, then use 'bump'.
Logged
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

cifri

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
dude i need help
« Reply #63 on: March 19, 2004, 08:51:52 pm »

sorry for the postings, it was an error, help a brother out, i am not sure if i have to put the code into my index.html or somewhere else thanks
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Random image include?
« Reply #64 on: March 19, 2004, 09:02:06 pm »

Sorry, I don't know or use this mod, so can't help, but someone should give you an answer, although it's Friday, and the weekend bekons.
Logged
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

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Random image include?
« Reply #65 on: March 20, 2004, 12:07:05 am »

@cifri:

Something is wrong with your PHP tags (<?php and ?>). Make sure they are there and that they are the correct type for your setup.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #66 on: March 20, 2004, 10:37:40 am »

@cifri:
you said you pasted it into index.html: you can't have php code in plain html files. Unless you instructed your server to php-parse files with the extension ".html", this method simply won't work.

GauGau
Logged

cifri

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
@gaugau
« Reply #67 on: March 29, 2004, 07:40:49 pm »

Hello, i inserted the code for the rss.php in to my html file and it worked on my computer but when i use another computer all i see is some text but no picture? is there a way i can have the latest pictures or thumbnails in my html website?? thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #68 on: March 30, 2004, 07:03:57 am »

if your html web pages don't have ssi, you could try to play with some JavaScript Gimmicks, but basically html is static, so you can only have static content there (anyway there are no mods for SSI nor JavaScript inclusion around, you would have to code this by yourself).

GauGau
Logged

deocare

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Random image include?
« Reply #69 on: April 03, 2004, 06:13:57 am »

How can i make my thumbnail a little bigger using SSI?
Logged

Joachim Müller

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

not at all - the thumbs have the same size you specified them to have in coppermine config.

GauGau
Logged

TheNakedMan

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
    • http://www.runaked.com
Random image include?
« Reply #71 on: April 06, 2004, 02:45:43 am »

I got mine to work famously on www.runaked.com/forums


Just working on how to make all images the same size.
Logged
Are you naked?  More importantly, do you want to be?

Wilson

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
SSI
« Reply #72 on: April 06, 2004, 10:31:53 am »

Where can i get the ssi.php to include toprate, lastup, ect images in other pages.
I've tried rss, works fine with magpie until you include it on another page.

Chars, Andy
Logged
Sweet Pie

Wilson

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Random image include?
« Reply #73 on: April 06, 2004, 11:01:14 am »

OK, so I've found the ssi.php... done what it says to do but i get mysql errors

Code: [Select]
Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Logged
Sweet Pie

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Random image include?
« Reply #74 on: April 06, 2004, 11:26:45 am »

Merged your posts with the thread dealing with ssi.  Please read the entire thread.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Random image include?
« Reply #75 on: April 06, 2004, 07:45:28 pm »

ok works fine, chars!
How would you get the top rated pics to display through the ssi?
N can't u have the image title and rating included?
Logged
Sweet Pie

Wilson

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Random image include?
« Reply #76 on: April 08, 2004, 11:21:49 am »

BUMP
Logged
Sweet Pie

puntopower

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Random image include?
« Reply #77 on: April 14, 2004, 03:59:56 pm »

ive installed ssi.php and its only partly working. if u go to example.php you can see that not all the images are coming up. does any one know why this is so?

many thanks
Logged

puntopower

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Random image include?
« Reply #78 on: April 14, 2004, 06:37:22 pm »

wat i have noticed is that it is working for some albums and not others, any ideas, i have 14 albums and only about 4 of them are showing.

i am using both

<? print cpg_random(); ?>

<?php
print cpg_thumb(1,0,1,"",1);
?>

also if i set it to use say album 14
<?php
print cpg_thumb(1,0,1,"14",1);
?>

that still doesnt show the image.

any ideas plz
Logged

gj15987

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
    • http://www.nintendo-vortex.com
Picture Displaying
« Reply #79 on: April 15, 2004, 06:17:59 pm »

www.nintendo-vortex.com/bleh.php

How do i get these images to be displayed underneath each other?! They are here on the main page www.nintendo-vortex.com/vportal and i want them going down.

I downloaded the SSI addon to do this.

Any ideas?!

Thanks
Pages: 1 2 3 [4] 5 6 7 8 9   Go Up
 

Page created in 0.037 seconds with 20 queries.