forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: content syndication (cpmFetch) => Topic started by: djib on January 15, 2006, 01:30:56 pm
-
Hello,
How can I display a random image taken from my coppermine gallerie on some other website ?
Thanks.
-
I found a solution.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - random photo displayer //
// ------------------------------------------------------------------------- //
// Based on Dr. Tarique Sani RSS feed for Coppermine //
// http://tariquesani.net/ //
//
// Adapted by djib to display a random photo - http://djib.biz //
// 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. //
// ------------------------------------------------------------------------- //
// Just put into the same directory as your coppermine installation //
// ------------------------------------------------------------------------ //
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
//How many items you want to show
$thumb_per_page = 1;
$thumb_count = 4;
$lower_limit = 0;
$album = 'random';
//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
foreach($data AS $picture) {
$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$keywords = explode(" ",trim($picture[keywords]));
$category_string = "";
$pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" alt="Random image"/></a>'.bb_decode($picture[caption]).bb_decode($picture[caption_text]);
echo $description;
}
?>
After that, just add <?php include(http://yoursite/get_photo.php); ?> where you want to display the photo.
-
http://forum.coppermine-gallery.net/index.php?board=57.0
-
djib that is EXACTLY what I needed. Thank you! And it is super simple, unlike the cpmfetch idea.
One note: you forgot your quotes on the include:
<?php include("http://yoursite/get_photo.php"); ?>
-
I'm happy you like it mqcarpenter.
Thanks for spotting the error in the include.
Here is a new version of the script that allows to display a chosen number of photos. Photos are now picked up randomly even in one album.
For example get_photo?album=6&nb=4 will display 4 photos from album 6.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - RSS Feed //
// ------------------------------------------------------------------------- //
// Copyright (C) Dr. Tarique Sani //
// http://tariquesani.net/ //
// Adapted by djib to display a random photo - http://djib.biz //
// 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. //
// ------------------------------------------------------------------------- //
// Just put into the same directory as your coppermine installation //
// ------------------------------------------------------------------------ //
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
//How many items you want to show in your get_photo script
if(isset($_GET['nb'])) {
$thumb_per_page=$_GET['nb'];
} else {
$thumb_per_page = 4;
}
$thumb_count = 4;
$lower_limit = 0;
if(isset($_GET['album'])){
$album = $_GET['album'];
}
//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
$album_name_keyword = get_album_name($album);
$CURRENT_CAT_NAME = $album_name_keyword['title'];
$ALBUM_SET = "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
//Set the album to last uploaded
$album = 'random';
}
//If the album is not set set it to lastup - this is the default
if(!isset($album)){
$album = 'random';
}
//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
foreach($data AS $picture) {
$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" alt="Photo aléatoire"/></a>';
echo $description;
}
?>
-
moving this thread accordingly.
-
Pretty cool, thanks for sharing this!
-
Is it possible to have it show the normal picture.. not the original but the http://www.babez.dk/galleri/displayimage.php?album=7&pos=1 that picture?
-
Hello
This code is working on a page but not in my vbulletin template page.
include php () seems not working.. any idea?
thanks
-
djib,
I am immensly happy with your code. I cant believe i struggled for 2 days with cpmfetch to do what this little script does.
-
This script is a nice little contribution, however it has severe drawbacks as far as I can see:
- Permissions aren't being taken into account
- Will only work for images, but not for other file types
- Will only work if in the coppermine root folder
If you can live with those drawbacks, then fine. However, we don't recommend it - we recommend cpmFetch instead.
-
This script is nice but how do you get rid of the views and picture name? ???
-
Thanx ALOT!!! :)
-
ok i see both script
the first one, how to put ( how many views ) under the picture, of my it display aside
The second script.
How to display the picture vertically instead of horrizontly
thanks
-
The code is amazing! But is there a way that the blue border around the pic dosnt show up, or a way to customize the border? Also is there a way to show the latest uploaded pictures but have 1 pic show up for each new album like they have on www.shakiramedia.com on there "latest additons"
-
Awesome little script :) One question...any way to get it to display the latest picutres, rather than randoms?
And the border can be done away with. Just add border ="0" in this line, toward the very end of the code:
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" [b]border="0"[/b] alt="Photo aléatoire"/></a>';
I actually crated a class for the picture in my page's css, added the class tag to the above instead of the border one, and can control border color, thickness, etc. from the css now. note that you can also change the "alt" tag to say something other than "Photo aléatoire."
-
Sorry for the double post. I didn't see an edit option, and realised only after I posted that bbcode tags don't work within code tags *headdesk*
so yeah, here's what I really ment to put in the code block above:
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="0" alt="Photo aléatoire"/></
-
Awesome little script :) One question...any way to get it to display the latest picutres, rather than randoms?
And the border can be done away with. Just add border ="0" in this line, toward the very end of the code:
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" [b]border="0"[/b] alt="Photo aléatoire"/></a>';
I actually crated a class for the picture in my page's css, added the class tag to the above instead of the border one, and can control border color, thickness, etc. from the css now. note that you can also change the "alt" tag to say something other than "Photo aléatoire."
Thanks you! and to have latest pictures change random' to 'lastup'
$album = 'lastup'; (like this)
-
Yay! Thank you ;D
-
Again, no edit (am I completely missing it?)
Anyway, I have another question...is there a way to use this code to specify a certain category I'd like to display pictures from, rather than an album? I saw this earlier in the thread:
get_photo?album=6&nb=4
That worked for me in the include, so I figured that changing "album" to "cat" would be worth a shot, but no luck.
-
about Thanks you! and to have latest pictures change random' to 'lastup'
$album = 'lastup'; (like this)
if i want to show the last 4 albums in a 4 row of picture
$thumb_per_page = 4;
what should the $album = must become to display one of all 4 picture of last album?
-
I absolutely love this easy script! Thanks!! I'm using it on my P!nk fansite, PinkJams.com . (No heckling please! hehe)
I have 2 installations of CPG installed, one for video and one for pics. The pic's one is working good (See the front page of www.pinkjams.com) but the video gallery instance of the script is returning "Photo al?atoire" instead of the video's related thumbnail. If you click the words, it does take you directly to the video file as designed, but I was hoping to do one of the following:
1. Display the thumbnail of the video or,
2. Display the file's "Title" that is settable in the 'edit file' interface of CPG.
Any suggestions? I realize this isnt the intended design of your script (displaying vids) but just thought I'd ask. Thanks!
Troy
-
This script is a nice little contribution, however it has severe drawbacks as far as I can see:
- Permissions aren't being taken into account
- Will only work for images, but not for other file types
- Will only work if in the coppermine root folder
If you can live with those drawbacks, then fine. However, we don't recommend it - we recommend cpmFetch instead.
-
How do i change the border color of it? I tried it with my style sheet but its not turning out right. what do i put in that line in the get_photo.php file.
Thanks in advance
-
Thanks for sharing your code :-) It is working fine from within the copermine directory. Does anyone know how to make it work for a page outside coppermine?
-
How do I use this script to pull from 1 album?
i see this
get_photo?album=6&nb=4
but dont know where to put it?
-
Hi,
thanks djib - great piece of code.
Just a question :
How do you get rid of the blue border round the pics?
Appreciate any help.
thank you.
-
so sorry,
found the answer in an earlier posting.
-
Hi again,
Just wondering - anybody know how to put some space to separate each image ?
appreciate any help.
thanks.
-
I would like to show 3 top rated and 3 most view pictures on my main page - is it possible to do it with this nice script?
best regards,
Yacenty
-
Hi,
thanks djib - great piece of code.
Just a question :
How do you get rid of the blue border round the pics?
Appreciate any help.
thank you.
Where did you find the answer? I looked at this page:
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/tips.php#cssboxes
But it doesn't even tell you where to put that code in order to style it...
-
You put it in the styesheet of the page you are usng cpmfetch on. If it doesn't use a stylesheet then add it inline using <style> tags.
-
This thread doesn't deal with cpmFetch. Don't reply with question related to cpmFetch to this thread. In fact, there's a new support board dedicated to cpmFetch issues: cpg1.4 cpmFetch by vuud (http://forum.coppermine-gallery.net/index.php?board=87.0)
-
You put it in the styesheet of the page you are usng cpmfetch on. If it doesn't use a stylesheet then add it inline using <style> tags.
You would put this:
cpm_viewRandomMediaFromAlbum(2,2,17,array("tablestyle" => "test1","imagestyle" => "test1"));
in a stylesheet?
Sorry to post again in this thread by the way :/
-
You would put this:
cpm_viewRandomMediaFromAlbum(2,2,17,array("tablestyle" => "test1","imagestyle" => "test1"));
in a stylesheet?
EDIT: oh my god, I figured it out... sorry about posting here again >.<
-
Hi, thanks for this.
I have a question: is there anything in the code for get_photo.php that could stop a page where the random pictures are included from validating in XHTML 1.0 transitional?
I'm trying to validate my page, but I keep getting this message:
Sorry, I am unable to validate this document because on line 56 it contained one or more bytes that I cannot interpret as utf-8
Line 56 is the line where I include my get_photo.php, like this:
<p class="random" align="center"><?include("http://path/to/get_photo.php");?></p>
When I delete the include bit only (not the p tags), the page validates fine.
This is my get_photo.php code (I'm posting it because it's not identical to djib's original code):
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - random photo displayer //
// ------------------------------------------------------------------------- //
// Based on Dr. Tarique Sani RSS feed for Coppermine //
// http://tariquesani.net/ //
// Adapted by djib to display a random photo - http://djib.biz //
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
//How many items you want to show in your get_photo script
if(isset($_GET['nb'])) {
$thumb_per_page=$_GET['nb'];
} else {
$thumb_per_page = 4;
}
$thumb_count = 4;
$lower_limit = 0;
if(isset($_GET['album'])){
$album = $_GET['album'];
}
//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
$album_name_keyword = get_album_name($album);
$CURRENT_CAT_NAME = $album_name_keyword['title'];
$ALBUM_SET = "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
//Set the album to last uploaded
$album = 'random';
}
//If the album is not set set it to lastup - this is the default
if(!isset($album)){
$album = 'random';
}
//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
foreach($data AS $picture) {
$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" alt="Photo aléatoire"/></a> ';
echo $description;
}
?>
Is there something wrong there? Or is my problem unrelated to this?
Thanks
-
I have tried this code - it works with a regular website but not with phpbb forum. Am I missing something or this code was not designed for a forum? Also, can I remove the title of the thumptail and only have the thumpnails displayed?
-
It wasn't specifically designed to work with phpBB. It may or may not work with it - we don't know. Probably doesn't.
-
Thanks GauGau so I can stop trying. I am checking cpmFetch now.
-
All i'm geting is a blank page, any idea on why its not working ?
TT
-
Hi, appreciate it if any body can help.
I don't know enough of PHP to amend the code by djib.
I just want to get one random image from a particular album.
thanks.
-
Morming,
@Tommytomato :
All i'm geting is a blank page, any idea on why its not working ?
Yes ;D
You do not setup your CpmFetch's config correctly ???
PYAP
-
Hi
I have my site in root folder but copermine is installed in a "wallpapers" named folder which is located is root, plz tell me how can i get random wallpapers from my wallpapers gallery folder to show on root index file ?
I am not familiar with php, plz tell me what should i have to do with code that you give in quote and where to put include tag ?
Please help me i will be very thankfull.
-
Hi
I have my site in root folder but copermine is installed in a "wallpapers" named folder which is located is root, plz tell me how can i get random wallpapers from my wallpapers gallery folder to show on root index file ?
I am not familiar with php, plz tell me what should i have to do with code that you give in quote and where to put include tag ?
Please help me i will be very thankfull.
Anyone here to please help me ?
-
I found a solution.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - random photo displayer //
// ------------------------------------------------------------------------- //
// Based on Dr. Tarique Sani RSS feed for Coppermine //
// http://tariquesani.net/ //
//
// Adapted by djib to display a random photo - http://djib.biz //
// 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. //
// ------------------------------------------------------------------------- //
// Just put into the same directory as your coppermine installation //
// ------------------------------------------------------------------------ //
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
//How many items you want to show
$thumb_per_page = 1;
$thumb_count = 4;
$lower_limit = 0;
$album = 'random';
//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
foreach($data AS $picture) {
$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$keywords = explode(" ",trim($picture[keywords]));
$category_string = "";
$pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" alt="Random image"/></a>'.bb_decode($picture[caption]).bb_decode($picture[caption_text]);
echo $description;
}
?>
After that, just add <?php include(http://yoursite/get_photo.php); ?> where you want to display the photo.
I would make a .php file with the first code right where does it need to be placed? in the root?
The second code I add to the area I want the images displayed right?
Is it posisble to have moving images like this site -
http://penelopecruz.com/
my main site is in the root then coppermine in is the gallery folder.
-
How to make thumbnail size bigger and get ride of views count.
Infact i need a clear one image thumbnail withou views.
I think no one here help others, as no one reply for my last post, however i am putting this post in just a hope.
-
A beautiful script!!! Thanks!
-
Ok I created a php file called it get_photo.php uploaded it to my coppermine folder which is pixleparty. This is what is in the php file.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - RSS Feed //
// ------------------------------------------------------------------------- //
// Copyright (C) Dr. Tarique Sani //
// http://tariquesani.net/ //
// Adapted by djib to display a random photo - http://djib.biz //
// 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. //
// ------------------------------------------------------------------------- //
// Just put into the same directory as your coppermine installation //
// ------------------------------------------------------------------------ //
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
//How many items you want to show in your get_photo script
if(isset($_GET['nb'])) {
$thumb_per_page=$_GET['nb'];
} else {
$thumb_per_page = 1;
}
$thumb_count = 1;
$lower_limit = 1;
if(isset($_GET['album'])){
$album = $_GET['album'];
}
//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
$album_name_keyword = get_album_name($album);
$CURRENT_CAT_NAME = $album_name_keyword['title'];
$ALBUM_SET = "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
//Set the album to last uploaded
$album = 'lastup';
}
//If the album is not set set it to lastup - this is the default
if(!isset($album)){
$album = 'lastup';
}
//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
foreach($data AS $picture) {
$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="0" alt=" Galleria Latest"/></a>';
echo $description;
}
?>
after that I put this where I wanted the image to show up.
<?php include("http://mysite.com/pixelparty/get_photo.php"); ?>
A picture place holder shows up, but no image and when you click on it, I get this page can not be found. I am using this on my index with express engine and I have set permissions to use php in my pages. Also I am using the latest version (1.4.10) of Coppemine and The user pictures are in /albums/userpics/.
So any help or suggestion would be aprreciated very much.
-
Well after a few tests i changed my mind! Is not so beautiful.... :)
You can c it in action integrated with Joomla. http://joomla.pcotter.com , but as Gaugau said, the script will bypass Coppermine permissions, and display random thumbs from private albums.
Anyway, due to my server settings and early stage of joomla implementation, i will keep this script for a couple days till i get my hands in cpmfetch
-
Hey dear i am satisfied with this script, plz just tell me how to control image size and how to remove views text.
-
I like this script!!!
it is possible to have 4 rows with 5 thumbs on each?
I want to put the thumbs on a table with 600 width like this website: http://www.trekearth.com/gallery/
sorry for my english... :(
est-ce possible d'avoir 4 rangé de 5 images au lieu d'avoir tout cela sur la meme ligne?
Je veux créer un tableau de 600 pixel de large qui serait centré sur ma page avec mes images qui serait justifié (et non collé) sur chaque ligne.
Voici un exemple qui ressemble un peu a ce que je veux: http://www.trekearth.com/gallery/
merci a tous
-
sorry for my english...
Your english is perfect ;D
But if mine is poor you can visit us in our French Coppermine Board (http://forum.coppermine-gallery.net/index.php?board=38.0) (started in 2004)
it is possible to have 4 rows with 5 thumbs on each?
Yes. Perhaps you can change some settings in the begining of this script.
In my opinion try CpmFetch for security reason instead this script (sorry celeritycat ;) )
PYAP
-
I know Cpmfetch but it seem very difficult to use to display picture on another website.
What is the security problem of this script?
If the problem is because he display random thumbs from private albums, it's not a problem for me because i don't have private album on my gallery, only public.
-
I know Cpmfetch but it seem very difficult to use to display picture on another website.
No it's very simple !
But, be sure to correctly set CpmFetch with correct paths.
I use CpmFetch on my personnal Gallery here (refresh screen every 10s) :
www.pays-dignois.com/galerie
and if you will visit my Gallery, i use also CpmFetch inside a FLASH animation (direct link (http://www.pays-dignois.com/galerie/Banniere-CPMfetch.html))
CpmFetch, is a very usefull script.
PYAP
-
Is there a way using this script for me to display pics from a certain gallery for one page on my site, then on another page display a pic from different galleries instead of just randomly picking images?
-
This very thread you're posting on does not deal with cpmFetch, but another unsupported little mod - the one explained on the very first posting of this thread. There is no support for cpmFetch on this very thread, but there is a whole sub-board dedicated to cpmFetch support.
@Supporters: please do not promote cpmFetch on this thread without making it totally clear that this thread is not meant for discussions on cpmFetch.
@people looking for support: please help us maintaining the board helpful - avoid thread-drift and cross-postings.
-
Im not wanting support for cpmFetch, I was wanting support on the script that was presented here that isnt cpmfetch.
-
Basically, the mod presented on this board comes as is (without support). Sorry.
-
This is GREAT! I've been trying to do it for some time myself with no success. HA HA also, it took me a while to realize why it wasn't working right for me, I had to re-name my index.html to index.php (just in case anyone else has that issue) which is no issue, my old site was all php anyhow.
Thanks everyone! I had to register just so I could express my appreciation (plus there is alot of other great info on the site) If you want to see how I used it check out www.themotens.com I'm still going to sit down when I have more time and work on making the thumb image a bit larger so it fits my little window I have it in!
-
Tec,
Just use coppermine's settings and admin tools to resize your thumbs.
All you do is set the size to 125 or 150 and run the wizard across all images.
pe
-
HI,
This random image code get_photo also
supposedly has an option to call random
images from specific albums.
// For example get_photo?album=6&nb=4 will
// display 4 photos from album 6.
<?php include("http://yoursite/gallery/get_photo.php?album=2&nb=1"); ?>
Please, has anyone had luck with this? Mine
is still pulling random pics from random albums,
and I'm unsure of how to modify the script.
Please Help?
Mikey
-
Hi,
It is now 3am, and I've been through pages and freaking pages,
looked at all other options because I am no freaking PHP programmer.
What cpmfetch needs is a wizard to build the scripts and link include
strings, to where people like me can just copy and paste from there.
Adsense/Adbrite type wizard is what I"m thinking of. Other than that,
I really don't see the point; and I can understand why you guys have
this support category locked from new titles.
Can someone please point me to a very well documented cpmfetch
script which will grab one random thumb from one specific album, with
no text or links around it?
<?php
/// PATH TO cmpfetch.php ////
include "http://mysite.com/cmpfetch/cpmfetch.php";
/// PATH TO ???????? ////
$objCpm = new cpm('/photos');
///// Syntax: cpm_viewRandomMediaFromAlbum( # rows, # cols, album id#, styleHas?h); ////
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,2);
/// CLOSING TAG ////
$objCpm->cpm_close();
?>
-
For the record, as this might help others:
Install fetch folder in your gallery folder,
and get it configed so that the test file
works. The latest dev verson has a
install file, but you have to change permissions
on the folders and files to get past the errors
that you will see, so that it can "install".
When building or using any cpmfetch scripts,
always upload and leave them in the cpmfetch
folder. If you put them elsewhere, fetch will
not be able to process that code, as it can't
see it. In your website pages, use another
include string to call the fetch scripts into action.
East
-
I couldn't figure out how to start a new thread in the main area so here goes ..
The error I am getting is:
CPG Config file not found: /home/gmpt/public_html/home/gmpt/public_html/gallery/include/config.inc.php
Test is at :
http://www.gmperformancetuning.com/cpmfetch/cpmfetch/cftest.php
Please advise .. the config.inc.php file is there!
-
jam,
you may need to play around with the path on your script.
Try the full http://site/gallery/cpmfetch/ absolute URL instead.
Be sure to leave the script in the cpmfetch folder, and call it
from elsewhere using an include.
Post your script code, that we can see it.
I have mine working on 3 different websites. Here's the
script's I'm using, if it might help you.
<?php
/// PATH TO cmpfetch.php ////
include "./cpmfetch.php";
/// PATH TO COPPERMINE IF IRREGULAR ////
$objCpm = new cpm();
///// Syntax: cpm_viewRandomMediaFromAlbum( # rows, # cols, album id#, styleHas?h); ////
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,18);
/// CLOSING TAG ////
$objCpm->cpm_close();
?>
<?php
/// PATH TO cmpfetch.php ////
include "./cpmfetch.php";
/// PATH TO COPPERMINE IF IRREGULAR ////
$objCpm = new cpm();
///// Syntax: cpm_viewRandomMediaFromAlbum( # rows, # cols, album id#, styleHas?h); ////
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,17);
/// CLOSING TAG ////
$objCpm->cpm_close();
?>
pe
-
how to show by category?????
-
As my question is relevant about this hack so cannot start new topic so i hope mods admin will not annoy on me.
I have three question about this hack, will anyone help ?
1: How to control thumbnails size ?
2: How to show thumbs vertically ?
3: How to put space between thumbs ?
-
This mod goes unsupported. We don't recommend using it. You're on your own if you decide to use it anyway. Locking.