<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
?>
Category name | Album | New count |
Haley - The early years (1999-2002) | 2000 Haley - the second year | 17 new |
1999 Haley - the first year | 69 new | |
2001 Haley - the third year | 30 new | |
Haley, Christi and me | Our furry friends | 18 new |
May 2003 - Beckett Trip | 15 new | |
Misc - Just don't fit anywhere | 11 new | |
img src="/cfimageget.php?category=7"
<?php
include "../php-lib/cpmfetch/coppermine.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMediaFromAlbum(1,3,7);
$objCpm->cpm_close();
?>
<?php
$options = array(
"tableStyle" => "photoclip",
"rowStyle" => "photoclip",
"cellStyle" => "photoclip",
"linkStyle" => "photoclip",
"altTag" => "One of the last photos submitted",
"imageStyle" => "photoclip",
"imagesize" => "int") ;
$objCpm->cpm_viewLastAddedMedia(4,2,$options);
?>
??? Boy I am impressed! I want to send you things... money, gifts, girls, etc... how can I do this? Well, tell you what... the Coppermine people have put probably at least 2000x more work into Coppermine. Why not send something to them instead. I tried finding a link on the site to send you too... couldn't - if you can't either, send a donation to the www.eff.org (http://www.eff.org) instead.
This is the thread you have been looking for: We need your help (http://forum.coppermine-gallery.net/index.php?topic=14227.0) ;)
Great work! We (the coppermine dev team) want to thank you very much for the superb tool (and the support you're providing for it). CpmFetch is the one and only tool we recommend using to display coppermine content on non-coppermine pages.
Here is how you can use 1.3.9 or better to accomplish this: The comments are inserted for educational purposes
Code:
<?php
// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');
// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");
// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");
print "<img src='$imagename'>";
?>
You have to take the next step and figure out how to get $imagename into your background tag Smiley
<body background="<?php include 'random.php'; ?>" bgcolor="#000000" >
And voila'! The error I get:
Fatal error: Call to a member function on a non-object in /home/fogpeopl/public_html/test/random.php on line 4
Is it me? :-\\
-michael
include "../cpmfetch/coppermine.php";
// $objCpm = new cpmfetch("/bg");
$objCpm = new cpm("/bg");
// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');
// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");
// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");
print "'$imagename'";
$objCpm->cpm_close();
<body background="'/bg/images/'" bgcolor="#000000" >
include "../cpmfetch/coppermine.php";
$objCpm = new cpmfetch("/bg");
// $objCpm = new cpm("/bg");
// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');
// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");
// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");
print "'$imagename'";
$objCpm->cpm_close();
Whoops, yeah that was my bad. Got the open and close in now.
When I use this code:Code: [Select]include "../cpmfetch/coppermine.php";
// $objCpm = new cpmfetch("/bg");
$objCpm = new cpm("/bg");
// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');
// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");
// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");
print "'$imagename'";
$objCpm->cpm_close();
I get a page but no image, this is my source tag:Code: [Select]<body background="'/bg/images/'" bgcolor="#000000" >
It's close... so very close. I uploaded 1.4 today, so that should be working right. Any ideas?
MUCH thanks btw, this is helping a lot
-michael
You set me on the right track and, after making the change u suggested and another I got all passes on cftest, but this was followed by the error message:
Trying to display some images:
ERROR: Path to Coppermine incorrect. (/home/bymnews/public_html//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/bymnews/public_html/copperminefetch/cpmfetch/cpmfetch.php on line 737
I looked at cpmfetch.php but the answer to the problem doesn't seem to be there, though I figured it's something to do with the domain name????
Ur advice will be appreciated.
Hah, what a pair we make...
Hah, what a pair we make...
You flatter me by comparison. ;)
Made all the changes, and I am WORKING! Thanks much for the help with that.
I think that was the hard part. What I'd like to do now is display the image owner's name somewhere else on the page. I assume it's just another print statement, but is the owner name attached to a variable in CPMFetch?
I've been wracking my brain around cpmfetch for hours and i've got the basics down I think. unfortunately I'm not so adept at css which I should be learning. All i'd like to do is put everything into nice organized tables which I believe I can achieve through stylesheets
here's the layout I'm looking for if someone could at least tell me if it's possible then I'll keep at it.
|--------------------------------------------------
| Thumbnail | description | rating |
|---------------------------------------------------
| hits |uploaded by|
---------------------------------------------------
The thumbnail will be large and square, while description and rating will be much shorter... Maybe I am not envisioning it.
I have no idea if its possible via CSS with the tables CpmFetch returns, but you can always do something like what fogpeople there is doing and get the data back and build a table with it.
The thing with the default tables cpmfetch returns is that it only iterates a subtitle once, so its all on one like.
When you get it working, post an example and code if you are willing... someone else can benefit from it also then :)
I'd recommend inserting a:
print "<PRE>";
print_r($data[0]);
print "</PRE>";
Somewhere after you get the random image... that will display a list of what is included in there... there is an awful lot of cool
print $imagename[pOwner_Name];
And I get a "/" displayed... do I need to change the original code in the include? I'd recommend inserting a:
print "<PRE>";
print_r($data[0]);
print "</PRE>";
Somewhere after you get the random image... that will display a list of what is included in there... there is an awful lot of cool
Frickin' awesome. So I tried changing the data line to this:Code: [Select]print $imagename[pOwner_Name];
And I get a "/" displayed... do I need to change the original code in the include?
(this is very abridged, I did try to declare a variable and add the Owner_Name entry to the original function first :)
$ownername = $data[0]['pOwner_name'];
From here you should understand how to get any of the information out of there that you want!
$ownername = $data[0]['pOwner_name'];
From here you should understand how to get any of the information out of there that you want!
Lightbulb time for me.
Would you believe me if I told you I had that config at one point (minus the lowercase "n" of course) as I tried to work it out? Honest!
Well your help has truly been a gift today. I'm mostly a "tweaker" of code, so those little syntax things get every dang time. But I genuflect upon your gratitude today!!
-m
guys i have trouble with this one... i can get the random images to run in my .html site
i already fixed the test and everything works great even saw the thumbnails in the test page
im having trouble with step 4
Step 4. Add a few calls into a test page.
Into a .php page (or one that is executed as one) in the same directory that contains your CoppermineFetch directory , add the following php statements.
Note: This example assumes that you have the Coppermine Photo Gallery installed into a directory named "gallery" right off the root of your websites. So if you were to go to a web browser and enter http://www.yourwebsite.com/gallery - you would get Coppermine.
<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
The lines above do this:
This includes the cpmfetch program objects.
This creates the cpmfetch object - you include the partial URL to your coppermine install.
This one of many calls you can make to the program. This displays 6 random images in 3 rows x 3 columns.
This line closes the database connections the object has.
In a real page, you could have the first two lines at the top of your file, the close at the bottom and any number of calls in between.
anyone can help me? i can figure this one out
<?php
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,2);
$objCpm->cpm_close();
?>
<iframe src="http://www.reefphilippines.com/gallery/cpmfetch/randomimages.php" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"" height="200" width="600" scrolling="no"></iframe>
i did what was in the other thrend and this is the message that showed up
this is what i placed in my .php fileCode: [Select]<?php
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,2);
$objCpm->cpm_close();
?>
i was trying to open the .php file with this code...Code: [Select]<iframe src="http://www.reefphilippines.com/gallery/cpmfetch/randomimages.php" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"" height="200" width="600" scrolling="no"></iframe>
and this is what it displayed..
Warning: main(gallery/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2
Warning: main(gallery/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2
Warning: main(): Failed opening 'gallery/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 2
Fatal error: Cannot instantiate non-existent class: cpm in /home/virtual/site123/fst/var/www/html/gallery/cpmfetch/randomimages.php on line 3
im sooo lost with step 4 pls help me out this is a great program but i can get the final steps....
Does anyone here know how to add <?php $objCpm->cpm_viewLastAddedMedia(1,2) ?>
to a block in phpnuke?
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
include "./coppermine/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
Okay I'm sure this is something simple but I have no idea what I'm doing! I want to use cpmfetch to show random images on my xoops set up. I installed it and ran the test and I got pass/info and no errors. I made the custom block but no images will show up in it. I just want one image.Code: [Select]include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
I also triedCode: [Select]include "./coppermine/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
I'm an intermediate user
my test set up is http://foreverpurple.com/xoopstest/index.php
my gallery is http://foreverpurple.com/gallery/index.php
version is 1.3.2
Yes its like Nukeportal.
The custom module I created has an option to use 'php script' I'm also fairly certain it should work because someone from XOOPS sent me here to get this program from you.
would i be able to use this to put a random image block onto the sidebar of an existing gallery template?
for instance, i am using the grey satin template. instead of having the "Random Image" block in the {GALLERY} section, could i move it over to the sidebar under where all the navigational links {MAIN_MENU} is located?
would i just use a php include in the "template.html" file? or is this not possible at all?
i apologize, i looked at the other thread you mentioned, and noticed that someone had a question very similar to mine that was never answered. i assumed i wouldnt be using CPIMAGEGET for this since you mention under "bad uses" that using it on the same page as the gallery itself is no good, which is exactly what i want to do.
i have checked out cftest.php and there are no problems. http://www.seventhstranger.net/gallery/cpmfetch/cftest.php
i created a new file with the given code and it works fine : http://www.seventhstranger.net/gallery/cpmfetch/random.php
however, when i try to include the random.php file into my template.html, nothing comes up. (i am trying to put the "random image" feature in my sidebar along with the navigation) It's not messing up my template, the gallery template still works fine, however the php include isnt working, it just shows nothing.
am i supposed to put this include in a different file? is there another magical way to include my random.php file into my gallery template?
EDIT: well i just tried to include the random.php file into another html file other than template.html and it worked fine: http://www.seventhstranger.net/gallery/whatever.html
so is this just impossible to use in the template at all? or am i completely missing something?
I don't know where to post this question, so I'll post it here.
Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
and the following to an htm file:
<?php
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
But what I'd like to be able to do is have the Album display on the htm page just the way it does in cpg. Possible with fetch? Or is there another way?
From old forum:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => "The gallery was last updated:<br>%w","imagelink" => "album", cellattributes" => array("align"=>"center")));
Will align the contents of the TD tag
----------------------------------------------------------------
Gives error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:Your webhost won't be happy if you do this, I used a similar approach before on my personal page. My webhost notified me of some drawbacks and changed the policy for .htaccess files. Not a recommended method, has impact on server performance and security.
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
sorry to double post but...
can i mod the random images so when i click the random image it opens a new browser for the image?
target="_blank" kinda thing
$linky = mysql_connect("localhost", "xxxxxxxx", "xxxxxxxx");
mysql_select_db("xxxxxxxx", $linky);
$getweb = mysql_query("SELECT * FROM cp133_users WHERE user_name=$ownername", $linky);
$row = mysql_fetch_array($getweb, MYSQL_ASSOC);
$website = $row['user_website'];
print $ownername;
print $website;
Got Cpmfetch working in a test htm page, by adding a couple of line to my .htaccess:Your webhost won't be happy if you do this, I used a similar approach before on my personal page. My webhost notified me of some drawbacks and changed the policy for .htaccess files. Not a recommended method, has impact on server performance and security.
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
You need single quotes around the $ownername in the query. Without them, MySQL looks for a field with the name of the user, the quotes indicate you are trying to match a literal value.
$linky = mysql_connect("localhost", "xxxxxxxx", "xxxxxxxx");
mysql_select_db("xxxxxxxx", $linky);
$getweb = mysql_query("SELECT * FROM 'cp133_users' WHERE user_name='$ownername'", $linky);
$row = mysql_fetch_array($getweb, MYSQL_ASSOC);
$website = $row['user_website'];
$linky = mysql_connect("localhost", "xxxxxxxx", "xxxxxxxx");
var_dump($linky);
$db = mysql_select_db("xxxxxxxx", $linky);
var_dump($db);
var_dump("SELECT * FROM cp133_users WHERE user_name='$ownername'");
$getweb = mysql_query("SELECT * FROM cp133_users WHERE user_name='$ownername'", $linky);
var_dump($getweb);
var_dump(mysql_error());
var_dump(mysql_num_rows($getweb));
$row = mysql_fetch_array($getweb, MYSQL_ASSOC);
$website = $row['user_website'];
Let's add some debug code
I would like to include on my frontpage only the latest added pic (full size) , but no albums and other thumbnails..Albums would be approached through a link on the frontpage. How should I do this?
alblist and catlist has to remain in "the content of the main page" no matter what. Create a splash page using cpmFetch with only your last added pics, and send your users to this splash page before they're sent anywhere else (i.e. to the actual coppermine page).
I earlier posted the following question:QuoteI would like to include on my frontpage only the latest added pic (full size) , but no albums and other thumbnails..Albums would be approached through a link on the frontpage. How should I do this?
Gaugau answered:Quotealblist and catlist has to remain in "the content of the main page" no matter what. Create a splash page using cpmFetch with only your last added pics, and send your users to this splash page before they're sent anywhere else (i.e. to the actual coppermine page).
I have installed cpmfetch, and technically, it works (http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/test.php). But the pic is still small, and I would like it to be fullsize. Compare: http://www.apparentlynothing.com/. Is there a way to achieve this? Thanks!
thanks vuud; that manual will prove to be very useful. Thanks to the manual I have been able to vary the size of the pic, great. I am almost where I want to be. I would like to a) align the pic in the middle, rather than on the left, and b) add the background colour I use elsewehere on my website. From your manual, I understand this should be possible. However, I am familiar with CSS, but know nothing about PHP. Can you give me a hint how I can change or include such variables (or CSS codes) in the PHP code? Thanks!
Please can someone let me know why:
The following works:
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>
and the following doesn't:
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
$objCpm->cpm_viewMostVotedMedia(5,1);
$objCpm->cpm_close();
?>
Not sure I understand how this works, but all I need this function for is to display the most voted pics.
Thanks in advance
Dill
Would anyone be willling to give me a little help please? I have smf 1.0.5, coppermine 1.3.3 and copperminefetch 1.4.1. Everything is installed and working properly. I used the <img src="/cfimageget.php?album=3"/> to pull a random image from a specified album to my forum index. What I want to do is pull 5 images at once from that specified album. The pictures are for a customized car website and would like to display the customized car of the week in a block on the forum index. Or display one image at a time with the option to click a next or previous button for more images from the album. My php skills suck so I'm fumbling in the dark on this. My directory structure is setup as following.
root/cgp133/albums
root/forums/cpmfetch
Thanks very much VUUD :) perfect except on the forum. I have used that function in the my customer site header and the function works on the hime page /index.php and on the photoalbum /photoalbum, but when I go to the forum /forum, I get the following error, which I am sure it has to do with the way I am referencing the code, but my php is not that good. I have included the error below and also the code I use for including the images:
Error:
====
Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28
Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28
Warning: main(./cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/mystaffi/public_html/_header.php on line 28
Warning: main(): Failed opening './cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mystaffi/public_html/_header.php on line 28
Fatal error: Cannot instantiate non-existent class: cpm in /home/mystaffi/public_html/_header.php on line 29
Code:
===
<?
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
#$objCpm->cpm_viewRandomMedia(5,1);
#$objCpm->cpm_viewMostVotedMedia(1,1);
$objCpm->cpm_viewRandomMostViewedMediaFrom("",5,1);
$objCpm->cpm_close();
?>
If I wasn't so dang broke I'd be more than happy to make a donation to you Vuud lol. As for doing it for me thanks, but I want to learn how to do this kind of stuff and that won't help me. I'll read thru the docs again and try to see if I can make sense of what I need to do. Where would be the best place to post any questions I have about this for you? Here in this forum or somewhere else? I saw how to do the five images using cfimageget, but like you said you'll get double images. If there were a large amount of pic's in the album that wouldn't be too much of a problem. But with probably no more than 5 pic's of the car each week that won't work too well.
The best you can do using cfimageget is the 5 photos at a time. Yes, it can be done. See this in the docs for how to do it.
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch09s03.html
You can end up with double images though - since each call is completely different from the others.
Otherwise your next best hope is to work the normal PHP into the forum template. I did that with my SMF forums. Once you do that you can get five images.
There are a few examples in the docs for the php you would need to do... not sure of your forum layout though. If you want me to just do it for you, see the list of organizations you can donate to in the docs... prove you made a donation and I will go ahead and do it all.
Otherwise try the php route (getting that into the template - its all cut and paste almost, so php is not really required, just reading of the docs and trying it) and let me know where you get stuck
Vuud
If I wasn't so dang broke I'd be more than happy to make a donation to you Vuud lol. As for doing it for me thanks, but I want to learn how to do this kind of stuff and that won't help me. I'll read thru the docs again and try to see if I can make sense of what I need to do. Where would be the best place to post any questions I have about this for you? Here in this forum or somewhere else? I saw how to do the five images using cfimageget, but like you said you'll get double images. If there were a large amount of pic's in the album that wouldn't be too much of a problem. But with probably no more than 5 pic's of the car each week that won't work too well.
The best you can do using cfimageget is the 5 photos at a time. Yes, it can be done. See this in the docs for how to do it.
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch09s03.html
You can end up with double images though - since each call is completely different from the others.
Otherwise your next best hope is to work the normal PHP into the forum template. I did that with my SMF forums. Once you do that you can get five images.
There are a few examples in the docs for the php you would need to do... not sure of your forum layout though. If you want me to just do it for you, see the list of organizations you can donate to in the docs... prove you made a donation and I will go ahead and do it all.
Otherwise try the php route (getting that into the template - its all cut and paste almost, so php is not really required, just reading of the docs and trying it) and let me know where you get stuck
Vuud
Thanks for your help,
sinbinner
sorry wanted to also ask. I get the images to be nicluded now in the forum section, but get a waring:
Warning: Missing argument 4 for cpm_viewmostvotedmediafrom() in /home/mystaffi/public_html/forum/cpmfetch/cpmfetch.php on line 840
The code that I am useing to include the pics looks as follows:
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
#$objCpm->cpm_viewRandomMedia(5,1);
#$objCpm->cpm_viewMostVotedMedia(1,1);
$objCpm->cpm_viewMostVotedMediaFrom("",5,1);
$objCpm->cpm_close();
?>
Thanks in advance.
Dill
Hey All ,
Listen at http://www.toaster.co.il/main/mytoaster.php?id=3 for example i got the cpmfetch workin displayin 3 random images in a row on the left side
all is great BUT....
that link is also accesseble at http://aloni.toaster.co.il and it cannot find the path http://aloni.toaster.co.il/community/gallery for displaying the images .
What im saying is , How can i specify hardcoded the url for the coppermine in the cpmfetch as in http://www.toaster.co.il/community/gallery format and not from the http_header ?
Well what i ment is that according to the cpmfetch code if i surf to http://aloni.toaster.co.il/community/gallery i will reach the gallery , But thats not the case .. aloni.toaster.co.il is a htaccess virtual subdomain that directs to http://www.toaster.co.il/main/mytoaster.php file directly dues not having the correct path to the coppermine and bringing broken images coz it cannot find http://aloni.toaster.co.il/community/gallery....
Can i specify a URL for the cpmfetch to display the images from there ? hardcoded ???
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/euroclub/17-07-05_LetsDance/thumb_20050717-euroclub_25.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/templiers/14-02-04_Lovenight/thumb_081.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/reservoir/23-03-05_Ganesh-ATF-Belladonne/thumb_20050323-rezervoirkaffe_53.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/salles_concerts/zenith/16-11-04_IsabelleBoulay/thumb_20041116_Zenith-34.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/bidule/22-07-05_DePassage/thumb_20050722-bidule_07.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/chesters/08-10-04_DJ_LFK/thumb_20041008_Chesters-04.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Understand nothing ... too many variables, doc very hard to understand when you don't speak english ... and
Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your galleryCode: [Select]Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/euroclub/17-07-05_LetsDance/thumb_20050717-euroclub_25.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/templiers/14-02-04_Lovenight/thumb_081.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/reservoir/23-03-05_Ganesh-ATF-Belladonne/thumb_20050323-rezervoirkaffe_53.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/salles_concerts/zenith/16-11-04_IsabelleBoulay/thumb_20041116_Zenith-34.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/bidule/22-07-05_DePassage/thumb_20050722-bidule_07.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/chesters/08-10-04_DJ_LFK/thumb_20041008_Chesters-04.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
HTML tables > I'm working on a site I want to validate XHTML 1.0 strict ... dead for me.
What a pity, I feel a powerful stuff, but for newbies like me, it's hell.
Understand nothing ... too many variables, doc very hard to understand when you don't speak english ... and
Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your galleryCode: [Select]Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/euroclub/17-07-05_LetsDance/thumb_20050717-euroclub_25.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/discotheques/templiers/14-02-04_Lovenight/thumb_081.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/reservoir/23-03-05_Ganesh-ATF-Belladonne/thumb_20050323-rezervoirkaffe_53.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/salles_concerts/zenith/16-11-04_IsabelleBoulay/thumb_20041116_Zenith-34.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/bidule/22-07-05_DePassage/thumb_20050722-bidule_07.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
Error in getImageTouse: Extension (strtolower): .jpg File:/home/rbn/www/photos//albums/soirees_bars/chesters/08-10-04_DJ_LFK/thumb_20041008_Chesters-04.jpg
Notice: Undefined index: dirname in /home/rbn/www/cpmfetch/cpmfetch_dao.php on line 841
HTML tables > I'm working on a site I want to validate XHTML 1.0 strict ... dead for me.
What a pity, I feel a powerful stuff, but for newbies like me, it's hell.
I apologize for not translating the docs, I only know english.
Can you point me at the url for the cftest page? Possibly what version of cpmfetch you are using? What web server? What version of PHP?
Well with a bit of Machine Head and some help from you vuud everything works great .
Actually CPG server is very very slow (92 sec for 16 queries ...) hoping you can read.
I'm using CPM FETCH 1.4, I have read step by step your guide line.
Linux Server, PHP/4.3.10
I had a similar error. The problem probably comes from the fact that the thumbnail and intermediate prefix are hard-coded into cpmFetch (instead of being pulled from the config as I suggested way back in an older thread that deals with cpmFetch) - you probably have one that differs from the default. Use the search and replace "thumb_" in the code with the prefix you have chosen. I'm currently looking into some other issues as well, will post my results as soon as I'm done.
My suggestion for future versions: as you're reluctant to add a query to the core of cpmFetch that looks settings up from coppermine's config table, I suggest adding a routine that caches those settings, or writes them into a setup file that get's included by cpmFetch. There's way too much hard-coded stuff in cpmFetch (e.g. the name of the albums folder as well). Another drawback is the use of tables with a fixed number of columns for the results, I'd rather have block elements with the float attribute set accordingly, will work for all screen resolutions without nasty white space. As I said above: I'll post my suggested code changes once I'm done with the hack.
Fatal error: Call to undefined function: cpm_viewrandomtopratedmediafrom() in /home/ramoswa/public_html/waramos/home.php on line 242
<?php
include_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,57,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>
<?php
require_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomTopRatedMediaFrom("","1","1",array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>
vuud,
I apologize if I am off-topic, but I have the following problem and would really appreciate some help:
I get the following error on my second instance of calling cpmfetch on my home page:Code: [Select]Fatal error: Call to undefined function: cpm_viewrandomtopratedmediafrom() in /home/ramoswa/public_html/waramos/home.php on line 242
My first call of cpmfetch works and is as follows:Code: [Select]<?php
include_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,57,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>
I'm having trouble with the second call to cpmfetch on my home page. The code is as follows:Code: [Select]<?php
require_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomTopRatedMediaFrom("","1","1",array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
$objCpm->cpm_close();
?>
I'm trying to get different random photos according to specific needs on one page. The first php code works to bring up a random photo from a specific album. The second one is trying to call a random photo of the toprated from all albums. It seems that I cannot get a second random image using anything else but the
"viewwRandomMediaFromAlbum" function. Anything else I try, I get a "Call to Undefined Function" error.
You can view the page by going to:
http://www.waramos.com/test.php (http://www.waramos.com/test.php) to see what I'm talking about.
Thanks!!
~Sub
<?php
require_once("/home/ramoswa/www/waramos/cpmfetch/coppermine.php");
$objCpm = new cpm('/');
?>
<?php
$objCpm->cpm_close();
?>
hey can anyone help me
im running coppermine and smf (latest on both) and am trying to use the latest cpmfetch, when i run the test file i get mysql errors in the cpmfetch_deo.php file
see http://www.uhcc.co.uk/cpmfetch/cftest.php
hope some1 can help
<?php
$objCpm->cpm_viewRandomTopRatedMediaFrom("",1,1,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
?>
worked m8 thanks alot.
not sure if they are meant to but my images look grainy..
http://www.uhcc.co.uk/cpmfetch/cftest.php
thanks :)
edit: it looks fine on my site (http://www.uhcc.co.uk/home.php - bottom right)
vuud,
One other thing, I'm using the code you gave me to try and pull a random photo from my toprated. It seems to be randomly choosing an image (Rated or NOT) from my entire gallery. I am using Coppermine 1.4.1 and the latest cpmfetch.
Here's the code I'm using:Code: [Select]<?php
$objCpm->cpm_viewRandomTopRatedMediaFrom("",1,1,array("tablestyle" => "randphoto","imagestyle" => "randphoto"));
?>
You can go to my site at www.waramos.com/home.php (http://www.waramos.com/home.php) to see what I'm talking about. The random photos in question is the one next to the "Your Opinion Counts!" section on the front page.
Any ideas? Thanks again!
~Sub
I'm new to this and I am a tad bit confused.
How can I display the list of albums from a certain category?
I'm crying, nothing works with me.
Fed up with this app' : great for all, but not for me :)
Keep up the work :)
don't worry, look at Rod's karma: it's not your fault nor the fault of cpmFetch, but a classical PEBCAK case imo. ;D
vuud,
Tried to change the value of var $topPercentForMostViewed = 25;
to a lower number (started at 5) and still no effect.
I guess I should just waited until more of my photos are rated?
Thanks again vuud! cmpfetch is awesome!! 8)
don't worry, look at Rod's karma: it's not your fault nor the fault of cpmFetch, but a classical PEBCAK case imo. ;D
I'm new to this and I am a tad bit confused.
How can I display the list of albums from a certain category?
Interesting... that one has never come up before.
I don't think there is a way to list the albums in the a group of categories. Be a neat feature though
CpmFetch has been mostly for retrieving stats and images. I can probably add that to one of the upcoming dev releases maybe
To vuud, I think like Gaugau you think me very dumb ... but I KNOW I have changed the prefix (thumb_ > tn_) ... but it doesnt' work. I'm not english, but I KNOW read it.
As there is no index.htm / php on the cpmfetch dir, you can download the files to see where is it's "wrong" ...
http://www.sortons.net/cpmfetch/
Done :)
Server seems to be OK ... but if you have ideas to configure it better, I take :)
Like the Song of Danny Elfman for the last film of Tim Burton, about Augustus Gloop
"A miracle has taken place, a miracle has taken place"
I have renamed in .txt ... reupload the 2 files (php and txt) ... and ... !!!!!!!!!! It works !
I have not the logic in php/mysql ... and with this, I understand less :)
Now learn how to USE it ...
I forgot to upload, indeed > Very dumb ... and yes, very crazy too ... :( don't bite me ! :)
another question, can you use fmpfetch to get images from a coppermin installation on another domain? Sorry if this has allready been answered, I did search, I promise, please point me to the post
Thanks
Dill
Hi all,
Not sure if this is a coppermine question of CMPFetch question. I want to display the top rated pictures down the side of my page in the coppermine gallary, which I have been able to do. The problem or question is how do I prevent these images showing unless the user is logged in. I currently require users to be logged in before they can view any images.
Thanks in advance
Dill
another question, can you use fmpfetch to get images from a coppermin installation on another domain? Sorry if this has allready been answered, I did search, I promise, please point me to the post
Thanks
Dill
2) Make it so that it prefixes it with document.write("Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
3) Make it postfix it with ")
4) On the other site, enter in something like
<script language="JavaScript"
src="http://www.yourdomainname.com/phpfile.php">
</script>
In theory it should generate the html and then send it to your other web site. In theory.
<?php
include('http://mysite.tld/testpage.php');
?>
2) Make it so that it prefixes it with document.write("Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:
3) Make it postfix it with ")
4) On the other site, enter in something like
<script language="JavaScript"
src="http://www.yourdomainname.com/phpfile.php">
</script>
In theory it should generate the html and then send it to your other web site. In theory.Code: [Select]<?php
include('http://mysite.tld/testpage.php');
?>
Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:Code: [Select]<?php
include('http://mysite.tld/testpage.php');
?>
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?
Why use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:Code: [Select]<?php
include('http://mysite.tld/testpage.php');
?>
Ok Not sure if I understand, so this is what I tried.
I created a file called cmp.php in the root of the site that I want to get the images from (file contents):
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
#$objCpm->cpm_viewRandomMedia(5,1);
#$objCpm->cpm_viewMostVotedMedia(1,1);
#$objCpm->cpm_viewRandomMostVotedMediaFrom("",5,1);
#$objCpm->cpm_viewTopRatedMediaFrom("",5,1,array("alttag" => "filename: %f, voted %V of 5 (%v votes)"));
$styleguide = array(
"linkstyle" => "topratedlink",
"alttag" => "voted: %V",
"subtitle" => "voted: %V",
"imagestyle" => "topratedimg",
"tdstyle" => "admin_menu",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('print');
$data = $objCpm->cpm_viewTopRatedMediaFrom ("", 5, 1, $styleguide);
$objCpm->cpm_close();
?>
I then use a php include include('http://www.mystaffie.com/cmp.php'); on the site that I want to display the images. It is getting the correct images but looking on the wrong domain. I have left everything as is so if you would like to have a look at what I mean:
http://www.mystaffie.com - the site I want to pull the images from
http://www.hamsterpants.com - the site I would ike to display the images on
Thanks agan for your help.
Dill
Your doing great...
I am on holiday, so I don't have it in front of me, but look at the docs on my web site... in the functions section there is a function named cpm_overideUrlToCoppermine or something like that.
Call that one right after the new with the FULL url to coppermine
http://www.sitename.com/photos or something like that.
Should fix what ails youWhy use buggy JavaScript instead of actually pulling the content using php's include? The only thing you'll need is: your webhost on the server you're pulling from must allow url_fopen. Just try it, create a test file with this code:Code: [Select]<?php
include('http://mysite.tld/testpage.php');
?>
Ok Not sure if I understand, so this is what I tried.
I created a file called cmp.php in the root of the site that I want to get the images from (file contents):
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
#$objCpm->cpm_viewRandomMedia(5,1);
#$objCpm->cpm_viewMostVotedMedia(1,1);
#$objCpm->cpm_viewRandomMostVotedMediaFrom("",5,1);
#$objCpm->cpm_viewTopRatedMediaFrom("",5,1,array("alttag" => "filename: %f, voted %V of 5 (%v votes)"));
$styleguide = array(
"linkstyle" => "topratedlink",
"alttag" => "voted: %V",
"subtitle" => "voted: %V",
"imagestyle" => "topratedimg",
"tdstyle" => "admin_menu",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('print');
$data = $objCpm->cpm_viewTopRatedMediaFrom ("", 5, 1, $styleguide);
$objCpm->cpm_close();
?>
I then use a php include include('http://www.mystaffie.com/cmp.php'); on the site that I want to display the images. It is getting the correct images but looking on the wrong domain. I have left everything as is so if you would like to have a look at what I mean:
http://www.mystaffie.com - the site I want to pull the images from
http://www.hamsterpants.com - the site I would ike to display the images on
Thanks agan for your help.
Dill
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
$objCpm->cpm_OverrideUrlToCoppermine("http://www.mystaffie.com/photoalbum");
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("http://www.mystaffie.com/photoalbum");
$objCpm->cpm_OverrideUrlToCoppermine($newpath_);
... snip...
?>
I think you mean this...Code: [Select]
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photoalbum");
$objCpm->cpm_OverrideUrlToCoppermine("http://www.mystaffie.com/photoalbum");
Keep the other lines that come after this part... just change the above to these settings
Hope that helps
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("http://www.mystaffie.com/photoalbum");
$objCpm->cpm_OverrideUrlToCoppermine($newpath_);
... snip...
?>
Arr man I could just jump for joy, I was really excited when I saw your reply and tried it out right away, althou it didn't work fisrt time, had a quick look and noticed a "/" missing
hi guys! :) im totally new with php and i need all the help i can get
how come this code:
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,5);
$objCpm->cpm_close();?>
totally works great when my .php file is in the cpmfetch directory
and it doesnt work at all when i tried it in my http://www.site.com/index.php ?
and really need a big help with this one i cant figure it out i tried reading the .doc but nothing seems to work
can anyone show me what code to place when i want my pictures when click opens in a new browser?
hope you can help me owt :)
IIS is notorious for not populating all required server vars, which appears to be the case for your setup (no DOCUMENT_ROOT and no SCRIPT_FILENAME). Use phpinfo() to find out what server var holds the information that is needed. Have I ranted in this thread already that self-hosting is not recommended, especially on a non-server-OS ;)?
Not in this thread, but I agree with you 100%.
One person I know fixed this by adding the DOCUMENT_ROOT into the coppermine gallery config file so it was set when cpmfetch imported it.
That aside, everytime I think I found a constant variable I can use in IIS, the next person has it completely different.
I hate IIS. Thats just my opinion, but a desktop O/S trying to be a server is just a bad idea.
Ok I give in, I have changed remote host to site5.com (unix/apache/php4/mysql4) I have also installed wampserver on my local machine. Now to see if it all comes together!
QuoteOk I give in, I have changed remote host to site5.com (unix/apache/php4/mysql4) I have also installed wampserver on my local machine. Now to see if it all comes together!
I have installed cpmfetch 1.4 and 1.5 just renaming the 1.4 dir to cpmfetch_14. Made the same change to cftest.php in both versions. I now have Pass on all required lines in both versions and with 1.4 I see the thumbnails (it works). With 1.5 I see no thumbs and get this error.
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in c:\wamp\www\kuckoo_couk\cpmfetch\cpmfetch_dao.php on line 686
Frank
ps: I did not realise how good the program is, clicking the thumbnails and being taken to the intermediate picture in coppermine is excellent.
Make sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php
If that is not it, what version of cpg are you using?
QuoteMake sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php
If that is not it, what version of cpg are you using?
I have cpmfetch 1.5.3 and Coppermine 1.4.1 Beta. also Apache 1.3.33
- MySQL 4.1.10a and PHP4.3.11
Hope this helps you - to help me.
Thanks
Frank
sorry for my newbie post..
i tried the php code in http://www.mysite.com/gallery/cpmfetch/randomimages.php
and it works great!
but when i tried it in my index page:
this is what i got when i posted the php code in the http://www.mysite.com/index.php
Warning: main(./cpmfetch.php): failed to open stream: No such file or directory in /home/nbeltran/public_html/index3.php on line 192
Warning: main(./cpmfetch.php): failed to open stream: No such file or directory in /home/nbeltran/public_html/index3.php on line 192
Warning: main(): Failed opening './cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nbeltran/public_html/index3.php on line 192
Fatal error: Cannot instantiate non-existent class: cpm in /home/nbeltran/public_html/index3.php on line 193
QuoteMake sure you have version 1.5.3 from the web site... I think there was a problem with this in one of the earlier 1.5.x series
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php
If that is not it, what version of cpg are you using?
I have cpmfetch 1.5.3 and Coppermine 1.4.1 Beta. also Apache 1.3.33
- MySQL 4.1.10a and PHP4.3.11
Hope this helps you - to help me.
Thanks
Frank
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
Frank,
The only other caveat is that you should be careful with subtitles and avoid any thing that looks like it would display:
user_website
user_location
user_interests
user_occupation
As these are handled differently under 1.4.1
THIS APPLIES TO CpmFetch 1.5.x Only. I will fix this at some point soon (as I am moving to the beta) and will post a new version.
Hope this at least gets you working... I'd be very interested to hear of any other issues you may encounter under the beta
Thanks!
Vuud
QuoteFrank,
The only other caveat is that you should be careful with subtitles and avoid any thing that looks like it would display:
user_website
user_location
user_interests
user_occupation
As these are handled differently under 1.4.1
THIS APPLIES TO CpmFetch 1.5.x Only. I will fix this at some point soon (as I am moving to the beta) and will post a new version.
Hope this at least gets you working... I'd be very interested to hear of any other issues you may encounter under the beta
Thanks!
Vuud
cftest.php now works ok in cpmfetch 1.5.3 I can see and activate the thumbnails.
Now I will be a bit more adventurous and include some code in my site, if anything shows up I will post here.
I have registered with your mail service so I should get notified when you update.
Sorry to keep you up, have a nice Sunday. It's 12:53 pm here, maybe your still asleep. :)
Frank
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5 You set your partial URL to /coppermine PASS
My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG
It's a little bit complicated because I am using Mambo. I need first to integrate coppermine with mambo and after i need to use a module to integrate the php code. That's why I need to know that cpmfetch do exactly what I want. But if you tell me that I can integrate an album in a page with cpmfetch, I will try. ;)
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5 You set your partial URL to /coppermine PASS
My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG
Edit the top of the cpmtest file and look for the line that says to change it to your directory.
Change it to /fotoalbums
The instructions are also online at: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch04s02.html
If you are interested in that sort of thing
;)
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
...........
Tests:
5 You set your partial URL to /coppermine PASS
My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG
Edit the top of the cpmtest file and look for the line that says to change it to your directory.
Change it to /fotoalbums
The instructions are also online at: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch04s02.html
If you are interested in that sort of thing
;)
when i change the cftest file that way and then after running it
(http://www.knobben.net/cpmfetch/cftest.php)
i see
----
80 CPG Config file not found: /home/knobben/public_html/fotoalbums/include/config.inc.php FAIL
----
my cpg installation is in /home/knobben/public_html/coppermine
and my pictures are stored in /home/knobben/public_html/fotoalbums
do I need to move the pictures to /home/knobben/public_html/coppermine/fotoalbums to get cpmfetch working?
or do i have other options?
Nice work on the Fetch scripts
How can I select a precise image from an album. I have an album of 180 pics from my latest trip - I have a 5 page journal that I want to pull in 5-10 photos on each page that correspond to the journal info. I could do this manually but I would rather use yoru script.
How can I disable the tables. I would like just the image and link to be returned.
cpm_viewMediaByPid at
You would have to code a bit of php on your end, but you can use cpmfetch to get the filename and the link and put it together.
Here are some examples of extending it...
http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php
AH!Quotecpm_viewMediaByPid at
I had tried that earlier today and it didn't seem to work. User error I guess because it just worked fine! Thanks!QuoteYou would have to code a bit of php on your end, but you can use cpmfetch to get the filename and the link and put it together.
Here are some examples of extending it...
http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php
Hmm - Don't know enough PHP to do this. I checked out the link but did not see anything directly applicable to my question.
I appreciate your help.
Thanks,
Tobias
Alright... what do you want to do? Just make that one image that you get by PID show up without using a table?
QuoteAlright... what do you want to do? Just make that one image that you get by PID show up without using a table?
Yes. And a followup question using the array info I would like this to open in a new browser? That looks possible correct?
Thanks Again
Yeah its easy enough. Is there a reason why you can't just have the table stuck in? You can set whatever alignment tags you want on it... Just wondering before I code.
$options = array( 'alttag' => '%t || %S KB' , "tablestyle" => "cssfortables", imagelink => "large", windowtarget => "_blank" );
$objCpm->cpm_viewMediaByPid(2173,$options);
PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux server1.serverspace.info 2.4.27 #2 Thu Nov 25 11:59:27 CET 2004 i686 INFO
40 WebServer = Apache/1.3.29 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29 INFO
45 PHP Version = 4.4.0-0.dotdeb.0 INFO
55 DOCUMENT_ROOT: /home/harrydbx/www.myforum.com INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/harrydbx/www.myforum.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
But i dont see any thumbnails. I dont get a error message...Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
If you do not see thumbnails, or get more warnings then something is pretty wrong. As long as you are using standard prefixes in Coppermine, you should see everything. If you are not using standard prefixes, then you need to adjust them by editing the first three variables in the cpmfetch.php file.
If everything looks good, and you get everything else working, I'd recomment removing this file, or making it non-executable. No need to allow access into a phpinfo tag if you dont have to.
For further help and in general more information, please see the help pages for CoppermineFetch.
How do I get cpmfetch to show the actual title of the photo, rather than the filename upon mouseover?
Thanks.
Hi,
i also cant get this script working. Calling cftest.php i get:Code: [Select]PASS
But i dont see any thumbnails. I dont get a error message...
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux server1.serverspace.info 2.4.27 #2 Thu Nov 25 11:59:27 CET 2004 i686 INFO
40 WebServer = Apache/1.3.29 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29 INFO
45 PHP Version = 4.4.0-0.dotdeb.0 INFO
55 DOCUMENT_ROOT: /home/harrydbx/www.myforum.com INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/harrydbx/www.myforum.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
All i see is:Code: [Select]Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
If you do not see thumbnails, or get more warnings then something is pretty wrong. As long as you are using standard prefixes in Coppermine, you should see everything. If you are not using standard prefixes, then you need to adjust them by editing the first three variables in the cpmfetch.php file.
If everything looks good, and you get everything else working, I'd recomment removing this file, or making it non-executable. No need to allow access into a phpinfo tag if you dont have to.
For further help and in general more information, please see the help pages for CoppermineFetch.
Any hints what could be wrong here ?
Thanks
Stefan
It would be nice to have a thread where sites using CpmFetch could show their ideas.
Not having much artistic flair myself I would like to evaluate the talent of others
and maybe appropriate some for myself. ::)
Frank
The available placeholders are here and the settings you need
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html
I think you are looking for the ALTTAG setting, since thats what most browsers key in on
The available placeholders are here and the settings you need
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html
I think you are looking for the ALTTAG setting, since thats what most browsers key in on
Ok, thanks, but where do I use this information. What file do I edit? Where is the string that I change?
Thanks.
Raeba
The available placeholders are here and the settings you need
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html
I think you are looking for the ALTTAG setting, since thats what most browsers key in on
Ok, thanks, but where do I use this information. What file do I edit? Where is the string that I change?
Thanks.
Raeba
I took the time to write it once... I am not going to retype it :P
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html
There is a link on the bottom for "home" that brings you to the start of the documentation.
Also, on the web site in the docs section there is a link to examples.
http://cpmfetch.fistfullofcode.com
I suggest a quick once over the docs, will probably answer many of your questions
Why bother writing anything then? Or, what good is the forum if I am just told to go read the docs? It take less bandwidth and time to just say 'crack open this particular file' and 'edit this or that.'
Anyway, don't bother replying... It's a waste of time and resources.
UPDATE: I asked someone else, and she told me point blank and I did it in 30 seconds.
Or, what good is the forum if I am just told to go read the docs? It take less bandwidth and time to just say 'crack open this particular file' and 'edit this or that.'
Vuud an idea (but very hard to realize maybe for you :))
Instead of replying of newbies like me (we are a lot of to not understand some things :)) ... why don't you create a mini-admin with all options CPmFetch is able to do, and you only copy/paste the code ?
I know, it seems to be impossible, because there are too many options ... but ... whynot ?
It would be nice for anyone using CpmFetch to list their site for others to see the way it is being used, my test site using cpg1.4.1 is at http://kuckoo.co.uk I have just started using it on the Home page for a random picture. Please note the photo's are not the best example of my work and are just for test purposes. I intend to change all the static pictures to use CpmFetch.
By the way vuud, we really do appreciate your help.
Frank
Vuud an idea (but very hard to realize maybe for you :))
Instead of replying of newbies like me (we are a lot of to not understand some things :)) ... why don't you create a mini-admin with all options CPmFetch is able to do, and you only copy/paste the code ?
I know, it seems to be impossible, because there are too many options ... but ... whynot ?
Hey Radinou,
I am not sure I understand what you are asking... Have you seen the example page off the doc's part of the web site?
http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php
Yes, its formatted terribly, and "prettying" it up is on my list of things to do... but its a long list.
Take a look there... its examples, with the code to make them happen. Basically, its the pages I test new functions on - so most of the time its working. Some also do not have code - but if you see one that interests you, let me know and I will go back and make the code more visable.
If this is not what you are thinking, please let me know... and we'll figure it out
Thanks!
It's the idea of my question :)
I see now how it works ... but another question : you display only images ?
Or ... your plugin has interesting features to explore (I think)
So ... is it possible to turn in "text" mode ?"
For example ... I want xxxxx last albums from album X ... but I want to have a simply list
<ul>
<li>album 1</li>
<li>album 2</li> ...
</ul>
And do you plan to realize tableless version of your calling pics ?
Hi,
i also cant get this script working. Calling cftest.php i get:Code: [Select]PASS
But i dont see any thumbnails. I dont get a error message...
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux server1.serverspace.info 2.4.27 #2 Thu Nov 25 11:59:27 CET 2004 i686 INFO
40 WebServer = Apache/1.3.29 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0 mod_ssl/2.8.16 OpenSSL/0.9.7c mod_perl/1.29 INFO
45 PHP Version = 4.4.0-0.dotdeb.0 INFO
55 DOCUMENT_ROOT: /home/harrydbx/www.myforum.com INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/harrydbx/www.myforum.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
All i see is:Code: [Select]Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
If you do not see thumbnails, or get more warnings then something is pretty wrong. As long as you are using standard prefixes in Coppermine, you should see everything. If you are not using standard prefixes, then you need to adjust them by editing the first three variables in the cpmfetch.php file.
If everything looks good, and you get everything else working, I'd recomment removing this file, or making it non-executable. No need to allow access into a phpinfo tag if you dont have to.
For further help and in general more information, please see the help pages for CoppermineFetch.
Any hints what could be wrong here ?
Thanks
Stefan
I'm trying to get cpmfetch working but don't seem to get to view the thumbnails when trying cftest
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_117-1783_STG.JPG
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_120-2031_IMG.JPG
..........
My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG
Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_117-1783_STG.JPG
Error in getImageTouse: Extension (strtolower): .jpg File:/home/knobben/public_html/coppermine//albums/miami2003/thumb_120-2031_IMG.JPG
..........
My pictures are in another directory and
the path should be something like File:/home/knobben/public_html/fotoalbums/miami2003/thumb_120-2031_IMG.JPG
It's the idea of my question :)
I see now how it works ... but another question : you display only images ?
Or ... your plugin has interesting features to explore (I think)
So ... is it possible to turn in "text" mode ?"
For example ... I want xxxxx last albums from album X ... but I want to have a simply list
<ul>
<li>album 1</li>
<li>album 2</li> ...
</ul>
And do you plan to realize tableless version of your calling pics ?
Check out Section 4 of the examples pages... there is something in there close to what your asking for. In combination with the new tags for imageless displays
Docs: http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html
See: the noimage entry in there...
That may do it. To be honest I have not tried combining those... the program has evolved so much that its gotten beyond one function does one thing - its all interrelated inside, so it may just work. Let me know if that works for you.
I am planning on more category and album sorts of listings... Its one of those things.
I have long term plans to provide tableless versions of the pics... but since I don't have much experience with tableless right now, I am deferring it for a bit. If anyone is really good with tableless and wants to work with me on that let me know. I assume you mean CSS layouts right? Anyway, that would have to be in a bit... things are busy here and the 1.4.1 support is more important right now.
Take care, let me know how it all works out
Hello,
I have attempted to install the cpmfetch but I don not get the thumbnails. Here is the report on the test page. Any advice?
help pages for CoppermineFetch."; } function OutputTestRow ($number,$text,$status) { print "$number$text"; switch ($status) { case ("PASS"): print ""; print $status; print ""; break; case ("INFO"): print ""; print $status; print ""; break; case ("BAD"): print ""; print $status; print ""; break; case ("FAIL"): print ""; print ""; print $status; print ""; break; default: print $status; } print "\n"; } function testDisplay ($PartialUrlToCPG) { include "./cpmfetch.php"; $objCpm = ""; $objCpm = new cpm($PartialUrlToCPG); $styleguide = array( //"TABLESTYLE" => "photoclip", //"rowstyle" => "photoclip", "cellstyle" => "photoclip", "linkstyle" => "photoclip", "alttag" => "One of the last photos submitted", "subtitle" => "%o
%V views", "imagestyle" => "photoclip", "imagesize" => 'thumb', "imagewidth" => '100'); print "
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
"; $objCpm->cpm_viewRandomMedia(2,3,$styleguide); print "
"; $objCpm->cpm_close(); print "
Dear vuud,
Link to my Coppermine Gallery:
http://statw.nl/fotos/index.php
Link to test script:
http://statw.nl/cpmfetch/cftest.php
Coppermine Version:
1.3.3
Cpmfetch Version:
1.6.1
I've been hassling with this problem for about two or three hours now, installed it on another domain (same hosting company though) and still no result.
ltns...
I second reyn's request re: a collection of sites... I'm not that creative myself and would like to steal, er, borrow, ahem, other people's ideas.
How are you getting on with the docs? Still need any help?
Hi,
i also cant get this script working. Calling cftest.php i get:
I have exactly the same problem as Stefan, and I wondered if it was somehow due to the fact I'm bridging to phpbb..?
Anyway, when you say "Update the picture table to refer to user_id #1", I guess you mean changing the cpg133_pictures table, but won't any new images added to Coppermine still have the wrong value in owner_id ..?
(sorry for sticking my oar in, just trying to get this to work myself, and just grateful someone else has the same problem!)
hey, if you look at my cpmfetch usage there is a blue outline on my image! How do I get rid of this outline.
I use the code in two different spots and one has the outline, the other doesn't!
page with outline http://www.egriz.com/GrizBoard/
page without outline http://www.egriz.com
I am using the exact same code on both pages. Any ideas on how to get rid of the blue outline?
Thanks
ok, I created a test forum http://www.egriz.com/gbtest/
It is the exact same code as my main page linked here http://www.egriz.com/
The blue border color is created by my internet explorer browser (I can change the color of the border by going to TOOL > INTERNET OPTIONS > COLORS)
Do you have any idea why this may be happening?
that worked,
That is what I was originally trying but I didn't realize that I needed to define it for image, iw as defining it for links.
Thanks a bunch!
Cannot instantiate non-existent class: cpmfetch- after the require one is run. Know require is run - as no error on object not found.
It would be nice if two things were done to this:
1. All the command typos that make it not work - so that you have to figurre out what is wrong
2. Actually make it so a person can use it without having to be a php programmer. Not real handy for most. If people were programmers - they probably would not be using Coppermine.
Coppermine is made for the average user - this is far from it.
The instructions leave much to be desired. I cannot find anyone who has tried it that actually got it to work without spending hours figuring out all the errors. (Check webhosting forums.) Even the startup command do not work. An error right there.QuoteCannot instantiate non-existent class: cpmfetch- after the require one is run. Know require is run - as no error on object not found.
Nice to have something - but it should really be able to work for most, not a select group of programmers. Sample setup, running install, maybe even installation instructions on how to make work.
I appreciate the effort it took to write this, just a shame few can figure out how to actualy make it work because of the way it was written.
hi, i have got the cpmfetch working fine, but was hoping if anyone knew how to get it so that it shows who the photo was submitted by underneath the pic e.g
\\\\\\\\image/////////
posted by mambocube
thanks :)
I would like to have this (right bottom) ... but
1. it's a tableless system
2. I would like infos appears by dhtml popup.
I have seen your "core" code ... it's a hell for me. I have suggested you (without answer) to help you to transform your excellent plugin in tableless system ...
5 You set your partial URL to /html/modules/Gallery PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux dd10120 2.4.21-273-athlon #1 Mon Jan 17 13:03:46 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 PHP/4.3.11 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /www/htdocs/v161957/ INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/v161957/html/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
Trying to display some images:
Not in Coppermine...
5 You set your partial URL to /html/modules/Gallery PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux dd10120 2.4.21-273-athlon #1 Mon Jan 17 13:03:46 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 PHP/4.3.11 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /www/htdocs/v161957/ INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/v161957/html/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
I would like to have this (right bottom) ... but
1. it's a tableless system
2. I would like infos appears by dhtml popup.
I have seen your "core" code ... it's a hell for me. I have suggested you (without answer) to help you to transform your excellent plugin in tableless system ...
Sorry the code is a hell for you... Programming can be a bit daunting for newcomers when they first look at it. Its probably the whole thing on how it generates the code, its so elegant... I just love that part.
Anyway, I am pretty sure I did respond. But in brief:
* I am NOT going to transform to tableless... Few people care about it at this point in HTML/CSS's evolution. I will make an option to generate tableless, but that has to wait until I have time and can abstract out the generation code so I can provide a generic interface for me to code to.
* Please be more specific as for what help you are offering... If you are writing code to do this, just want to make feature requests, etc, etc.
I do think it would be a nice to have, but not particularly needed at this point. I understand that because you need it for something that you do feel its much more urgent - but not all that much is moving to DHTML IMO. I run a web development company and we have 0 requests for this sort of thing - and we also tend to not suggest it as HTML is very well supported across browsers, but CSS layouts are not as proven.
So I have a list, somewhere on that list is abstracting the output code... that will make Tableless more attractive.
Regardless, I would suggest if you really need it now to simply extend CPMFetch and write your own code. You will not have to deal with my code "Hell" since you only use the ones you need.
Here are some short examples
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php
Hopefully that can get you where you want to be
Keep me posted, and I think there is a forum here for extending cpmfetch - if you decided to go that route, post there to keep this all organized
I'm really not ok with you ... it has been proven CSS / XHTML was THE solution for web interfaces.
Show to your clients http://www.csszengarden.com and show them they can change interface as simple as a clic ... they WANT this. Csszengarden proves tables are prehistoric.
So OK, I'll go inside your code to erase table / tr / td ... it's incredible to see in 2005 tables are better CSS ... waouh. If all people thought like that, we'll all run with Lynx or Mosaic today.
Live example http://www.sortons.net/dev/nol33t/testgalerie.htm
With CSS, you can even change the "thumb" without using php (the thumbs have normal width / height, but seem to be cropped). Look at the code : say me it's not better than tables ...
And you can CONTROL ALL your layout with the ID ... we don't live in the same planet :) sorry :)
Indeed, you can erase all parameters like "cols" or "rows" ... making your script simplier.
Consider my post not a personal attack, but I see the "old" coders don't like evolution. But xhtml is the better evolution since 1998. (and the dead of NS 4, of course).
@vuud: this is just another "DHTML/tableless is superior" rant posted by Rod several times already. You're welcome to try to argue, but this thread might then turn into a flamewar. Seen it before. Suggestion: ignore.
5 You set your partial URL to /site/new/scripts/cm PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux ***.***.*** 2.4.27-2-686 #1 Mon May 16 17:03:22 JST 2005 i686 INFO
40 WebServer = Apache/1.3.33 Ben-SSL/1.55 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/www INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/user/public_html/site/new/scripts/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /var/www/site/new/scripts/cm/include/config.inc.php
Ok, I have another question! I have the cpmfetch working just fine in all my pages and in my phpbb forums!
phpbb example
http://www.egriz.com/GrizBoard/
main site examples
http://www.egriz.com/
Now what I want to do is get this code working in the header of my coppermine gallery
http://www.egriz.com/GrizPics2/index.php
I read throuhg some info on how to make a custom header but didn't really understand how to go about doing it for this. I want to keep it the same look as it is now but instead of using the image tag to grab the photo I want to use the cpmfetch.php file to do it so it links to the photo
thanks for your help!!!!
Sorry to bother you with such a basic problem as the path to the config-file. I searched this thread and the docs but didn't find anything on this yet. Tried all the possible paths but no... :-[
Somehow the Document_Root is not correct, the script puts var/www in front of the Partial path to CPG I put in cftest.php.
The result is like this:Code: [Select]5 You set your partial URL to /site/new/scripts/cm PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux ***.***.*** 2.4.27-2-686 #1 Mon May 16 17:03:22 JST 2005 i686 INFO
40 WebServer = Apache/1.3.33 Ben-SSL/1.55 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/www INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/user/public_html/site/new/scripts/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /var/www/site/new/scripts/cm/include/config.inc.php
The config file is in /home/user/site/ etc. /var/www/ is not the root for my site. What's going wrong? php(info) gives for the root 'no value' ???
/var/www is used for phpmyadmin, MRTG server statistics and for the main website of the server or so. All the users ar in /home/user and so is my gallery.
I am hosted, by a friend that is.. and tried to use cpmfetch even though I got an error but didn't work. But why is the script adding /var/www?
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/user/public_html/site/new/scripts/cm/cpmfetch/cpmfetch_dao.php on line 710
OK, your suggestion to put
$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";
in the top of cftest.php didn't work, no effect on the path whatsoever.
But my host used a symlink() to make /var/www/ point to /home/ as well so /var/www/user is the same as /home/user/public_html and that works great although it's in fact a workaround.
According to him the setup of the server is rather standard this way (working with virtual hosts for all users)
But maybe a suggestion: why not let us fill in the whole path, not just a partial path? Or has this to do with compatibility with IIS or some hosts restricting access or so?
Only thing is: I get a My_SQL error :( :
Your installation seems correct so far, you should see a small grid of thumbnails from your galleryCode: [Select]Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/user/public_html/site/new/scripts/cm/cpmfetch/cpmfetch_dao.php on line 710
If you do not see thumbnails, or get more warnings then something is pretty wrong :(
I am running the 1.4.1 beta version of cpg, does that have any impact?
does this work with e107... i find that a lot of mods and hacks work with e107 even though it's been ported into the system since it basically is coppermine with a few sligh modifications which don't effect how e107 runs as a whole.. chances are i'm going to test it either but it'd be nice if someone were able to let me know it works.
Yep, I posted a about a week ago about the 1.4.1 has a few database changes.
if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out. Switch which one is commented (instructions are in there also).
its a temporary fix till I get a better way to handle the new database layout.
As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before. Of course, that could just be dumb luck on my part :)
Yep, I posted a about a week ago about the 1.4.1 has a few database changes.
if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out. Switch which one is commented (instructions are in there also).
its a temporary fix till I get a better way to handle the new database layout.
As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before. Of course, that could just be dumb luck on my part :)
Now it works like a charm! Great job and thanks a lot!
5 You set your partial URL to / PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux dd5738 2.4.20-4GB-athlon #1 Fri Jan 14 15:04:28 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 mod_perl/1.27 PHP/4.3.10 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /www/htdocs/_removed_/ INFO *edited*
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/_removed_/cftest.php INFO *edited*
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
The e107 port goes unsupported, I guess CPMFetch was not designed to work with e107. We (the coppermine dev team) have no idea how e107 works, and I guess it's the same for vuud (please correct me if I'm wrong). The e107 port is just that: an unsupported port, where mods or hacks that have been made for standalone coppermine versions may work, but some certainly won't.
Trying to display some images:
Notice: Undefined variable: SERVER_NAME in /usr/home/shkola/gallery/include/config.inc.php on line 7
Please HELP!
In test everything seems allright, butCode: [Select]Trying to display some images:
Notice: Undefined variable: SERVER_NAME in /usr/home/shkola/gallery/include/config.inc.php on line 7
In source code there're no images, just <table><tr></tr></table>.
i could need some help.
Hi,
i could need some help.
After uploading all files i tried /cftest.php
Everything seems fine (PASS), except the thumbnail images are not displayed (although the links to the big photos work).
I noticed that the thumbnail links are corrupt:
example: http://albums/userpics/10051/thumb_wels_1.jpg
It should be http://www.mywebsite.com/albums/userpics/10051/thumb_wels_1.jpg
Perhaps it helps that i´m using a subdomain for the gallery like http://gallery.mywebsite.com
but mysqldb is here: http://www.mywebsite.com
Any help appreciated.
thank you
andreasCode: [Select]5 You set your partial URL to / PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux dd5738 2.4.20-4GB-athlon #1 Fri Jan 14 15:04:28 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 mod_perl/1.27 PHP/4.3.10 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /www/htdocs/_removed_/ INFO *edited*
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/_removed_/cftest.php INFO *edited*
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
Don't post a dummy placeholder URL, but actual links - makes trouble-shooting and support much easier.i could need some help.
No ideas? =:-/
<?php
// Coppermine configuration file
// Silly safe mode
define('SILLY_SAFE_MODE', 1);
$_SERVER["SERVER_NAME"] = "shkola.lv";
define("$SERVER_NAME","shkola.lv");
// MySQL configuration
$CONFIG['dbserver'] = '****'; // Your database server
$CONFIG['dbuser'] = '****'; // Your mysql username
$CONFIG['dbpass'] = '*****'; // Your mysql password
$CONFIG['dbname'] = '****'; // Your mysql database name
// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] = 'cpg132_';
?>
define("$SERVER_NAME","shkola.lv");
Notice: Undefined variable: SERVER_NAME in /usr/home/shkola/gallery/include/config.inc.php on line 7
dissappeared, but i can't see the thumbnails.OK, guys...
I couldn't wait for so long. Now everything works fine, 'cause I use version 1.4.1 now, but probably there are some bugs in the latest version. You should test it much more, before publishing
i could need some help.
No ideas? =:-/
i tried getting cpm fetch to work with e107 but the images don't display... all the tests pass but the calls don't work.. unfortunately i don't know enough php to modify it enough to work but just a heads up i guess
?php
require_once "../cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/gallery");
?>
$objCpm = new cpm("/gallery");
as it is in cftest?I have installed and ran cftest and it runs fine. But placing your simple open code:Code: [Select]?php
require_once "../cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/gallery");
?>
in the cpmfetch directory with the gallery called gallery (file only has this in it) - all i get is:
Fatal error: Cannot instantiate non-existent class: cpmfetch in /home/real_username_dir/public_html/cpmfetch/index.php on line 3
So what do I have wrong. Per your instructions, I have the correct path, but ...
Should it beCode: [Select]$objCpm = new cpm("/gallery");
as it is in cftest?
Any ideas to help me with my problem?
thanks
i dont know if this is the right place but ive been looking around for the right place and i coudlent start a topic..., so sorry if its wrong :(,
help please
i would like to set up cpmfetch on my art page, put i want it to show the images at there full size and still randomly how on earth would i do this???, if you could help i would love this :D
No Problem ;D
is there a way just 2 convert the calls of the images from the fetch to <img src=""> and then it would display them in full size :D
i mean is it posiable to have cpfetch return the codeing as img src="" so it is exactly as if u where opening it at 100% instead of like 20, 30% where they are some what distorted
$options = array( 'subtitle' => '%t' , 'imagesize => "large"' );
$objCpm->cpm_viewRandomMedia(6,3,$options);
whats wrong with this it = no works :/
I just downloaded this and it should work, but it doesn't.
* Include what version of coppermine you are using 1.3.2
* a link to your website and gallery http://haylieonline.com/pictures
* a link to an example of the problem (if possible) http://haylieonline.com/cpmfetch/cftest.php no thumbnails are shown
* how computer savvy you are (newbie, intermediate, damn good) probably above intermediate
* what kind of web server you are running on (if known) Apache 1.x
* Include the syntax of the command you are using. n/a, just the test script
Everything passes, I set the cpg path to /pictures. There's a pictures subdomain but /pictures is the same place. I'm pretty sure all the settings are default; I checked the prefixes and they are.
It does open and close a table tag but there aren't img tags, etc.
Yes, my host is slow, sorry ;) thanks in advance
Edit: Right after I posted I remembered our CPG uses the SMF bridge... I assume that wouldn't have anything to do with it...
probably due to there not being any users in the coppermine users table. How many smf users? You van try creating them in coppermine... same problem we had with the phpbb bridge. lemme know ifd you need help on that.There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
probably due to there not being any users in the coppermine users table. How many smf users? You van try creating them in coppermine... same problem we had with the phpbb bridge. lemme know ifd you need help on that.There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.
What's the cpm command for showing the textual-link to the last 10 files added.
probably due to there not being any users in the coppermine users table. How many smf users? You van try creating them in coppermine... same problem we had with the phpbb bridge. lemme know ifd you need help on that.There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.
Woof... Let me mull that over... 100 users. Not sure if its easier to just recode the query or code up something to move user information :)
Are they in the same database?
probably due to there not being any users in the coppermine users table. How many smf users? You van try creating them in coppermine... same problem we had with the phpbb bridge. lemme know ifd you need help on that.There are about 100 SMF users and 1 CPG user. Do I need to create 100 users in Coppermien? I tried adding a row in CPG's user db but had no effect... so I don't really know what I'm doing ;).
Thanks for the help.
Woof... Let me mull that over... 100 users. Not sure if its easier to just recode the query or code up something to move user information :)
Are they in the same database?
Yes, same database. We can delete most of them (assuming that wouldn't cause bad things with SMF), but what about when more sign up? Will cpmfetch quit working?
Please
can anyone help me???
I only want to show the Last Updated Albums on my website!
First of all, I want to thank vuud for cpmfetch. Ok now I will continue with my post ;)
I downloaded copperminefetch-1.6.2 fisrts and I followed the instructions. I opened cftest.php and everything passed the only weird thing was that the thumbnails were not showing. I tried the version before, copperminefetch-1.6.1, I looked everywhere for a solution and after two hours I found out what was the problem thanks to some posts in this thread.
I'm using Coppermine bridged with phpBB, and the only user that posts pictures is me :). My users send me the pictures and I put them in the Gallery. The solution, as Vuud suggested before, was to add my username as used in phpBB to the coppemine users table. After doing that it worked :o, well kind of. The thumbnails dind't show, but the captions with the links to the thumbnails were there and some errors related to the fetching of some more. After Upgrading back to copperminefetch-1.6.2 it worked fine and the Thumbnails showed. So far it works I still have to use the functions.
Hi Vuud, I fixed my problem that I had before, but now I have a new one:
I searched for this and looked in the docs and didn't see anything, so anyways...
Some of my users uploaded pictures that weren't .jpg but instead .jpe and cpmfetch wont display the images. They display the filename or something. Is there a way to get cpmfetch to display them, I tried looking through the code but wasn't sure about it and didn't want to mess it up.
thanks,
RCS
Any ideas to help me with my problem?
thanks
Sorry, I have been building and installing a router for the past few days. I've been getting home at 2am, and getting up and heading back.
hi, i tried instaling cpmfetch on my site and i get this error
80 CPG Config file not found: /home2/polionli/public_html/cpmfetch/include/config.inc.php
what have i done wrong
Any ideas to help me with my problem?
thanks
Sorry, I have been building and installing a router for the past few days. I've been getting home at 2am, and getting up and heading back.
back home? ;-)
here is the link where cftest.php
is www.poli-online.net/cpmfetch/cftest.php
Hi there,
i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.
Here's the url:
http://mad-d-sign.com/cpmfetch/cftest.php
http://mad-d-sign.com/cpmfetch/cfimageget.php
My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?
regards
Nico
<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>
ok. now it works fine. however how do i add it in my site? and instead of having 3 pictures i want to have them going downwards.
i want to ad it on my site www.poli-online.net on the left menu where you see the 2 pictures right now. how do i do that is there some kind of code?
I hope this is the right thread,
On my site, I am displaying the two latest images. Is there a way I can seperate them to latest of each album (limiting it at two)?
If you want to show the last image from two different categories, you could just make two calls to cpmfetch (hint: don't recreate the object, just add a second call).
Of course I could be misunderstanding the problem
Read the quickstart
http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php
Then if you are especially giddy, the documentation (the how to use stuff)
If you want to show the last image from two different categories, you could just make two calls to cpmfetch (hint: don't recreate the object, just add a second call).
Of course I could be misunderstanding the problem
If I call it twice, i think it will simply display the last uploaded file twice.
How might I specify only to call one per album.
In other words, not two last uploaded files, but most recent file from latest two albums.
i think you are saying:
call one: display most recent photo from [album1]
call two: display most recent photo from [album2]
But instead of displaying most recent from album, I'm looking to display most recent from gallery (only allowing one per album)
Currently I am displaying the two most recent gallery wide.
Same thing, except somewhere in there might be a function:
"After insert recent photo 1, check recent photo 2.
If recent photo 2 is from same album, check recent photo 3, etc."
I havent actually tried what you are asking yet. It doesnt seem like its going to work, but if you want I'll just shut up and just try what it is that you're saying.
Right, but NOT from two different galleries, but two different albums.
The current latestupdate fetch works great. It displays the two latest photos.
I am only trying to modify it to not display two images from the same album.
Does that make sense?
I only have one gallery.
I have about four categories (with more to be added in the future)
Hi there,
i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.
Here's the url:
http://mad-d-sign.com/cpmfetch/cftest.php
http://mad-d-sign.com/cpmfetch/cfimageget.php
My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?
regards
Nico
<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>
Hi there,
i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.
Here's the url:
http://mad-d-sign.com/cpmfetch/cftest.php
http://mad-d-sign.com/cpmfetch/cfimageget.php
My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?
regards
Nico
<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>
I am having the same problem as this guy... Is it because my cpg is bridged with phpbb? That is the only "hack" I have used at all. How do I get around this, if there is a way??? Thanks..
Do you mean wait for a newer version of the SMF Bridge? I am not sure that I will be supporting all of the hacks that come out for coppermine photo gallery. I may change it so that it ignores user data completely, which would solve this problem.
Hmmm,
Ah nevermind... I thought we could get away with something, but not really. Too bad. A few solutions leap to mind... you can recode the cpm_dao sql to use the smf user tables, or just take out the references to anything in the user table in the sql at the top and then in all the different sql calls lower. The other solution is to write some sort of sql call that will take the smf users and copy the corresponding data into the cpg user tables.
Wish I could be more help on this, but I don't use the SMF bridge and I am having a tough time finding time to get ready for the 1.4 release of CPG never mind my personal wish list for CpmFetch
Good luck and let me know if you have any questions
5 You set your partial URL to /_md/mad-d-sign.com/gallery PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux powerbox.prohost.de 2.4.30 #13 SMP Tue Jul 19 03:33:01 CDT 2005 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.4.0 INFO
55 DOCUMENT_ROOT: /www/einsweb INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/einsweb/_md/mad-d-sign.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file
Ok, this worked, and after switching off the privacy mode by using $objCpm->cpm_unlock_private(true) i got a table on the test page. But now of couse the img and href url's are wrong because of the tweaked partial url.
I Guess a better solution would be to let the user define the absolute path to coppermine himself and maybe giving _SERVER["SCRIPT_FILENAME"] as hint?!
What do you think? I could imagine I'm not the only one who runs in this problem...
regards
Nico
I will try putting some people in my cpg table. Thanks!!! Oh yeah. When do you plan on making this compatible with the new version of coppermine?
great script!
How can i turn off so that it doesn't link to the pic?
Can you add a version number to the download... as in, which version of cpmfetch it is based on.
Thanks
Can you add a version number to the download... as in, which version of cpmfetch it is based on.
Thanks
Done... Please modify your post also to update the quoted link.
Another one: Is it possible to get rid of these <br /> tags when i want no subtitle at all?
The only solution i found, is to set return type to "html" and then replace the tags myself.
This would be nice for future versions because it makes the table cells higher than necessary.
Thank you again for your great work
regards
Nico
sleep my friend.
and let me know if there is anything i can do in return.
Read the quickstart
http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php
Then if you are especially giddy, the documentation (the how to use stuff)
ok i did what you said and put it here http://www.poli-online.net/cpmfetch/cpmfetch.php
however how do i include it in the code where i want it to be displayed. and if it can be like they have done it here http://www.poliaektimisoara.ro/forum/index.php so that instead of going acros it goes down, and displays the Latest image, then 3 of the last images in the last 3 albums
sleep my friend.
and let me know if there is anything i can do in return.
any luck?
thanks that helps alot. i owe you one.
Hello,
Is there a way to make this work on a Joomla (Mambo) site?
(Mambo anyway, no idea what a Joomia site is)Joomla is a fork of Mambo, see http://forum.coppermine-gallery.net/index.php?topic=22120.0 e.a.
I've been searching to display the date under the most recent pictures but havn't found anything.
Is it possible?
<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>
<?
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>
</td>
</tr>
<tr>
<td align="center" valign="middle"><?
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
?>
</td>
</tr>
Small note:Code: [Select]<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>
<?
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>
</td>
</tr>
<tr>
<td align="center" valign="middle"><?
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
?>
</td>
</tr>
I tried to add the optios array in it's own cell to prevent a long title from disrupting the layout of the images, but it wouldn't display.
Any suggestions either in TD, or CSS as to prevent long title images from disrupting layouts?
Thanks.
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
$objCpm->cpm_viewRandomMedia(1,2,$options);
The $options is not a command but a variable.$objCpm->cpm_viewRandomMedia(1,2,array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" ));
yeah i figured the options array had to be introduced before it was called.
the titles? see they're not neccessarily long, but if theyre longer (in width) than the picture, it pushes the picture up (disrupting my beautiful alignment).
i guess i could find a way to make the picture stay put in the tabe and any text under it to just extend the length of the table.
Sigh - there is just never enough time
I've tried EVERYTHING.
I'm pretty sure it's on fetch side.
Any ideas?
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="75%"><table width="100%" height="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" height="200" border="0" cellpadding="0" cellspacing="0" class="orangeborder">
<tr>
<td height="23" colspan="2" background="../images/STFHotNews_bg.gif"><img src="../images/pg.gif" width="114" height="23"></td>
<td width="284" height="23" background="../images/STFHotNews_bg.gif"><div align="right"><img src="../images/STFHotNews_r.gif" width="3" height="23"></div></td>
</tr>
<tr>
<td colspan="2" valign="top"><div align="center">
<p><strong>Random Photo
Generator! <br>
<a href="javascript:location.reload()" target="_self">Generate
Again</a></strong>
</p>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><div align="center">
<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>
</div></td>
</tr>
</table>
</div></td>
<td width="50%" valign="top"><div align="center">
<p><br>
<strong> <img src="../images/new.gif" width="19" height="9" border="0"> Most
Recent Pictures:<br>
</strong>
<?
$options = array( 'subtitle' => '%w', "tablestyle" => "lastaddedmedia" ); ?>
<? $objCpm->cpm_viewLastAddedMedia(1,2,$options);
$objCpm->cpm_close();
?>
</p>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
I hope you don't make me look like an idiot.
$options = array( 'subtitle' => '%h views<br>%t', "cellattributes"=>array("valign"=>"'top"));
$objCpm->cpm_viewRandomMedia(1,2,$options);
.lastaddedmedia {
font-family: Arial, Helvetica, sans-serif;
font-size: 5px;
font-style: italic;
color: #CCCCCC;
vertical-align: top;
}
Hmm. tried it but it looks the same. Can't tell anything is different.
.CSS for Random MediaCode: [Select].lastaddedmedia {
font-family: Arial, Helvetica, sans-serif;
font-size: 5px;
font-style: italic;
color: #CCCCCC;
vertical-align: top;
}
P.S. I'm not entirely sure if it is reading this CSS.
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><div align="center">
<table >
<tr>
<td valign="'top" ><a href="/gallery/displayimage.php?pos=-23" ><img src="/gallery//albums/userpics/10001/thumb_DSC03265.jpg" alt="DSC03265.jpg" title="DSC03265.jpg" /></a><br /><br />19 views<br></td><td valign="'top" ><a href="/gallery/displayimage.php?pos=-307" ><img src="/gallery//albums/userpics/10001/thumb_RSCN1855.JPG" alt="RSCN1855.JPG" title="RSCN1855.JPG" /></a><br /><br />22 views<br>True Mother with True Grandson</td>
</tr>
</table>
</div></td>
</tr>
</table>
Code: [Select]<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><div align="center">
<table >
<tr>
<td valign="'top" ><a href="/gallery/displayimage.php?pos=-23" ><img src="/gallery//albums/userpics/10001/thumb_DSC03265.jpg" alt="DSC03265.jpg" title="DSC03265.jpg" /></a><br /><br />19 views<br></td><td valign="'top" ><a href="/gallery/displayimage.php?pos=-307" ><img src="/gallery//albums/userpics/10001/thumb_RSCN1855.JPG" alt="RSCN1855.JPG" title="RSCN1855.JPG" /></a><br /><br />22 views<br>True Mother with True Grandson</td>
</tr>
</table>
</div></td>
</tr>
</table>
One of us has some bad code
<td valign="'top" >
Should be
<td valign="top" >
cellattributes => array ("valign" => "top");
cellattributes => array ("valign" => "top"));
... amazing.This seems to be the only place I can post, guess people can't post on the sub board ? Anyway I've just set this up on my site and everything has passed but I'm not getting the grid of images. I've checked the prefixes in Coppermine and they match what are in cpmfetch. Any ideas why this isn't work ? The ssi.php one works (sort of get a few errors) and I assume this must go sort of down the same route so I'm not sure why it won't work. The gallery is at www.newcastle-online.com/gallery and fetch is placed at the root has suggested www.newcastle-online.com/cpmfetch you can see I get no images at www.newcastle-online.com/cpmfetch/cftest.php
All help will be gratefully recieved. I did do a search for this query but couldn't find anything.
Thanks,
Phil
You set your partial URL to stl-web/bulletin/phpBB5/cpg135/ PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = FreeBSD st06.startlogic.com 4.9-RELEASE-p11 FreeBSD 4.9-RELEASE-p11 #0: Sat i386 INFO
40 WebServer = Apache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7c INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/ohfishin/public_html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/ohfishin/.panel/web/bulletin/phpBB5/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php FAIL
I have a 75 and an 80 and I dont know why. Could one of you veterans please fix me up? After reading 17 pages of this thread I have a feeling this may not be my last question...but its a start. thank you
I am yes, I'm bridged with SMF will it not work with this bridge ? I think we're using version 1.3.3 of the gallery. Looks like I need to perform an upgrade as well once I've done this :)
Cheers,
Phil
ARRGGGG!! this stuff is incredible ! I cant find the path to congif.init.php
Well I did an experiment , I made an empty folder, I put a COPY of the config in there and ran the test...it PASSED . However the thumbnails dont show up. I dont suppose it will work this way being that the cpg folder is at another path. I just wanted to try to find the config in an easy place. Moving the folders is not an option (I tried) as I have to many things depending on those paths like wordpress,phpbb,albums,galleys etc. I know this experiment probably seems pretty lame to you guys... but I feel like a rocket scientist ...only if the thumbs showed up :-(
<?php
include "cpmfetch.php";
$objCpm = new cpm("/members/gallery");
$objCpm->cpm_viewRandomMedia(2,3);
$objCpm->cpm_close();
?>
<html>
<head>
</head>
<body>
</body>
</html>
pyimaung: -
I've just installed and had this problem myself. After trawling through this thread I found the answer. Simply go into your phpMyAdmin and then the cpg132_users table. The into the user_id field. Insert a new row and create a user with a user_id of 2. Reload your cftest.php file and the images will appear. :)
Now that's sorted on to my own problems.
I've just setup a quick test page with the following code. It all works great but my images are coming up with blue borders due to them being links. I've searched the forum and found one other person with this problem but didn't really understand how it was resolved. As far as I can figure it's something to do with cascading style sheets...but I'm not really that up on them. Think it maybe down to a:link but can't get it to work or even figure out how to turn borders off using a:link. Any ideas or help for a css/php n00b?Code: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm("/members/gallery");
$objCpm->cpm_viewRandomMedia(2,3);
$objCpm->cpm_close();
?>
<html>
<head>
</head>
<body>
</body>
</html>
Thanks for any help or ideas.
Sy
Well I did an experiment , I made an empty folder, I put a COPY of the config in there and ran the test...it PASSED . However the thumbnails dont show up. I dont suppose it will work this way being that the cpg folder is at another path. I just wanted to try to find the config in an easy place. Moving the folders is not an option (I tried) as I have to many things depending on those paths like wordpress,phpbb,albums,galleys etc. I know this experiment probably seems pretty lame to you guys... but I feel like a rocket scientist ...only if the thumbs showed up :-(
pyimaung: -
I've just installed and had this problem myself. After trawling through this thread I found the answer. Simply go into your phpMyAdmin and then the cpg132_users table. The into the user_id field. Insert a new row and create a user with a user_id of 2. Reload your cftest.php file and the images will appear. :)
Now that's sorted on to my own problems.
I've just setup a quick test page with the following code. It all works great but my images are coming up with blue borders due to them being links. I've searched the forum and found one other person with this problem but didn't really understand how it was resolved. As far as I can figure it's something to do with cascading style sheets...but I'm not really that up on them. Think it maybe down to a:link but can't get it to work or even figure out how to turn borders off using a:link. Any ideas or help for a css/php n00b?Code: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm("/members/gallery");
$objCpm->cpm_viewRandomMedia(2,3);
$objCpm->cpm_close();
?>
<html>
<head>
</head>
<body>
</body>
</html>
Thanks for any help or ideas.
Sy
The solution for the missing users is fine... just be aware some subtitle information wont work... the stuff related to usernames and such. So your good 99% of the way with that.
As for your problem... check this page. There are two examples of doing nifty things with images and stuff in there. Maybe something helpful.
http://www.fistfullofcode.com/projects/copperminefetch/tips.php
Thanks SY..You're a genius..It's all working now.. Just one more question.. How do I make the gallery pop up in a pop up window without the address bar.. If it cannot be done then how do I unlink the fetched photos to the gallery. Can anyone help?? Thanks!!
imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"
imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.
windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.
_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.
_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.
Hi there,
Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.
I basically have the same problem as ohfishing with my cftest.php file.
It all passes except for the last two:
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL
The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php
I am using Coppermine 1.3.4 and CPMFetch 1.6.2.
Would it affect the running of this file having CPMFetch installed inside the coppermine folder?
I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.
Your help is much appreciated.
Thanks in advance,
Ben
wearentyou.com
Hi there,
Having read through this thread extensively, I have come to the point where I need to post my question as I can't seem to work it out by myself.
I basically have the same problem as ohfishing with my cftest.php file.
It all passes except for the last two:
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL
The URL of the cftest file is http://www.wearentyou.com/Coppermine/cftest.php
I am using Coppermine 1.3.4 and CPMFetch 1.6.2.
Would it affect the running of this file having CPMFetch installed inside the coppermine folder?
I am an intermediate webmaster, and started learning about PHP/Mysql a short while ago for new projects. I am happy enough tracking down code in my installation, changing variables etc, but I can't seem to get my head around what needs to be changed in order for this to work.
Your help is much appreciated.
Thanks in advance,
Ben
wearentyou.com
Your DOCUMENT_ROOT setting is "undefined" which is a new one to me... normally that holds where the documents are...
Strange... is this hosted or your own server?
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL
It's hosted by http://www.bravenet.com - to be honest they haven't been too great so far - I have used them happily for other projects but there are silly little nuances with their hosting such as they have disable the phpinfo function meaning I had to email support just to find out what version of GD is on their server -
they don't offer support for 3rd party php-based software hence me asking on here - surely there must be some way around this problem?
Firstly, thank you for a great script and also your committed support on this forum - you are a patient man. 8)
Managed to get everything installed and running painlessly. And your docs were detailed and helpful.
Small question.
I am using the "Who's online mod" and was wondering if it is possible to fetch user data with cpmfetch. I would like to show how many users I have in my gallery on my home page.
cpm 1.3
Thanks
Julala
imagelink => "none" or "album" or "large"
windowtarget => "_blank" or "_parent" or "_blank-js" or "_blank-cfshow"
imagelink - [none|album|large]
What type of image to link to when the image is clicked. None indicates no link will be provided.
windowtarget - [_blank | _parent| _blank-js | _blank-cfshow ...]
If this is present a target tag is inserted with the contents. This is simply passed through. You can add anything in there (I think) - probably even javascript.
_blank-js
Requires the file cpmfetch.js to be included in your page. That provides the javascript to display the image correctly.
_blank-cfshow
Uses the cfshow.php file to display the image. This will be expanded greatly in the future.
Can someone help me with the above code please?? In which file do I place these codes and how? Can someone show me an example? I want to use _blank-js. Thanks
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /usr/local/apache2/unconfigured/Coppermine/include/config.inc.php FAIL
I get exactly the same problem. Url for my cftest.php is http://bogh.orgfree.com/pics/cpmfetch/cftest.php
Been trying everything I can think of, but to no avail.
Damnit all! Sorry, its not you - but this problem has been the bane of this programs existance since it was started. Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine. THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS! Phooey!
Damnit all! Sorry, its not you - but this problem has been the bane of this programs existance since it was started. Not just this, but all servers - I have like 5 ways to check in there and it always breaks on someones machine. THERE SEEMS TO BE NO GOOD WAY TO FIND THE LOCATION OF FILE THAT IS STANDARD ON ALL SYSTEMS! Phooey!
Is there a simple way to manually set the ROOT manually in cpmfetch? I am pretty sure that would solve the problem.
* Note: I am still in a process of getting familiar with php...
Thanks for a great script (exactly what I need) and very dedicated support. Very cool.
Howdy all,
I just want to report a finding since it took some time to debug.
I had a similar problem as described by a previous poster. cftest.php said everything was OK but I couldn't see any images. When I added a second user #2, it didn't fix my problem. But then I read that you join cpg135_pictures.owner_id to cpg135_users.user_id, I looked at my pictures table and noticed that all owner_id's were set to 0. There is no user_id 0, so I updated the pictures table and gave the pictures to user_id 1. After this update, cftest.php worked properly.
I can guess why this happened to me, but that is another matter altogether. ::)
Hello,
I've some trouble with the fonction cpm_unlockPrivate($bool). Can someone help me?
My php code in my page:
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/pics');
$objCpm->cpm_unlockPrivate(true);
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>
The error:
Fatal error: Call to undefined function: cpm_unlockprivate()
I surch to have pics of the last galleries, even if it is a public or registered gallery.
Many thanks for your help!
Seb
many many thank's Titooy !!!
That's exactly the solution I was looking for!!!
Were you bridged with something? CPG would not have added a bad owner number by itself...
<img src="/galleria/cpmfetch/cfimageget.php?size=thumb">
ERROR: Path to Coppermine incorrect. (/home/imagesj/domains/imagesontheweb.net/public_htmlhttp://www.imagesontheweb.net/galleria//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/imagesj/domains/imagesontheweb.net/public_html/galleria/cpmfetch/cfimageget.php on line 181
Code: [Select]ERROR: Path to Coppermine incorrect. (/home/imagesj/domains/imagesontheweb.net/public_htmlhttp://www.imagesontheweb.net/galleria//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/imagesj/domains/imagesontheweb.net/public_html/galleria/cpmfetch/cfimageget.php on line 181
You are getting this error when you try to look at the top image.
I am not familiar enough with the code in cpmfetch, but I will go through it tonight and find my resolution and yours, if someone doesn't post here first.
// This one you need to adjust unless your gallery is at http://www.youname.com/photos
// If you installed right to the root of your web site, just use a /
$urltocpm = "/galleria";
You are referring to this bit of code here??Code: [Select]// This one you need to adjust unless your gallery is at http://www.youname.com/photos
// If you installed right to the root of your web site, just use a /
$urltocpm = "/galleria";
I've tried tons of variations on the URL in cfimageget.php.. Am I missing a change somewhere else??
Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)
;) Hello,
I just installed cpmfetch to list that latest images and is workin great @ ' www.pickafish.com '. Now i'm trying to move it tothe center of the page under the cusom 'latest additions' header. pls i wouldlike to know hoe to align the gallery. Thanx ???
I am trying to display an image with (cpmfetch/cfig_random.php") on the index page, but I would like to display with a link to the photo album. Currently I have the displayimage as (<a href="/photoalbum/displayimage.php?pos=-397" target="_blank") which is obviously giving me the same photo. How do I link to the displayed image for cfig_random.php?
http://www.mycsailing.com/
Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?
Thanks!.
Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?
Thanks!.
Not sure I understand the question, but this may be helpful:
cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
On this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html
Nice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?
Thanks!.
Not sure I understand the question, but this may be helpful:
cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
On this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html
Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
$cnt = 0;
$arrayofalbums = array();
foreach ($data as $row) {
if (! in_array($row['aTitle'],$arrayofalbums)) {
print date("d/m/y",$row['pCtime']);
print " ";
print "";
print $row['aTitle'];
print "";
print "<br>";
array_push($arrayofalbums,$row['aTitle']);
$cnt++;
if ($cnt == 4) break;
}
}
?>
Please... HELP ME !!!! :\'( :\'(
Many thanks
Seb
Hi,
I'm having the same problem, can anyone help?
ThanksNice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?
Thanks!.
Not sure I understand the question, but this may be helpful:
cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
On this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html
Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
$cnt = 0;
$arrayofalbums = array();
foreach ($data as $row) {
if (! in_array($row['aTitle'],$arrayofalbums)) {
print date("d/m/y",$row['pCtime']);
print " ";
print "";
print $row['aTitle'];
print "";
print "<br>";
array_push($arrayofalbums,$row['aTitle']);
$cnt++;
if ($cnt == 4) break;
}
}
?>
Please... HELP ME !!!! :\'( :\'(
Many thanks
Seb
<?php
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('resultset');
$data = $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide);
foreach ($data as $row) {
print $row['aTitle'] . "";
}
?>
Hi everyone,
I'm trying to display a list of whats been added recently within 10 days but...Code: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('resultset');
$data = $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide);
foreach ($data as $row) {
print $row['aTitle'] . "";
}
?>
this code shows me just a blank page??? ???
I will try this when I get home but I´m not sure if that would slove my problem since I´m not running private albums. I create albums and batch upload images to them. Users that are part of a certain phpbb usergroup can single upload to them aswell.Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)
Are these other images in user galleries... If so, you could be running into the non-private aspect... This is the function that controls this... (Private to cpmfetch means anything that is not completely opened)
cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
I will try this when I get home but I´m not sure if that would slove my problem since I´m not running private albums. I create albums and batch upload images to them. Users that are part of a certain phpbb usergroup can single upload to them aswell.Cpmfetch is a great feature. However, I have a question.
Is it normal when I use the latest added media code it only displays the images I added? (various other members have added images aswell but when using the code it doesn´t show them at all)
Are these other images in user galleries... If so, you could be running into the non-private aspect... This is the function that controls this... (Private to cpmfetch means anything that is not completely opened)
cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
Weird is that another admin using single upload doesn´t have his photo´s shown with the script and the one´s I uploaded with a testaccount (no admin, just right usergroup) do not cause any trouble.
Also, what do I put in as $bool?
Hi everyone,
I'm trying to display a list of whats been added recently within 10 days but...Code: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('resultset');
$data = $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide);
foreach ($data as $row) {
print $row['aTitle'] . "";
}
?>
this code shows me just a blank page??? ???
One thing that leaps to mind is the time frame... have you added anything in the last ten days? That got me once...
if so, check the $row with a print_r to see what you are getting back for data
Let me know how that goes
<?php
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('resultset');
$data = $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide);
foreach ($data as $row) {
print_r $row['aTitle'] . "";
}
$objCpm->cpm_close();
?>
The code shown below is a good starting point. Right now, cpmfetch will not do what you are looking for, so you have to wrap it with more PHP code to get the images and display them and add the titles.
I don't have time to write it at this moment. If someone else has done this, please post the code.
Its not terribly complicated, and if you insert a print_r($row) in there you can see all the wonderful data you have access to.Hi,
I'm having the same problem, can anyone help?
ThanksNice job, but how can I use the option "lastalb" (last updated albums) with this CpmFetch?
Thanks!.
Not sure I understand the question, but this may be helpful:
cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
On this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s05.html
Hello. How can provide a table with the 4 last updtated albums (with one pic from each album and his name below).
I've found a code on vuud's website (see below), but this provide only a text with date and album name and I have no idea how I can add a pic.
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "");
$cnt = 0;
$arrayofalbums = array();
foreach ($data as $row) {
if (! in_array($row['aTitle'],$arrayofalbums)) {
print date("d/m/y",$row['pCtime']);
print " ";
print "";
print $row['aTitle'];
print "";
print "<br>";
array_push($arrayofalbums,$row['aTitle']);
$cnt++;
if ($cnt == 4) break;
}
}
?>
Please... HELP ME !!!! :\'( :\'(
Many thanks
Seb
Can someone explain me how I can use the print_r($row) function?
Hi everyone,
I'm trying to display a list of whats been added recently within 10 days but...Code: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('resultset');
$data = $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide);
foreach ($data as $row) {
print $row['aTitle'] . "";
}
?>
this code shows me just a blank page??? ???
One thing that leaps to mind is the time frame... have you added anything in the last ten days? That got me once...
if so, check the $row with a print_r to see what you are getting back for data
Let me know how that goes
Hi thanks for your help but it still don't wanna work for me. It shows me a Parse error: parse error in fetchtest.php on line 15
I have tried different solutions but nothing happen.Code: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
"linkstyle" => "photoclip",
"alttag" => "One of the last photos submitted",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_setReturnType('resultset');
$data = $objCpm->cpm_listMediaAddedOverLastDays(10,$styleguide);
foreach ($data as $row) {
print_r $row['aTitle'] . "";
}
$objCpm->cpm_close();
?>
Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?
Quote from: BabounetCan someone explain me how I can use the print_r($row) function?
If you are looking for instructions on print_r, try php.net.
http://www.php.net/manual/en/function.print-r.php
Bool is a boolean. true or falseI got it working. I looked at the pictures being uploaded by which user. I created those users with their phpbb id in the cp database and now it displays all latest pictures.
Well, the phpbb thing is probably your problem then. the phpbb bridge does not create users in the cpg database, so it throws it off. How many phpbb users do you have? Essentially if you make a few cpg users then the photos will show up.
Essentially, the photo entry says "user #3 entered me" but the cpg user table has no user #3 cause its in the phpbb table.
There is a lot of talk about this in these forums already... search on phpbb and cpmfetch
Bool is a boolean. true or falseI got it working. I looked at the pictures being uploaded by which user. I created those users with their phpbb id in the cp database and now it displays all latest pictures.
Well, the phpbb thing is probably your problem then. the phpbb bridge does not create users in the cpg database, so it throws it off. How many phpbb users do you have? Essentially if you make a few cpg users then the photos will show up.
Essentially, the photo entry says "user #3 entered me" but the cpg user table has no user #3 cause its in the phpbb table.
There is a lot of talk about this in these forums already... search on phpbb and cpmfetch
Warning: Unable to access cpmfetch_dao.php in /mnt/ja1/01/455/00000003/htdocs/scripte/cpmfetch/cpmfetch.php on line 25
Fatal error: Failed opening required 'cpmfetch_dao.php' (include_path='') in /mnt/ja1/01/455/00000003/htdocs/scripte/cpmfetch/cpmfetch.php on line 25
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/scripte/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?
The print_r function is not to solve your problem, but to teach you something. It will help you see what data you have at your disposal, which will then help you to solve your problem.
http://www.php.net has the print_r in the documentation !
Its not on the "php specialist" level, or I would not be sending you that way. A little effort and thought and you can do it. Really.
Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?
The print_r function is not to solve your problem, but to teach you something. It will help you see what data you have at your disposal, which will then help you to solve your problem.
http://www.php.net has the print_r in the documentation !
Its not on the "php specialist" level, or I would not be sending you that way. A little effort and thought and you can do it. Really.
Thanks everybody for your help. php as realy no limit and is a big system. But it's not so easy to learn.
I've find an other solution (a friend rewrite a part of the code to do what I need)
Seb
cpm_viewLastCommentedImages($rows,$columns, [ array $options=""])
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/");
$styleguide = array(
"subtitle" => "</div>
<p>
</p>
<table id='table2' style='border-collapse: collapse;' border='1' bordercolor='#7aabd3' cellpadding='0' cellspacing='0' width='575'>
<tbody>
<tr>
<td bordercolor='#7AABD3' align='center' bgcolor='#103d6a'>
<strong> <font color='#ffffff' face='Comic Sans MS' size='2'> %t</font></strong></td>
</tr>
<tr>
<td bordercolor='#000033' align='center' bgcolor='#000033' height='59' valign='top'>
<p>
<font color='#ffffff' face='Comic Sans MS' size='2'>
<strong style='font-weight: 400;'>
%c<br>
<br>
</strong>
</p>
</tr>
</tbody></table>
<p>
",
"imagestyle" => "photoclip",
"imagesize" => 'thumb');
$objCpm->cpm_viewLastAddedMedia(20,1,$styleguide);
$objCpm->cpm_close();
?>
Tongo's Photo Shop Recent updates to gallery http://www.tongsondub.com 2005-11-12T10:30:02+01:00 Tongsondub.com
http://www.tongsondub.com http://www.tongsondub.com/images/sitelogo.gif text/html 2005-11-09T01:08:25+01:00
http://www.tongsondub.com admin Personal :: RB.........
http://www.tongsondub.com/tgallery/displayimage.php?pos=-3
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-3">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_Car%20Stuff%20003.jpg" align="right" /></a>
Car Stuff 003.jpg from album Personal<br/>Filesize 74.5 kb<br/>
I can not say what engine that is or whose car its in. That's about all i got to say about that<br/>Rated 0 / 5 stars (0 votes total)
text/html 2005-11-09T01:07:18+01:00 http://www.tongsondub.com admin
Personal :: My new K-sport Coilovers http://www.tongsondub.com/tgallery/displayimage.php?pos=-2
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-2">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_Car%20Stuff%20022.jpg" align="right" />
</a>Car Stuff 022.jpg from album Personal<br/>Filesize 68.6 kb<br/>
Not the most well-known coilovers but they have not let me down.
Most importantly, the price was more than right<br/>Rated 0 / 5 stars (0 votes total) text/html 2005-11-09T01:05:37+01:00
http://www.tongsondub.com admin Personal :: Skyline R34 GTR
http://www.tongsondub.com/tgallery/displayimage.php?pos=-1
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-1">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_gtr.jpg" align="right" /></a>
gtr.jpg from album Personal<br/>Filesize 137.7 kb<br/>The car i will by when i win the Lottery.<br/>Rated 5 / 5 stars (1 votes total)
if you look at the links for the images, they have two '/'s if (substr($urltocpm_,-1) != '/') $urltocpm_ .= '/';
$this->fullpathtocpm = $this->partialUrltocpm;
}
$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");
$this->setPrivateLockOn(true);
$this->dateFormatString = $this->defaultDateFormatString;
Is there a way to display the thumbs of the last X number of albums updated. much like the cpm_showAlbumsUpdatedOverLastDays except no date and a set number.
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/accgallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?>
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastCommentedImages(1,4, [ array imagewidth="50"])
$objCpm->cpm_close();
?>
Parse error: parse error, unexpected '[' in /home/***/public_html/cpmfetch/test2.php on line 4
Not exactly sure where I went wrong.
Test page shows everything working, but when I add this codeCode: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/accgallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
To my portal page I get thisCode: [Select]cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?>
Instead of random photos.
Can someone tell me what I did wrong?
Here is a link to my site if that helps
http://www.aircapitalconstrictors.com/forum/portal1.php
Thanks
Shane
Im a bit confused.
this is the code i have to show the last images i uploadedCode: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>
i want the images though to resized down to about 50 for the width. so i added the option arrayCode: [Select]<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastCommentedImages(1,4, [ array imagewidth="50"])
$objCpm->cpm_close();
?>
this is the error i got when i went to my broswer.QuoteParse error: parse error, unexpected '[' in /home/***/public_html/cpmfetch/test2.php on line 4any help would be greatly appreciated!
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array();
$styleguide['imagelink'] = "none";
$styleguide['windowtarget'] = "_blank-cfshow";
$objCpm->cpm_viewLastAddedMedia(1,5,$styleguide);
$objCpm->cpm_close();
?>
Can anyone spot the problem?? Could it be a database error? How can I fix this? Thanks
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching? My code is below:Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array();
$styleguide['imagelink'] = "none";
$styleguide['windowtarget'] = "_blank-cfshow";
$objCpm->cpm_viewLastAddedMedia(1,5,$styleguide);
$objCpm->cpm_close();
?>
Can anyone spot the problem?? Could it be a database error? How can I fix this? Thanks
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching?
Hi Vuud,
Thanks for your reply. I've tried both your suggestions but still not working.
I found out another thing today. I'm the admin and all the photos I upload are fetched but the pics that my users upload which I have to approve do not get fetched. I tried registering as a normal user and tried uploading and approved the files with my admin account. It appears in CPG but CPMFetch does not fetch. I tried uploading again as an admin and the photos were fetched just fine. Please help..Thanks.
I was unable to start a new topic so I am replyng to this one in hopes of an answer.
I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.
I am using the following codeCode: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>
Which gets me http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics. The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0
Is there something I am missing or doing wrong?
I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching?
I was having exactly the same problem. It worked fine up until a few days ago. I was using the SSI method to include the latest photos on an html page. I changed it to use this method: http://forum.coppermine-gallery.net/index.php?topic=23537.0 and it works fine now.
Jason
Hi,
CPMFetch is doing exactly what I'd like to. Unfortunately i tried to install it on 2 servers and it doesnt works. Averything is successfull on the test page but no thumbnail is displayed.
Link to my public cftest http://www.breizhskiff.com/galerie/cpmfetch/cftest.php
Coppermine is there : http://www.breizhskiff.com/galerie/
Note that my directory "albums" has no pictures at the root but in subdirectories (anyway I tried with ome at the root and it didn't change anything).
Thanks for your knid help.
Ghislain
I was unable to start a new topic so I am replyng to this one in hopes of an answer.
I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.
I am using the following codeCode: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>
Which gets me http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics. The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0
Is there something I am missing or doing wrong?
Well, its good you were not able to start a new topic - posts go here.
Second, amazingly enough Isaiah and I have the same head circumferance... Wierd. :p
What you are doing looks correct, but your right, something is busted in there.
A few things:
What version of CPG?
Are the other ones uploaded any differently than the ones its showing?
<?php
// phpbb fetch
$phpbb_root_path = './Forum/';
define ('IN_PHPBB', true);
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('<tt><b>phpBB Fetch All:</b>
$phpbb_root_path is wrong and does not point to your forum.</tt>');
}
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$news = phpbb_fetch_posts();
phpbb_disconnect();
?>
<head>
<title>Isaiah Folkes :: Index</title>
<link rel="stylesheet" href="comicBook/comicBook.css" type="text/css" />
<style type="text/css">
<!--
.BODYLINE { background-image: url(comicBook/images/cover_background.jpg) }
TD.cat { background-image: url(comicBook/images/background.jpg) }
TD.rowpic { background-image: url(comicBook/images/background.jpg) }
TD.catHead,TD.catSides,TD.catLeft,TD.catRight,TD.catBottom { background-image: url(comicBook/images/background.jpg) }
-->
</style>
</head>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4">
<table width="750" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td class="bodyline">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<a href="index.php"><img src="comicBook/images/logo_comic.jpg" border="0" alt="Pictures" vspace="1" /></a>
</td>
<td align="center" width="100%" valign="middle"><span class="bigmaintitle">Isaiah Folkes</span><br>
<table cellspacing="0" cellpadding="2" border="0" width="452">
<tr>
<td align="center" valign="top" nowrap="nowrap"> <a href="http://isaiahfolkes.com/Gallery/" class="mainmenu"> Pictures </a>
<a href="http://isaiahfolkes.com/Forum/" class="mainmenu"> Discussion </a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="1" border="0" >
<tr>
<td><?php
for ($i = 0; $i < count($news); $i++) {
?>
<table border="1" width="100%">
<tr>
<th><?php echo $news[$i]['topic_title']; ?></th>
</tr>
<tr>
<td align="left" width="100%">
Posted by
<a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $news[$i]['user_id']); ?>">
<?php echo $news[$i]['username']; ?></a>
on <?php echo create_date($board_config['default_dateformat'], $news[$i]['post_time'], $board_config['board_timezone']); ?>
<hr size="1">
<?php echo $news[$i]['post_text']; ?>
<hr size="1">
<div align="right">(<?php echo $news[$i]['topic_replies']; ?>)
<a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id']); ?>">
Comment<?php if ($news[$i]['topic_replies'] != 1) { echo 's'; } ?></a></div>
</td>
</tr>
</table>
<br>
<?php
}
?>
</td>
<td valign="top">
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>
</td>
</tr>
</table>
</body>
</html>
<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
###############################################################################
###############################################################################
include('cpmfetch/cpmfetch.php');
$objCpm = new cpm("/gallery");
$objCpm->cpm_setDebugMode(1);
$objCpm->cpm_setReturnType('html');
echo $objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
<!-- SQL : SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation FROM cpg135_pictures as p, cpg135_albums as a, cpg135_users AS u WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES' and a.visibility = 0 ORDER BY rand(586518) LIMIT 9
ROWS: 0
--><table >
<tr>
<td> </td><td> </td>
</tr>
</table>
I am using mod to bridge user reg with phpbb and haven't added any other mods to CPG.
cpmFetch displays NOTHING for me :(
Tried cpmFetch 1.6.0 and 1.6.2 - same problem (running 1.6.0. atm)
http://event-team-saar.de/cpmfetch/cftest.php
Coppermine 1.3.5. (using the SMF bridge)
php 4.3.10
SMF 1.1 RC1
Any ideas how to solve this problem?
whooo hoo..
Thanks,
got it working like I want....
Yes I confirm I'm bridging with SMF. I added the principal uploaders and it works fine.Hi,
CPMFetch is doing exactly what I'd like to. Unfortunately i tried to install it on 2 servers and it doesnt works. Averything is successfull on the test page but no thumbnail is displayed.
Link to my public cftest http://www.breizhskiff.com/galerie/cpmfetch/cftest.php
Coppermine is there : http://www.breizhskiff.com/galerie/
Note that my directory "albums" has no pictures at the root but in subdirectories (anyway I tried with ome at the root and it didn't change anything).
Thanks for your knid help.
Ghislain
I could not help but notice you are running SMF... Are you bridging with CPG or anything?
When you bridge, a lot of times the bridge does not add users into the cpg database, but the photos get assigned new owner ID's... this breaks when we try to retrieve the information for them.
Let me know and we will take it from there.
So, solutions?
1) Mod cpmfetch so that it knows where to find the user data or does not look for it.
2) Create fake users in the cpg to reflect the user #'s assigned to photos.
3) Write a script that populates the cpg tables with userdata from the thing you are mod'ed too. Then post the script up so the bunches of other people with this problem can use it too.
So, solutions?
1) Mod cpmfetch so that it knows where to find the user data or does not look for it.
2) Create fake users in the cpg to reflect the user #'s assigned to photos.
3) Write a script that populates the cpg tables with userdata from the thing you are mod'ed too. Then post the script up so the bunches of other people with this problem can use it too.
Thanks for your fast answer!
#1 Is it enough to point cpmFetch from the cpg135_users table to smf_members and change the according fieldnames?
#2 I create just some new users for uploading? Nothing more? Hrmm maybe a solution. I have to talk with my client.
#3 I would do so, but its impossible. Coppermine saves the passwords in plaintext smf doesnt. :( So i cant convert the passwords.
I guess i'll have to stand with solution #2.
Ahhh, ok, after a further look into the database i understood :)
I've added just one user "test" and it works now. Perfect! Thank you!
<?php
include './cpmfetch/cpmfetch.php';
$objCpm = new cpm('/coppermine');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_formatStats("Here is a percent sign %% There are %f files in %c categories containing %a albums, having served %v views and getting %n comments");
$objCpm->cpm_close();
?>
I get
I have Coppermine 1.3.5 phpbb2.0.18 and cmpfetch 1.6.2 (I think, downloaded it 2 days ago)
The Coppermine/phpbb integration seems to work fine, but I have problems getting cmpfetch to work.
I have added the following to my homepageCode: [Select]<?php
I get
include './cpmfetch/cpmfetch.php';
$objCpm = new cpm('/coppermine');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_formatStats("Here is a percent sign %% There are %f files in %c categories containing %a albums, having served %v views and getting %n comments");
$objCpm->cpm_close();
?>
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.bletchley-reunion.org.uk%2Fsample.jpg&hash=21bdee8e0ccf62064a026f193542b1cbe88b5766)
The pics don't display but it gets the stats, which I assume means the cmpfetch installation is OK but there's something dodgy about my coppermine install??
Coppermine, phpbb2 and cmpfetch are all in discrete directories under the homepage, the cmpfetch test page shows all passes, and I've RTFM till my eyes nip.
I'm stumped!
I've not used the default table prefixes for Coppermine or phpbb2 but cmpfetch seems to pick these up from the config file so I don't think that's it.
Any help much appreciatedCode: [Select]
I guess I'm just not getting it, but the test page works well, and I can create a php file with different displays. My question is likely elementary, but how do I call the file up to display on other pages on my website. Do I href the php page or do I drop the code directly into the page I want. Either way, I can't get it to work.
Hi Dear
Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face the following error on my index page
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/SITENAME/public_html/cpmfetch/cpmfetch_dao.php on line 695
Earlier it was working fine but now it isnt
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want.
This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.
Hi Dear
Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face the following error on my index page
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/SITENAME/public_html/cpmfetch/cpmfetch_dao.php on line 695
Earlier it was working fine but now it isnt
Hello,
The release notes with the recent versions of cpmfetch include instructions for this problem.
Well they are for the beta, but this includes the new verions alsoQuoteThe Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want.
This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.
I am working on the next version of cpmfetch, but it keeps getting bumped due to this annoying thing called life. So hopefully I can get that out soon - which addresses many other "oddity" level problems also.
In the meantime a recent cpmfetch and the brief changes above are all thats needed to fix it.
Hi Dear
Ive jusgt updated my 1.3.4. to 1.4.2 stable successfully, But now i face the following error on my index page
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/SITENAME/public_html/cpmfetch/cpmfetch_dao.php on line 695
Earlier it was working fine but now it isnt
Hello,
The release notes with the recent versions of cpmfetch include instructions for this problem.
Well they are for the beta, but this includes the new verions alsoQuoteThe Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want.
This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.
I am working on the next version of cpmfetch, but it keeps getting bumped due to this annoying thing called life. So hopefully I can get that out soon - which addresses many other "oddity" level problems also.
In the meantime a recent cpmfetch and the brief changes above are all thats needed to fix it.
Dear
Ive uncomment line54 & uncomment line59 as told by u but tell me wher is the other section as u mentioned " Uncomment by removing the same from the other section."
Now this is showing the following error
Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/SITENAME/public_html/cpmfetch/cpmfetch_dao.php on line 61
if convenient paste code over here or put copy of dao file here so that i can detach & use
Thanks
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
*/
// This is for CPG versions prior to 1.4
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
THANKS Dear
Issue Resolved !!
The problem was also i was having ur 1.4 version of cpmfetch & now i download 1.6.2 & copy all the files in same directory & Site is working fine.
Also no need to say SORRY as you are favouring us for Free , So its our duty to say sorry because we are disturbing u again & again.
Anyway Good work. ;)
<!-- GALLERY -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28" colspan="2"><span class="cattitle"><?php echo 'Gallery' ; ?></span></td>
</tr>
<tr>
<?php
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>
<td class="row1" align="center" width="50%">
<?php
$objCpm->cpm_viewRandomMedia (1,1);
?>
</td>
<td class="row1" align="center" width="50%">
<?php
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
</td>
</tr>
</table>
<br />
<!-- GALLERY -->
Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/skanlo.com/httpdocs/gallery/cpmfetch/cpmfetch.php on line 25
Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/skanlo.com/httpdocs/gallery/cpmfetch/cpmfetch.php on line 25
According to http://www.php.net/features.safe-mode this is something to do with what files / directories PHP is allowed to open, and from what I can tell has something to do with how your server is configured.... Although I am at a complete loss as to why it does not happen when your cftest.php runs which seems fine...
It is possible that your portal (for security reasons) turns that on, and since its not in the portal directory you get that error? I am guessing there. You could check the source for phpbb and any .htaccess files it may come with. Look for that setting, OR try moving the cpmfetch directory into the phpbb directory.
These are all guesses...
error_reporting(0);
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
error_reporting(E_ALL ^ E_NOTICE);
$objCpm->cpm_close();
Hello its me again. Sorry im it seems like im spamming. I noticed that only images from public albums get displayed on the random image. after reading the documentation i found out that i could include images from private albums by "calling the cpm_unlockPrivate(true) function". I tested this on the example.php file i mentioned in my post above and gives me the error. I was wondering if where should i make this call, i mean, where do i place this code.
Once more thanks for your time, your knowledge and your patience.
Hec Losame
Are your other issues all better now?
Are your other issues all better now?
Vuud, everything is running smooth now. you are a genius. Thanks again for your help and your time. I really appreciate it as i do appreciate this marvelous piece of code you have provide us. Thanks.
Hec Losame
Dear VUUD
Is there way out for pic of the day or pic of the week in your mod foer all or specific categories/ albums
or make some thing like that
Ive seen one other mod but there ive to modify my code heavily , iwant to have some crisp solution from u ;)
Dear Vuud
Please check this topic
http://forum.coppermine-gallery.net/index.php?topic=14600.0
I believe u'll make a shortcut to that
<?php
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
It does not return any errors but it doesn't show any picture. My coppermine is in the /gallery/ folder. include "./cpmfetch/cpmfetch.php";
Hi. I just can't get this to work at all. I really don't know any php but I've gotten a phpBB fetch to work and that seemed a lot more complex...
I'm using cpg 1.3.2
This is the code I'm am trying to use.Code: [Select]<?php
It does not return any errors but it doesn't show any picture. My coppermine is in the /gallery/ folder.
include "gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
When I try changing the code to this, as it has it in the documentation, it returns me with an error about not finding the right directory.Code: [Select]include "./cpmfetch/cpmfetch.php";
Get the owner_id of the photos from the pictures table and make sure that Id exists in the users table.
If not, create another cpg user... that will be the real owner for the photos and all will work well
those were the two suggestions you told me to do. The first one sounds complicated, but I think the second one might work. But I don't know exactly what you mean. Can you explain it again?
Thanks!
Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 213
Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 214
Notice: Undefined index: SCRIPT_FILENAME in c:\domains\grafflix.nl\wwwroot\cftest.php on line 214
Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 221
5 You set your partial URL to /flix PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Windows NT SOHOSTED12 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: Not found BAD
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is a good match PASS
80 CPG Config file not found: /flix/include/config.inc.php FAIL
My hosting rund IIS, heard CPMFetch has alot of errors with it..
Peace !
Also gives me this: Unknown column 'u.user_website' in 'field list'hmm I don't know whats wrong but it works if I replace it with a 1.41 cpmfetch_dao.php - I still get the error DOCUMENT_ROOT is not a good match but it seems to load the pictures correctly.
Note that CPG is bridged with SMF, and SMF is bridged with Joomla.
hmm I don't know whats wrong but it works if I replace it with a 1.41 cpmfetch_dao.php - I still get the error DOCUMENT_ROOT is not a good match but it seems to load the pictures correctly.
if I use the latest pmfetch_dao.php I get the same error/problem as you. I try to fix it with the document_root variable but no luck.
img src="//albums/...
$ChangeThisToYourPartialUrlToCPG = "/";
class cpm {
//The following 3 entries can be adjusted if you are using non-standard prefixes in CPG
var $thumbnailprefix = "thumb_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';
var $defaultimagesize = "thumb_";
// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////
// ... really
// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////
var $VERSION = "1.6.2";
var $cpm = "";
var $urltocpm = "/"; //from a web client point of view without domain name /photos
var $filepathtocpm = ""; //server path to cpm directory /home/vuud/cpm
var $optionHash = array(); //Contains the options submitted by the user
var $styleHash = array();
var $returntype = "print"; // print, html, resultset
var $debugMode = false;
<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
include "cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
a href="/displayimage.php?pos=-1458"
removed some lines from the dao. the mysql error message is gone, but still not thumbnails to see. :-X
guess ill have to wait for the "Godfather" release.
I run the cftest.php program and also an small one from doc. It looks to work but images are not shown. No errors reported, so I see that the html generated for images is likeCode: [Select]img src="//albums/...
That's starting with a double slash (//).
I suppose that I made some mistake in configuration variables, but I can't find it.
I have both coppermine and cpmfetch at root directory, so I usually put an "/" in variables.
This is my start of cftest.phpCode: [Select]$ChangeThisToYourPartialUrlToCPG = "/";
All results are "PASS" or "INFO", but no image displayed.
I also noticed that url to last images are given with a negative value, but it works. Like that:Code: [Select]a href="/displayimage.php?pos=-1458"
Are you bridged with SMF, PHPBB, Joomba, Mambo, or any other one, etc...? If so you have the regular user display problem. See my post above to n3m on this, and for more information see the "embedding in SMF, PHPBB..." etc thread. Its also been discussed here a few times.
<img src="//albums/mapamundi/china2005/thumb_IMG_0777.JPG"
class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" />
BTW If you need to see it I'll keep this online for some time:
http://www.mapamundi.org/cftest.php
Thanks,
Colegota
img src="/photos//albums/..."
While mine is justimg src="//albums/..."
Hi!
Yes. It's the double slash. I did take the html code generated for a test sample and removed one slash just in the first image.
Here you can see the result
http://www.mapamundi.org/prueba-cpmfetch.html
After that I look into your examples page code and noticed that in that case the double slash is in the middle of url due to you have a "/photos" directory, so your code isCode: [Select]img src="/photos//albums/..."
While mine is justCode: [Select]img src="//albums/..."
Maybe this is the difference, cause I can see your samples without problem.
I have two computers and I tested in both, one is Mandriva Linux 10.2 with Mozilla 1.7 and Konqueror 3.2.3, and other is a Mandriva Linux 2005 LE with Mozilla Firefox 1.0.2.
So I wait for new version. I hope you enjoy your drink as we enjoy your code. ;)
Thank you again,
Colegota
Notice: Undefined property: sqlPictureAlbumSelect in /home/isbunder/public_html/cpmfetch/cpmfetch_dao.php on line 457You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM gAllEry_pictures as p, gAllEry_albums as a, gAllEry_usersWarning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/isbunder/public_html/cpmfetch/cpmfetch_dao.php on line 710
Hello
I installed 1.4.2 and applied the fix you had couple of pages back, but now i am getting another error
http://www.isbunderground.com/cpmfetch/cftest.php
1. Include what version of coppermine you are using
2. A link to your website and gallery
3. A link to an example of the problem (if possible)
4. how computer savvy you are (newbie, intermediate, damn good)
5. what kind of web server you are running on (if known)
6. Include the syntax of the command you are using.
1. Coppermine 1.4.0
2. http://www.furry-muscle.org/Galleries/ Warning Contest of Galleries or X or higer
3. http://www.furry-muscle.org/cpmfetch/cftest.php
4. Intermediate
5. Don't know
6. Got me :P But in the cfteses you see where it should show the images it don't and get this messages
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /furhome/zak/public_html/cpmfetch/cpmfetch_dao.php on line 710
Have no idea what up.
Happy friggin Xmass then! ;) Well now that I got it to work and thanks a many any idea how I can make a simple boarder around the image in my webpage? http://www.furry-muscle.org/index2.php Website link ^_^ BTW, MERRY CHRISTMAS!
Do it with css or including attibutes...
here is the CSS example
http://www.fistfullofcode.com/projects/copperminefetch/tips.php
I see your example but can't understand it, sorry :( Well not the CSS but the code below it.
This is my code and how I apply it.
<div align="center" class="RandomImageBorder"><?php
include "./CopperMineFetch/cpmfetch.php";
$objCpm = new cpm("/Galleries");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?></div>
then my CSS
.RandomImageBorder {
border-style:solid;
border-width:5px;
border-color: #394048;
margin: 2px;}
My question is how do I apply just the image?
I don't understand this code here
cpm_viewRandomMediaFromAlbum(2,2,17,array("tablestyle" => "test1","imagestyle" => "test1"));
I mean what is this in? A different file?
What about like so?
* Remove the div
* Add the alignment to the RandomImageBorder CSS Entry
<?php
include "./CopperMineFetch/cpmfetch.php";
$objCpm = new cpm("/Galleries");
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","imagestyle" => "RandomImageBorder"));
$objCpm->cpm_close();
?>
For each image tag it produces it will include class="RandomImageBorder"
That should do ya
Thanks alot, but one more question what does test1 in the code me? It does not display or anything. ???
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/galerie");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
ERROR: Path to Coppermine incorrect. (/home2/galerie//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home2/l/laurent/www/cpmfetch/cpmfetch.php on line 770
Hi
After installation, cftest was successfull execpt that no images was displayed.
When i'm trying to create php page with this code :Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/galerie");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
I get theses errors :Code: [Select]ERROR: Path to Coppermine incorrect. (/home2/galerie//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home2/l/laurent/www/cpmfetch/cpmfetch.php on line 770
You can see that i have two slash in the first error, just before include.
What's wrong ?
Thanks for your help
Laurent
echo '<div align="right">';
include "../cmcgallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cmcgallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
echo '</div>';
same thing nothing no error no imagei have the same problem test page has no errors and no pictures
1. version of coppermine 1.4.2
2. website http://hot-rain.ca/cmcforum/index.php and gallery http://www.hot-rain.ca/cmcgallery/
3. problem http://www.hot-rain.ca/cmcgallery/cpmfetch/cftest.php
4. Inbetween newbie, intermediate
5. Apache/1.3.34 (Unix) taken from line 40 of cftest.php
6. code used for image blockCode: [Select]echo '<div align="right">';
same thing nothing no error no image
include "../cmcgallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cmcgallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
echo '</div>';
<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$source = "album=85";
$objCpm->cpm_close();
?>
hi sorry, this is a bit of a newbie question!! i've installed coppermine 1.6.2 on linux/apache and have got the test code to work as follows:Code: [Select]<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
i've the manuals and searched on this site but can't figure out how to show ALL of an album in particular (album 85), say with each row having 4 colums! is this possible?
i think i've gota use the source= code which i found in the instructions but i'm not sure how to use it!!Code: [Select]<?php
//kev gallery test
include "/home/domain/www.*****.com/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$source = "album=85";
$objCpm->cpm_close();
?>
any help would be very much appreciated, thanks in advance :)
kev.
<?php
//kev gallery test
include "/home/domain/*****/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewLastAddedMediaFrom ("album=85",1000,4);
$objCpm->cpm_close();
?>
thanks very much for your reply, sorry to be a pain... but i've tried it, and with the displayerrors=on at the top of my page but when i use this code it doesn't display anypictures at all: (or any errors)Code: [Select]<?php
//kev gallery test
include "/home/domain/*****/web/galleries/cpmfetch.php";
$objCpm = new cpm('/galleries');
$objCpm->cpm_viewLastAddedMediaFrom ("album=85",1000,4);
$objCpm->cpm_close();
?>
i've tried changing the quotes around album to be single quotes, and i've tried change the 1000 down to 10 incase the request was taking too long.. but nothing is fetched from the gallery, do you have anymore ideas or am i just putting your extra line of code in the wrong place?
thanks again, your help is much appreciated!!! :)
kev
Can you post or PM me a link to your cftest.php page?
yeh it's a public gallery, i can view it when i'm not logged in.. here's a bit of the url from the gallery i'm looking at in coppermine which i would like to fetch:
http://www.****.com/galleries/displayimage.php?album=85&pos=2
(has lots of photos in which i can look at)
i got ur test script to work, and i got this to work:
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
but when i alter the code, to your suggestion it doesn't fetch any photos or give any errors..
thanks again for helping!!!
kev :)
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array('alttag'=>"Posted By: %o",'imagewidth'=>"100");
$objCpm->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm->cpm_close();
?>
$objCpm->cpm_viewLastAddedMediaFrom(5,1,"cat=1",$options);
Dear Vuud
My details are
CMS : Joomla
CPG : 1.4 (new)
forum : smf
My knowledge : INtermediate
server: linux
Im having 3 CPG galleries on my site
1) www.mysite.com / WALLPAPER
2) www.mysite.com / LOGOS
3) www.mysite.com / MOVIES
& ive ive installed your Excellent MOD cpmfetch for random wallpapers on joomla index page & now i want to fetch data from logo gallery & movies gallery
If i copy mod to other folders & after filling necessary details (path to movies cpg etc.) i post for 2 other galleries on index page it says error of cant redeclare
Hope u understand : In simple words if i want to fetch data form 3 different galleries installed on one same site to one same index page .. How is that possible ?
Please tell me what & How to do
Regards
1. Coppermine 1.4.2
2. http://theminivault.grimeygames.com/gallery
3. http://theminivault.grimeygames.com/ - The Fetch table on the righthand side
4. Intermediate
5. Apache
6. There is no syntax error or mysql error. Everything seems to be runnig correctly. However I am not retreiving anything except content from the very first user gallery.Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array('alttag'=>"Posted By: %o",'imagewidth'=>"100");
$objCpm->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm->cpm_close();
?>
This will result with images being pulled back but only those images that have been added to album 1...not sure what I need to change. I have tried to useCode: [Select]$objCpm->cpm_viewLastAddedMediaFrom(5,1,"cat=1",$options);
With the same results. I want to display the last 5 added images from any personal galleries. I do know for a fact that user 1 was not the last files uploaded as I uploaded them myself and have have many more added after I had done it. Any help would be greatly appreciated.
Thanks in advance.
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/photo');
$objCpm->cpm_viewRandomMedia (3,4,"cat=1:owner=Joey Esquivel");
$objCpm->cpm_close();
?>
require_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
<?php
$source = "album=38";
$options = array('subtitle' => 'Posted By: %o','alttag'=>"%c", 'tablestyle' => 'rate', 'imagewidth'=>"100",'imagestyle' => 'rate');
$objCpm->cpm_viewRandomMediaFrom(1, 1, $source, $options);
$objCpm->cpm_close();
?>
<?php
echo '
<style type="text/css"><!--
.test1 { border-width:0px;}
--></style>';
echo '<div align="center">';
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/coppermine");
echo ' <div align="center">';
echo ' <b><u>Stats</u></b><br>';
$objCpm->cpm_formatStats("Albums: <b>%a</b> <br> Images: <b>%f</b> <br> Clicks: <b>%v</b> <br> Comments: <b>%n</b> <br><br>");
echo '</div>';
echo ' <b><u>Last Image</u></b><br>';
$options = array( 'subtitle' => '<b>%a</b> <br> Name: <b>%t</b> Author: <b>%o</b> <br> Here since <b>%D</b> days <br> Clicks: <b>%h</b> <br> Score: <b>%V</b>' , "imagestyle" => "test1");
$objCpm->cpm_viewLastAddedMedia(1,1,$options,);
//$objCpm->cpm_close();
echo'</div>';
?>
Sort a teaser, and to at least get myself motivated to finish it...
I have version 1.7.0 almost done. Well, the code itself is, but the installer is not. I took a day off and did nothing but recode the whole thing.
Yes, thats right - an installer.
The biggest plus for me is that I eliminated a lot of code and duplication.
The biggest plus for all of you is that
1) You will set the configuration once, and no matter what you do, all the programs know to read it.
2) The configuration gets built of CPG settigns data, so no more futzing with setting prefixes and such
3) Support for cpg 1.4
4) Support to make bridging at least not a problem
5) Should be more IIS and other wierd server tolerant
6) I think the double backslash thing is gone
The big drawback is that this product contains WHEAT and SOY. So those with allergies could have a problem. PEANUT safe though.
Oh yeah, and some functions are going away, BUT the normal ones are still available to you - so you should only need to make very minor changes to your web pages.
$objcpm = new cpmfetch("/cpg");
now becomes
$objcpm = new cpmfetch();
All thats left is to make the installer that builds your config files and a few tweaks to the data.
So hopefully in a day or two.
I am not taking feature requests specifically for this release, but if anyone has any gripes about something that was hard to do that I can make easier, now would be a good time to point it out to me.
Have a nice night and lets all hope for the best
Without trying it myself...
1) Make sure you are closing with $objCpm->cpm_close() before starting the next one.
If that does not work, give them different names...
$objCpm1 = new cpm("/gallery");
$objCpm1->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm1->cpm_close();
$objCpm2 = new cpm("/other");
$objCpm2->cpm_viewLastAddedMedia (5, 1, $options);
$objCpm2->cpm_close();
If none of that works, post exactly what it is saying it cannot redeclare
Vuud
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="middle">
<th scope="col"><?php
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
?></th>
<th scope="col"> </th>
</tr>
<tr align="center" valign="middle">
<th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
</th>
<th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
</th>
</tr>
<tr align="center" valign="middle">
<td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
<div align="center"></div>
<div align="center"></div></td>
<td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
<div align="center"></div></td>
</tr>
</table><?php $objCpm1->cpm_close(); ?>
I can try. Bear in mind I may forget a step, but you should be able to figure it out from there.
1. Log into coppermine gallery as an admin
2. Click on "users" from the admin menu
3. Click "new user"
4. Give the new user a funny name... this is important.
Important note: There is a difference between funny and offensive. I would strongly suggest the former over the latter. Examples of funny names would be like:
Balzack Blisterfrog
Tuggmabellz Fugnutter
Licquema Svettynutz
I.P. Daily
Etc.
Offensive user names are like offensive passwords. They have a habit of being revealed at the worst times.
5. Assign the user whatever for a password since you will never use it again.
Now repeat the above steps 3-5 once for each PHPBB user you have adding photos. Step 4 will be the most challenging as coming up with funny names is not as easy as it seems. Alternatively you could go with the names of the seven dwarfs if you could remember them and if you have less than 8 users to add.
Good luck
Baron Von Flatulator
( I appologize if anyone reading this actually has one of those names. I mean, I am really really sorry if you have one of those names)
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
Is there any way of getting the exif date as a parameter for subtitle in the $options array?
I am totally lost on this. I am not sure if I coded this correctly. I am trying to use the owner=xxxxx for the $source. But nothing happens.
Here is where I am trying to use it:
Example: http://viscomcreatives.org/?author=12Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/photo');
$objCpm->cpm_viewRandomMedia (3,4,"cat=1:owner=Joey Esquivel");
$objCpm->cpm_close();
?>
At the moment, it just does a random image from all the albums. The way I have my coppermine gallery set up is that I have one category with each user creating their own albums within that one category. I would like to ultimately just list the albums per each user. But I am unaware of how to do this. So for now I would simply like to have random images from just that specific user's albums. Any advice would be a great bit of help. Thank you.
First, I want to thank vuud for an incredible add on to Coppermine! :D
My Coppermine 1.3.5 is bridged with phpbb 2.0.18.
I have a bunch of users in my phpbb forum (about 100) and thought this 'make up some fake users in the Coppermine database' was just too much work for me (lazyness is the mother of most of my coding), so I thought take this as a 'hint' by vuud to what may be a minimal change to the code to allow it to work with the PHPBB database.
First (and this is important), I have both my coppermine and my phpbb data in the same mysql database. My phpbb database has a phpbb prefix (i.e. phpbb_). This is important to allow this 'hack' to work!
I made some rather simple-minded changes to cpmfetch_dao.php in an attempt to get CpmFetch 1.6.2 to work with PHPBB 2.0.18.
Note, at this time, I'm using Coppermine version 1.3.5. I have NOT tested this yet with Coppermine 1.4.2.
I haven't done any significant testing, but it seems to work and cftest.php works too. ;)
open cpmfetch.dao.php and find line:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
change it to the following:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
note! If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.
THEN, find every occurance of u.user_id and change it to phpbb.user_id
Save cpmfetch_dao.php and then try cftest.php.
If you get a chance to try this with Coppermine 1.4.2 bridge with PHPBB 2.0.18 and it works ok, I'd appreciate someone letting me know. If I get a chance to upgrade to cpg 1.4.2 myself, I'll let you know.
Ok so I created a new album to try and workaround this issue. Changed the whole site so now it only pulls images that are in one specific album, but unfortunatley now it always pulls the same image back.
I create the object in the page header and close it in the footer and the following code is where it is pulling the image from the gallery. And still nothing. I only want to pull one images at random from album 38.
My server structure is
Page with linked images.: http://mysite.com/index.php
cpmFetch: http://mysite.com/cpmfetch/cpmfetch.php
gallery installation: http://mysite.com/gallery
My header isCode: [Select]require_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
My Call to spmfetch is thisCode: [Select]<?php
$source = "album=38";
$options = array('subtitle' => 'Posted By: %o','alttag'=>"%c", 'tablestyle' => 'rate', 'imagewidth'=>"100",'imagestyle' => 'rate');
$objCpm->cpm_viewRandomMediaFrom(1, 1, $source, $options);
$objCpm->cpm_close();
?>
Firts of all, tnx u very much VuuD.
Why no make a recopilation of the blocks?
I use this:
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg445.imageshack.us%2Fimg445%2F6899%2Fsamplecfetch7kj.jpg&hash=cc8e5e6a5b229778fd78cd6379a06886204ac87f)
And the code is:Code: [Select]<?php
echo '
<style type="text/css"><!--
.test1 { border-width:0px;}
--></style>';
echo '<div align="center">';
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/coppermine");
echo ' <div align="center">';
echo ' <b><u>Stats</u></b><br>';
$objCpm->cpm_formatStats("Albums: <b>%a</b> <br> Images: <b>%f</b> <br> Clicks: <b>%v</b> <br> Comments: <b>%n</b> <br><br>");
echo '</div>';
echo ' <b><u>Last Image</u></b><br>';
$options = array( 'subtitle' => '<b>%a</b> <br> Name: <b>%t</b> Author: <b>%o</b> <br> Here since <b>%D</b> days <br> Clicks: <b>%h</b> <br> Score: <b>%V</b>' , "imagestyle" => "test1");
$objCpm->cpm_viewLastAddedMedia(1,1,$options,);
//$objCpm->cpm_close();
echo'</div>';
?>
I just need to eliminate the double slashed (//). Is there any way to get the fix for that?
By the way... supurb script.
Using cpm 1.33, phpbb 2.0.15, cpmfetch 1.6.2
The problem appears to be that when using the cpm-phpbb bridge all user info is actually stored in the phpbb database leaving the cpm users table storing only an admin user. This causes problems in cpmfetch_dao wherein resultsets are generated joining the pictures and users tables on the user_id (select ...... where .... AND p.owner_id = u.user_id) because the users table is essentially empty, which of course yields an empty set.
I'm not a php expert and certainly not overly familiar with the cpmfetch code so I'm not sure how difficult it would be to get the code to join against the phpbb_users table instead of the cpg table.
Thanks
Hi Dear Vuud
Ive tried this but didnt succeed, wht ive done is
1) joomla : in root
2) CPG 1 gallery : site.com/gallery1
3) CPG 1 gallery : site.com/gallery2
& ive made 2 cpmfetch folders in root like :
1) www.site.com/cpmfetch ( in cpmfetch.php ive chnge path to gallery1 )
2) www.site.com/cpmfetch1 ( in cpmfetch.php ive chnge path to gallery2 )
Now as u told ive paste tag (this pics was actually in table)Code: [Select]<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="middle">
<th scope="col"><?php
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
?></th>
<th scope="col"> </th>
</tr>
<tr align="center" valign="middle">
<th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
</th>
<th scope="col"><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
</th>
</tr>
<tr align="center" valign="middle">
<td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
<div align="center"></div>
<div align="center"></div></td>
<td><?php $objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2"); ?>
<div align="center"></div></td>
</tr>
</table><?php $objCpm1->cpm_close(); ?>
Before & after pasting this gallery 1 was working fine but the gallery 2 shows this error
Fatal error: Cannot redeclare class cpm_dao in /home/SITENAME/public_html/cpmfetch1/cpmfetch_dao.php on line 22
Please suggest :)
Regards
Rahul
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_close();
include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_close();
$objCpm2->cpm_close();
Thanks for posting this! I have no idea what the tables are over there so this helps.
Thanks again for the contribution
How do i make it that One photo from the album is showing for a catogory instead of all the pictures?
here's my code
<head>
<style type="text/css">
BODY { MARGIN: 0px; font-size: 9px; font-family:tahoma; color:#000000; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}
I{COLOR:#DCDCDC}
B{COLOR:#C4EADF}
U{COLOR:#F2C280}
LI {FONT-SIZE: 9px; font-family:tahoma; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}
A:link {FONT-WEIGHT:bold; COLOR:#7ADBE2;TEXT-DECORATION:none}
A:visited {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION:none}
A:active {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION: none}
A:hover {FONT-WEIGHT:bold;COLOR:#FFFFFF; TEXT-DECORATION: none;}
TR {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
TD {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
}
</style>
<style type="text/css">
.test1 { border-style:solid;
border-width:0px;
border-color: #FFFFFF;
margin: 1px;
background: #FFFFFF; }
</style>
</head>
<body>
<center>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank-js"));
$objCpm->cpm_close();
?>
</center>
You are very welcome! It just so happened that user_id is the same for the CPG tables as it is for the phpbb tables. There are some other very common items also.
I was looking for some abstraction or functions which would get the particular items from the database, but I didn't find them. My guess is that the ultimate change would be to have your cpmfetch functions to use coppermine bridge routines. This was as people make new bridges, cpmfetch will go along for the ride and will just work too.
I've done more testing and all that I've tested seems to work.
I did see that the number of views in cftest.php did not work, but they also didn't work in the raw cpmfetch 1.6.2 code which I downloaded either. ;)
I hope someone will find this useful as I know there are a lot of people using phpbb.
What? the number of views for a photo was / is not working?
I understand what you are saying about the database. If I was better at db work, I would volunteer to help, but I'm not! ;)
If you run cftest.php, Under the test thumbnail grid, 'Views' always shows 0. Even on my test installation which does not have any phpbb installed. I noticed that the code had %V instead of %v, I tried to change it to %v, but it didn't seem to work. However, I didn't do much more testing than that.
If you want to deal with the manual install... the next version is a whole re-write of the option and directory handling.
I hate writting installers.
hate it.
Thanks for your response vuud. Hope your holidays were good to you.
I don't mind a manual install for now. If you have the time, I have the time. :)
If not, then I can wait. Whatever is easiest on you.
By the way, is it possible to make a financial donation for this?
Like how the person did this http://www.slave4u.com/celebrities/latest.php
Do you mean the photo the coppermine photo gallery shows for that category?
Ah sorry... that sets the table html tag to have class="test1". So for you it does nothing.
I should have removed it... it means nothing to you unless you want to add test1 to you stylesheet
Hope its all better
Call this dumb but when I remove it, It said (PHP) that I had an error on that line b/c I remove the test1 O_o Werid! But I put it back and it works there no test1 in my CSS at all. Also is there a way to make the image be change ever day or with in a time period of hours?
Like how the person did this http://www.slave4u.com/celebrities/latest.php
They show One image from the category i think it's the first picture/or latest from the album, Instead of having all the pictures.
Like:No no, like what i ment was. I have selected cat's 43 44 45 46 47 48 and 49. Each time i add new files, all the filies are showen. What i want is One file from each album shown instead of all of them. Such as the link i posted before, where the first picture is shown with the album while when you click on it.. there's is the full set.
cpm_viewLastAddedMediaFrom ( 1, 1, "cat=48");
This would use category 48
<head>
<style type="text/css">
BODY { MARGIN: 0px; font-size: 9px; font-family:tahoma; color:#000000; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}
I{COLOR:#DCDCDC}
B{COLOR:#C4EADF}
U{COLOR:#F2C280}
LI {FONT-SIZE: 9px; font-family:tahoma; letter-spacing: 0px; font-weight: none; text-align: lest; line-height:1.1}
A:link {FONT-WEIGHT:bold; COLOR:#7ADBE2;TEXT-DECORATION:none}
A:visited {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION:none}
A:active {FONT-WEIGHT:bold;COLOR:#7ADBE2; TEXT-DECORATION: none}
A:hover {FONT-WEIGHT:bold;COLOR:#FFFFFF; TEXT-DECORATION: none;}
TR {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
TD {font-size: 9px; font-family:tahoma; color:#ADADAD; letter-spacing: 0px; font-weight: none; text-align: center; line-height:1.1}
}
</style>
<style type="text/css">
.test1 { border-style:solid;
border-width:0px;
border-color: #FFFFFF;
margin: 1px;
background: #FFFFFF; }
</style>
</head>
<body>
<center>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("cat"=>"43,44,45,46,47,48,49,", "subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank"));
$objCpm->cpm_close();
?>
</center>
Try this (for lack of anything better to suggest)
$objCpm->cpm_viewRandomMediaFromAlbum(1, 1, 28, $options);
I could not get to your site as mysite.com... or is that just an example?
I remember poking at your site I think (you PM'd me right?) and thought it all looked okay (at least that it should work)
You must have messed up the options array format when you removed it then.
Creating a syntax error.
Post the broken line if you want to remove it... But make sure you are removing both parts of the test1 entry... the key and the value.
This is great, but I either messed up when I told you (I am too tired to go back and check) or you missed one important part.
If I strip out all the annoying html code in there we have thisCode: [Select]include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery2');
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_close();
I have this sense of deja vu, so forgive me if I went over this before
If you want to display images from two different galleries on the same page, you could do it like this:Code: [Select]include "./cpmfetch1/cpmfetch.php";
$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm2->cpm_viewRandomMediaFrom(1,1,"cat=2");
$objCpm1->cpm_close();
$objCpm2->cpm_close();
Notice I created an $objCpm1 and $objCpm2?
You should only need a include "./cpmfetch/cpmfetch.php";
Both can work out of that.
No no, like what i ment was. I have selected cat's 43 44 45 46 47 48 and 49. Each time i add new files, all the filies are showen. What i want is One file from each album shown instead of all of them. Such as the link i posted before, where the first picture is shown with the album while when you click on it.. there's is the full set.Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(30,1,array("cat"=>"43,44,45,46,47,48,49,", "subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank"));
$objCpm->cpm_close();
?>
</center>
$options = array("subtitle" => "%a", "tablestyle" => "test1","imagestyle" => "test1" , "windowtarget" => "_blank");
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=41",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=42",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=43",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=44",$options);
$objCpm->cpm_viewLastAddedMediaFrom(1,1,"cat=44",$options);
This is the code
------
<?php
include "./CopperMineFetch/cpmfetch.php";
$objCpm = new cpm("/Galleries");
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","imagestyle" => "RandomImageBorder"));
$objCpm->cpm_close();
?>
--------
Is it also possible to make the image gernal daily or with in a hourly time frame?
Tell me few answers :-
1) In root directory ive to make 2 cpmfetch folders or 1 (ex. site.com/cpmfetch & site.com/cpmfetch1)
2) In cpmfetch.php ive to edit or gallery path or not If yes then > ( if copy 2 cpmfetch folders as describe in No.1 ive to edit both cpmfetch.php the real path to gallery)
Test it on your site also if possible please send me link i want to have a look
Hi Vuud, im back again.
Switched webhost from IIS to Apache. (special for fetch :P)
But again I seem to have a problem with Fetch. At first it was giving me an opendir error, but
after moving the Fetch files to the root it was ok. But still im not getting any images ?
Got time to help me a bit ?
Running latest version of Joomla/Coppermine/Copperminefetch PHP5/Apache2
Cheers (again :-[)
No, you should not have to. Use a normal verson of cpmfetch
In most cases no. The "/gallery" thing
$objCpm1 = new cpm('/gallery1');
$objCpm2 = new cpm('/gallery2');
Tells it where to find stuff. Including copies is not going to do anything.
I don't have two galleries running on my site to try this on unfortunately. But there is no reason why it does not work.
<?php include "./cpmfetch/cpmfetch.php"; $objCpm1 = new cpm('/wallpaper'); $objCpm2 = new cpm('/gallery'); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm1->cpm_close(); $objCpm2->cpm_close(); ?>
Vuud:
Tnx for the reply.
Yes I am bridged with Joomla, but have also tested it without the bridge. Didnt work.
Dear ive usedCode: [Select]<?php include "./cpmfetch/cpmfetch.php"; $objCpm1 = new cpm('/free-desktop-wallpaper'); $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm1->cpm_viewRandomMediaFrom(2,2,"cat=2"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm1->cpm_close(); $objCpm2->cpm_close(); ?>
PLease check my site www.funcyber.com front page, im online now for next 30 minutes, its only showing wallpapers gallery (gallery1 ) not the other , see bottom of page
my yahoo id is kaushalrahul@yahoo.com if possible come on chat
Regards
Wierd... that should work fine. Try taking out the gallery 1 stuff just to see if gallery2 stuff starts working.
There should be no problem doing this, so lets see if we can get just the humor one working
Ive paste this
<?php include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_close(); ?>
humor Gallery is not shown up on bottom its empty
Ive paste this
<?php include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_close(); ?>
humor Gallery is not shown up on bottom its empty
Bizarre.
Add this in before the include
error_reporting(E_ALL);
ini_set('display_errors',1);
Try adding in this call before you try to get the images back
$objCpm2->cpm_listMediaCount();
just to see if it is finding the database.
I dont expect this to fix anything, but maybe will give us and idea as to what is screwy
this ive paste :
<?php error_reporting(E_ALL);
ini_set('display_errors',1); include "./cpmfetch/cpmfetch.php"; $objCpm2 = new cpm('/humor-photo-gallery'); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_viewRandomMediaFrom(2,2,"cat=3"); $objCpm2->cpm_listMediaCount(); $objCpm2->cpm_close(); ?>
Results : -
260
I am going to bet that the second one is bridged with something. But I've not heard back from you on what / if it is. All the symptoms point to that.
Sorry to say it is bridged with Joomla/mambo, you didnt ask me earlier
Now what to do ??
Yes, I did.
http://forum.coppermine-gallery.net/index.php?topic=19564.msg118356#msg118356
How many Joomba users do you have that add photos?
If its a few, just start adding some fake users into coppermine.
If its many, wait about 1-2 weeks for the new version which will handle bridged cases better
Currently im only adding all pics through 2 different logins & in future it'll be open for general public to add pics
How do you show latest album?
Latest added album
I updated my CPG and Cpmfethch comes up with this
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site12/fst/var/www/html/cpmfetch/cpmfetch_dao.php on line 710
I understand what you are saying about the database. If I was better at db work, I would volunteer to help, but I'm not! ;)
If you run cftest.php, Under the test thumbnail grid, 'Views' always shows 0. Even on my test installation which does not have any phpbb installed. I noticed that the code had %V instead of %v, I tried to change it to %v, but it didn't seem to work. However, I didn't do much more testing than that.
"subtitle" => "%o<br>%V views",
"subtitle" => "%o<br>%h views",
I did what the release notes had and now i get
You have an error in your SQL syntax near 'FROM cpg143_pictures as p, cpg143_albums as a, cpg143_users AS u where p.aid =' at line 1
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtual/site12/fst/var/www/html/cpmfetch/cpmfetch_dao.php on line 713
Okay I'm not sure how posting here works, but I've got a big problem.
Seen I've just got hold of CpmFetch I don't really know much about it and would like some help setting it up.
I've installed it and got the test file working with my CPG.
The problem is that I have my CPG briged with my PHPBB board and the little info I got from searching says there's a big problem with this, but I don't know if this has been solved or not?
Hi Vuud, I got it to work. Dont know how I did it, but it works.
Only problem i have is that im getting only 3 images shown.
Any idea what the problem could be ?
Okay I'm not sure how posting here works, but I've got a big problem.
Seen I've just got hold of CpmFetch I don't really know much about it and would like some help setting it up.
I've installed it and got the test file working with my CPG.
The problem is that I have my CPG briged with my PHPBB board and the little info I got from searching says there's a big problem with this, but I don't know if this has been solved or not?
Yes, you need to create users in cpmfetch... dummy users. Someone posted information on linking to phpbb somewhere here, but I have not tried it.
You should be able to find lots of posts on this here.
I have over 300 members I don't really want to do that.
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
change it to the following: $this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
u.user_id
phpbb.user_id
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in cpmfetch_dao.php on line 710
Trying to install the latest version and i get the following:
Is it supposed to be like this?
var $topPercentForTopRated = 10;
/*
var $topPercentForMostViewed = 25;
*/
// This is for CPG versions prior to 1.4
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/
// This is for CPG v 1.4.1 beta 1
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
*/
I have the same problem as sigepjedi - the script does not work!
Is there no solution?!
Strange... can you tell me where you saw that owner or author was a valid tag for the source block?
<?php
include "./cpmfetch/cpmfetch.php";
$authgal = $curauth->display_name; // Returns author name for $Source
$objCpm = new cpm('/photo');
$objCpm->cpm_viewRandomMediaFrom(3,4,"owner=$authgal");
$objCpm->cpm_close();
?>
if ($thisguysalbum != '') {
// add cpfetch stuff to obtain galleries
}
echo "No Album Available";
How many did you expect?
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch_dao.php on line 710
include "/web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array( "imagestyle" => "test1", "linkstyle","imagesize" => "int","imagewidth" => 140 );
$objCpm->cpm_viewRandomMedia(1,1,$styleguide);
Well im using the following code:
<?php
include "./cpmfetch.php";
$objCpm = new cpm("/flix");
$objCpm->cpm_viewLastAddedMedia(1,5);
$objCpm->cpm_close();
?>
So I'm supposed to get 5 images back right ? Im only getting 3 images, and always the same images.
Hello,
I've upgrade coppermine from version 1.3 to 1.4.3 and after cpmfetch don't display the random image. The browser display this text:
My code is:Code: [Select]include "/web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array( "imagestyle" => "test1", "linkstyle","imagesize" => "int","imagewidth" => 140 );
$objCpm->cpm_viewRandomMedia(1,1,$styleguide);
The page that show the error is: http://www.pedrosite.it (http://www.pedrosite.it)
Thaks for the help!
Antonio.
This is probably a stupid question, but do you have more than 3 publically available images? The behavior is to stop displaying when it runs out, which would explain the lack of 5.
Are you bridged and added cpg users? Maybe you did not add enough?
Inquiring minds.
First, I want to thank vuud for an incredible add on to Coppermine! :D
My Coppermine 1.3.5 is bridged with phpbb 2.0.18.
I have a bunch of users in my phpbb forum (about 100) and thought this 'make up some fake users in the Coppermine database' was just too much work for me (lazyness is the mother of most of my coding), so I thought take this as a 'hint' by vuud to what may be a minimal change to the code to allow it to work with the PHPBB database.
First (and this is important), I have both my coppermine and my phpbb data in the same mysql database. My phpbb database has a phpbb prefix (i.e. phpbb_). This is important to allow this 'hack' to work!
I made some rather simple-minded changes to cpmfetch_dao.php in an attempt to get CpmFetch 1.6.2 to work with PHPBB 2.0.18.
Note, at this time, I'm using Coppermine version 1.3.5. I have NOT tested this yet with Coppermine 1.4.2.
I haven't done any significant testing, but it seems to work and cftest.php works too. ;)
open cpmfetch.dao.php and find line:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
change it to the following:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
note! If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.
THEN, find every occurance of u.user_id and change it to phpbb.user_id
Save cpmfetch_dao.php and then try cftest.php.
If you get a chance to try this with Coppermine 1.4.2 bridge with PHPBB 2.0.18 and it works ok, I'd appreciate someone letting me know. If I get a chance to upgrade to cpg 1.4.2 myself, I'll let you know.
i have the same problem test page has no errors and no pictures
1. version of coppermine 1.4.2
2. website http://hot-rain.ca/cmcforum/index.php and gallery http://www.hot-rain.ca/cmcgallery/
3. problem http://www.hot-rain.ca/cmcgallery/cpmfetch/cftest.php
4. Inbetween newbie, intermediate
5. Apache/1.3.34 (Unix) taken from line 40 of cftest.php
6. code used for image blockCode: [Select]echo '<div align="right">';
same thing nothing no error no image
include "../cmcgallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cmcgallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
echo '</div>';
13.2. I have my pages and gallery on different subdomains... will CpmFetch work?
I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.
var $topPercentForMostViewed = 25;
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
Hi all,
This evening i have upgraded from cpm 1.3.x to 1.4.3. It is bridged to phpbb2.0.19.
Using cpmfetch 1.6.2, i get no errors on the cftest.php, but there are no images - 'view source' just shows a series of 'tr' and 'table' tags.
I've tried all the suggestions in previous replies to this topic without luck, but also noticed that there is no mention of this specific grouping of program versions.
Any clues?
Many thanks,
Martyn
Hey I found out how CPMFETCH can work on the latest CPG.
Remove all the */ and the /* from line 54 to 59. It should look like thisCode: [Select]var $topPercentForMostViewed = 25;
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
I did it and it work perfectly now :D
Hi Vuud,
Your docs state:
For one reason or another, I have had to move my website off of the server that is hosting coppermine (and off the subdomain). I am trying to configure cpmFetch but I can't get through the test page (step 80 fails) since it can't find the configuration file for coppermine (it uses the document root I believe).
Is what I am trying to do possible? Last resort is moving coppermine to the new server, which I will do if necessary.
Thanks,
dukuduku
Any ideas on my question vuud ? if you have the time.
Hey I found out how CPMFETCH can work on the latest CPG.
Remove all the */ and the /* from line 54 to 59. It should look like thisCode: [Select]var $topPercentForMostViewed = 25;
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
I did it and it work perfectly now :D
You are the man it works as well with cpg 1.4.3 bridged with phpbb Plus 1.5
thanks a lot
Tnx for the reply.
Could you tell me where the "html" gets spitted out with the thumb. Maybe i can add a transparant image there.
I tried with the CSS positioning, but then the image gets placed BEHIND the thumb, so that wasnt very useful :P
And is it possible to change the size of the thumbs ?
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dophan2/public_html/cpmfetch/cpmfetch_dao.php on line 710
Just installed CpmFetch 1.6.2 and I get an error message while running http://www.dophan.com/cpmfetch/cftest.php (http://www.dophan.com/cpmfetch/cftest.php)Code: [Select]Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dophan2/public_html/cpmfetch/cpmfetch_dao.php on line 710
I run CPG 1.4.3.
Website: http://www.dophan.com
Coppermine gallery: http://www.dophan.com/photos/
Did I overlook something?
Any ideas on my question vuud ? if you have the time.
The docs are full of lies I tell you. I hate the docs more than most of the things I hate. And thats a lot.Hey, at least you HAVE docs! And lies are easily changed to... non-lies. (I was going to say truths, but that is getting a bit too philosophical!)
Anyway, if you are on a completely different domain, you can access if using the SSI techniques that seem to work the best. Sometimes you can call it from PHP... The big thing is to have it working on the server you have CPG on and then start trying to remotely get data. See the SSI thread for some more ideas on it.
Hope that helps some
Hey, at least you HAVE docs! And lies are easily changed to... non-lies. (I was going to say truths, but that is getting a bit too philosophical!)
I think going the SSI route is not worth the investment for me at this point. I will probably just move coppermine and the gigs of pictures to the temporary server as we are still somewhat under development.
Cheers,
dukuduku
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
(If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.)Hi all,
Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.
Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.
>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)
>Find:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
>Replace with:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
(If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.)
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.
Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!
Keep up the good work - loving this addon to Coppermine!
Yes, this is just what I did to get CpmFetch to work with PHPBB 2.0.18 and 2.0.19. Thanks for confirming this to the group! :D I'm sure this will help others too. It may want to be it's own thread! ;)
If everyone who is running a bridge can send me the table format for the userid I will work it out so some of the data becomes available.
CREATE TABLE `phpbb_users` (
`user_id` mediumint(8) NOT NULL default '0',
`user_active` tinyint(1) default '1',
`username` varchar(25) NOT NULL default '',
`user_password` varchar(32) NOT NULL default '',
`user_session_time` int(11) NOT NULL default '0',
`user_session_page` smallint(5) NOT NULL default '0',
`user_lastvisit` int(11) NOT NULL default '0',
`user_regdate` int(11) NOT NULL default '0',
`user_level` tinyint(4) default '0',
`user_posts` mediumint(8) unsigned NOT NULL default '0',
`user_timezone` decimal(5,2) NOT NULL default '0.00',
`user_style` tinyint(4) default NULL,
`user_lang` varchar(255) default NULL,
`user_dateformat` varchar(14) NOT NULL default 'd M Y H:i',
`user_new_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_unread_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_last_privmsg` int(11) NOT NULL default '0',
`user_emailtime` int(11) default NULL,
`user_viewemail` tinyint(1) default NULL,
`user_attachsig` tinyint(1) default NULL,
`user_allowhtml` tinyint(1) default '1',
`user_allowbbcode` tinyint(1) default '1',
`user_allowsmile` tinyint(1) default '1',
`user_allowavatar` tinyint(1) NOT NULL default '1',
`user_allow_pm` tinyint(1) NOT NULL default '1',
`user_allow_viewonline` tinyint(1) NOT NULL default '1',
`user_notify` tinyint(1) NOT NULL default '1',
`user_notify_pm` tinyint(1) NOT NULL default '0',
`user_popup_pm` tinyint(1) NOT NULL default '0',
`user_rank` int(11) default '0',
`user_avatar` varchar(100) default NULL,
`user_avatar_type` tinyint(4) NOT NULL default '0',
`user_email` varchar(255) default NULL,
`user_icq` varchar(15) default NULL,
`user_website` varchar(100) default NULL,
`user_from` varchar(100) default NULL,
`user_sig` text,
`user_sig_bbcode_uid` varchar(10) default NULL,
`user_aim` varchar(255) default NULL,
`user_yim` varchar(255) default NULL,
`user_msnm` varchar(255) default NULL,
`user_occ` varchar(100) default NULL,
`user_interests` varchar(255) default NULL,
`user_actkey` varchar(32) default NULL,
`user_newpasswd` varchar(32) default NULL,
`user_login_tries` smallint(5) unsigned NOT NULL default '0',
`user_last_login_try` int(11) NOT NULL default '0',
PRIMARY KEY (`user_id`),
KEY `user_session_time` (`user_session_time`)
) TYPE=MyISAM;
Is this what you need?
This is from phpbb 2.0.19Code: [Select]CREATE TABLE `phpbb_users` (
`user_id` mediumint(8) NOT NULL default '0',
`user_active` tinyint(1) default '1',
`username` varchar(25) NOT NULL default '',
`user_password` varchar(32) NOT NULL default '',
`user_session_time` int(11) NOT NULL default '0',
`user_session_page` smallint(5) NOT NULL default '0',
`user_lastvisit` int(11) NOT NULL default '0',
`user_regdate` int(11) NOT NULL default '0',
`user_level` tinyint(4) default '0',
`user_posts` mediumint(8) unsigned NOT NULL default '0',
`user_timezone` decimal(5,2) NOT NULL default '0.00',
`user_style` tinyint(4) default NULL,
`user_lang` varchar(255) default NULL,
`user_dateformat` varchar(14) NOT NULL default 'd M Y H:i',
`user_new_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_unread_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_last_privmsg` int(11) NOT NULL default '0',
`user_emailtime` int(11) default NULL,
`user_viewemail` tinyint(1) default NULL,
`user_attachsig` tinyint(1) default NULL,
`user_allowhtml` tinyint(1) default '1',
`user_allowbbcode` tinyint(1) default '1',
`user_allowsmile` tinyint(1) default '1',
`user_allowavatar` tinyint(1) NOT NULL default '1',
`user_allow_pm` tinyint(1) NOT NULL default '1',
`user_allow_viewonline` tinyint(1) NOT NULL default '1',
`user_notify` tinyint(1) NOT NULL default '1',
`user_notify_pm` tinyint(1) NOT NULL default '0',
`user_popup_pm` tinyint(1) NOT NULL default '0',
`user_rank` int(11) default '0',
`user_avatar` varchar(100) default NULL,
`user_avatar_type` tinyint(4) NOT NULL default '0',
`user_email` varchar(255) default NULL,
`user_icq` varchar(15) default NULL,
`user_website` varchar(100) default NULL,
`user_from` varchar(100) default NULL,
`user_sig` text,
`user_sig_bbcode_uid` varchar(10) default NULL,
`user_aim` varchar(255) default NULL,
`user_yim` varchar(255) default NULL,
`user_msnm` varchar(255) default NULL,
`user_occ` varchar(100) default NULL,
`user_interests` varchar(255) default NULL,
`user_actkey` varchar(32) default NULL,
`user_newpasswd` varchar(32) default NULL,
`user_login_tries` smallint(5) unsigned NOT NULL default '0',
`user_last_login_try` int(11) NOT NULL default '0',
PRIMARY KEY (`user_id`),
KEY `user_session_time` (`user_session_time`)
) TYPE=MyISAM;
I hope this helps you.
Hi all,
Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.
Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.
>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)
>Find:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
>Replace with:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
(If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.)
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.
Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!
Keep up the good work - loving this addon to Coppermine!
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG versions prior to 1.4
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/
// This is for CPG v 1.4.1 beta 1
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
*/
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
CODE: QUICKFIX FOR PEOPLE WANTING TO USE CPG BETA 1.4.1
(SAME NOTE AS RELEASE 1.6.0)
========================================
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want. This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.
I hope to have a development version out in a few days to permanently address this change.
echo '<div align="right">';
include "/var/www/html/photogallery/ssi/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photogallery");
//$objCpm->cpm_viewRandomMedia(5,1);
//$objCpm->cpm_viewLastAddedMedia (5,1);
//$objCpm->cpm_viewLastAddedMediaFrom (5,1, "cat=1");
//$objCpm->cpm_viewLastAddedMediaFromCategory (5, 1, 1);
//$objCpm->cpm_viewRandomMediaFrom(5,1,"cat=1");
$objCpm->cpm_viewLastAddedMediaFromCategory(18,1,2);
$objCpm->cpm_close();
echo '</div>';
Dear CPG peoples!
I've been searching the forum for an hour without success
my name is reSet Sakrecoer and i've been using your softwar for some time now.
I just installed a cpg 1.4.3 to our server on barcelona_hq.micromusic.net
it works brilliant i love all the new features!
Still one thing bothers me, in 1.3, coppermine used quicktime to display mp3's, now aday its microsoft Mplayer.
Since the Microsoft player is completley out of control on macintoshs, i realy wonder why you chose this. Quicktime works the same on any station? see i'm no wizz about best compression and best thhis or that... i timidely think "compatibilty"
Now i've noticed some people get mad when peoples are requesting about other features than picture related, and i hope i wont bother them. But i would love to know how i can make it use the quictime player again :)
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/album");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>
<iframe src="viewPhoto.php" width="225" height="195"></iframe>
<?php
include "cpmfetch.php";
$objCpm = new cpm('/library');
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","subtitle" =>"This photo is from the %a album","imagesize" => "thumb","imagestyle" => "test1"));
$objCpm->cpm_close();
?>
Hello,
I am trying to get version 1.6.2 to work correctly on my church's website.
I have created a file containing the following code:Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/album");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>
I am calling it from my newIndex.html with the following code:Code: [Select]<iframe src="viewPhoto.php" width="225" height="195"></iframe>
Everything appears to be working correctly at first, but when the thumbnail is clicked on, instead of going to the larger photo in Coppermine I get my homepage displayed in the iframe instead.
I am using Coppermine 1.4.3 on Firefox.
Thanks in advance for any help.
"windowtarget" => "_parent"
to fix it.
$options = array( 'subtitle' => 'Image name= %t, <br>Cap Description = %c ' );
$objCpm->cpm_viewLastAddedMedia (2,4,$options);
Pete,
What is means is to find this code:Code: [Select]// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
and change it to this:Code: [Select]// This is for CPG versions prior to 1.4
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/
THEN
Find the lines:Code: [Select]// This is for CPG v 1.4.1 beta 1
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
*/
and change it to this:Code: [Select]// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
So you are turning off the first bit of code by turning it into a comment
and then you are enabling the second bit of code by removing the start and end comment delimiters.
The actual instructions for doing this are in the release notes, this is what it says:
Does this help at all?
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');
// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomTopRatedMediaFrom('cat=3',1,1,$options);
// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");
$objCpm->cpm_close();
?>
<table><tr></tr></table>
I have an earlier version of PHPBB and this dosen't work could this be that "phpbb_users" is diffrent?
Sorry, I have been building and installing a router for the past few days. I've been getting home at 2am, and getting up and heading back.
back home? ;-)
Yeah, I am back... How is your problem? Sometimes these things have a way of resolving themselves...
:)
error message:
when i open the page where the CPMFETCH should display an image i get this error
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
(path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710
On my CPMFETCH TEST page
i see all PASS and INFO. There are NO failures in the test but i do get this at the bottom
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in (path info specific to my site)/cpmfetch/cpmfetch_dao.php on line 710
Hi all,
Solved my problem now - didn't fully read what i needed to do from the suggestions already posted.
Hence I can confirm that the following modifications will enable cpmfetch1.6.2 to work with cpm1.4.3 bridged to phpbb2.0.19.
>Open cpmfetch_dao.php
>Comment out line 57
>Remove comments from around line 62 (As per the instructions in the release notes!)
>Find:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
>Replace with:Code: [Select]$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
(If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.)
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";
>Find every occurance of u.user_id and change it to phpbb.user_id. (This is the step I failed to read!)
>Save cpmfetch_dao.php and then try cftest.php.
Many thanks to all - just thought it would be good to present the entire solution in one place - hopefully i've not made a mistake in trying to remember what i did to make it all work together!
Keep up the good work - loving this addon to Coppermine!
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /mounted-storage/home10/sub002/sc16206-UEQL/babez.dk/cpmfetch/cpmfetch_dao.php on line 710
Error as dropmachine. But i keep following this topic, and hope that someday there will be a fix!Same problem as younk and dropmachine!
Unknown column 'u.user_website' in 'field list'
I hope that there will be a fix, too!
Thx for any help!
CODE: QUICKFIX FOR PEOPLE WANTING TO USE CPG BETA 1.4.1
(SAME NOTE AS RELEASE 1.6.0)
========================================
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want. This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section.
CpmFetch Install test page
Thank you for using CpmFetch 1.6.2
A series of checks is displayed below... These will help you determine where a problem is if one occurs. Mostly they will help me when you ask for help... but I strongly encourage you to try to fix it yourself - that leaves me more time for improvements. Some of them are purely informational.
Tests:
5 You set your partial URL to / PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux kryton 2.6.10 #1 Fri Dec 31 06:35:26 CET 2004 i686 INFO
40 WebServer = Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.3.11 mod_ssl/2.8.9 OpenSSL/0.9.6c DAV/1.0.3 INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/pete/photos.pelhrim.cz INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/pete/photos.pelhrim.cz/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
[u]Nezn-Bámŭ sloupec 'u.user_website' v field list
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/pete/photos.pelhrim.cz/cpmfetch/cpmfetch_dao.php on line 710[/u]
If you do not see thumbnails, or get more warnings then something is pretty wrong. As long as you are using standard prefixes in Coppermine, you should see everything. If you are not using standard prefixes, then you need to adjust them by editing the first three variables in the cpmfetch.php file.
If everything looks good, and you get everything else working, I recommend removing this file, or making it non-executable. No need to allow access into a phpinfo tag if you dont have to.
For further help and in general more information, please see the help pages for CoppermineFetch.
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=67");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=64");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=60");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=59");
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=58");
See this message to fix the unknow column error.
- http://forum.coppermine-gallery.net/index.php?topic=19528.msg131918#msg131918
5 You set your partial URL to /bilder PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux cigar 2.6.11.4-21.9-smp #1 SMP Fri Aug 19 11:58:59 UTC 2005 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/www/domain/www.domain.de/htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/www/domain/www.domain.de/htdocs/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
<?
error_reporting(E_ALL);
ini_set('display_errors',1);
include "cpmfetch.php";
$objCpm = new cpm('/bilder');
$objCpm->cpm_viewRandomMedia (1,4,"");
$objCpm->cpm_close();
?>
>:( >:( >:( >:(
So is this issue with Line 710 Fixed or not? I can't get a straight answer out of anybody, and it seems nobody is posting anything that works.
Getting pretty frustrated....
$objCpm = new cpm('/gallery');
$options = array( 'subtitle' => Album: %a');
$objCpm->cpm_viewRandomMedia(1,1,$options);
$objCpm->cpm_close();
This 710 line is fixed but I get another error as stated in a reply above (Fatal error...).
Morgan
Can you tell me what the fix is? I have yet to figur eit out.
Thanks very much!
I've read through some documents and have not found an answer to my question. I have a rating script that has its own page. I was unable to get this script to run exclusively on my main page without the catlist and alblist, so I thought I could create a new index page just for the rating script and use cpmfetch to get the data.
Can cpmfetch get other type of data that was not orginaly part of coppermine or grab the anycontent file. My site is www.ratemyscrapbook.net (http://www.ratemyscrapbook.net). Thanks
Like what for example?
Vuud
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource ..... cpmfetch_dao.php on line 710
Anyone any ideas? Thanks a lot!
When I run de cpmfetch/cftest.php i get this error:
I have search this forum but i didn't found a solution.
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in ....wwwroot\cpmfetch\cpmfetch_dao.php on line 710
Kind Regards.
Inca
Tests:
5 You set your partial URL to /monica/gallery/ PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux frost.securenet-server.net 2.4.21-37.0.1.ELsmp #1 SMP Thu Jan 19 14:12:32 EST 2006 i686 INFO
40 WebServer = Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a PHP-CGI/0.1b INFO
45 PHP Version = 5.0.4 INFO
55 DOCUMENT_ROOT: /home/xmex/public_html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/xmex/public_html/monica/gallery/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS
Trying to display some images:
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
this is the Error:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/xmex/public_html/monica/gallery/cpmfetch/cpmfetch_dao.php on line 710
hello i just installed this... but i get an error!! :
(..deleted..)Code: [Select]this is the Error:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/xmex/public_html/monica/gallery/cpmfetch/cpmfetch_dao.php on line 710
what did i do wrong??
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
Warning: main(./cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 2
Warning: main(./cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 2
Warning: main() [function.include]: Failed opening './cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 2
Fatal error: Class 'cpm' not found in /home/xmex/public_html/monica/gallery/cpmfetch/gallery.php on line 3
$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
Produces in output source code:<table >
<tr>
</tr>
<tr>
</tr>
</table>
OK... lets try this again...
A new install of CpmFetch... trying the simple case first - in same subdomain as the gallery... Using cftest.php, all tests passing - but no images produced...
Statement:Code: [Select]$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
Produces in output source code:Code: [Select]<table >
<tr>
</tr>
<tr>
</tr>
</table>
No other diagnostic messages produced...
The cftest.php script is unchanged except for the required variable (set to '/")... It already has the suggested diagnostics on.
Suggestions?
http://gallery.skymasters.org/cpmfetch/cftest.php - is test script.
http://gallery.skymasters.org - is the gallery
Thanks!
Greg
Greg they way i fixed that was
i add 2 dots (..) instead of one..
so it should look somthing like this
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("../gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
it worked for me i had the same problem u did...
Hi vuud,
Do you have any idea when and if you are going to add a "media by keyword" string ?
I think it would be usefull for alot of people :D
Cheers !
Auto Generated:
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
Auto Generated:
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
<p>
Corrected:
<table >
<tr>
<td><a href="/displayimage.php?pos=-308" ><img src="/albums/airshows/2005thunder/thumb_d05_4711.jpg" alt="d05_4711.jpg" title="d05_4711.jpg" /></a><br /></td>
...
Auto Generated:
<?php
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/../gallery');
$objCpm->cpm_OverrideUrlToCoppermine("http://gallery.gmcdesign.com/");
$objCpm->cpm_setDebugMode('true');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
require_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photos");
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/coppermine");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
and at first I had the error Unknown column 'u.user_website' in 'field list'. On following another tip about changing the /* */ around I've lost the error but it's not displaying any images./*
commented stuff here
*/
/home/user/rootdirectory/
/home/.otherthing/user/rootdirectory/
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
*/
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
*/
// This is for CPG versions prior to 1.4
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
I just installed cpmfetch and ran the test page and got the following results and error message:
http://www.mypreciouspaws.net/cpmfetch/cpmfetch/cftest.php
...
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /cpmfetch/cpmfetch/cpmfetch_dao.php on line 710
...
...
look at lines 55-65 in the dao file you will find these lines
// This is for CPG versions prior to 1.4
/*
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
*/
// This is for CPG v 1.4.1 beta 1
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
switch these /* */ to the opposite one and it will fix it.
$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
and producing output in page source of:<p><span class='subtitle'>Trying to display some images:</span></p>
<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p><!-- SQL : SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email FROM sk_cpg_pictures as p, sk_cpg_albums as a, sk_cpg_users AS u WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES' and a.visibility = 0 ORDER BY rand(836697) LIMIT 6
ROWS: 0
--><table >
<tr>
</tr>
<tr>
</tr>
</table>
Similar results in other tests as well...Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /cpmfetch/cpmfetch/cpmfetch_dao.php on line 710
After reading gmc's tip i found the /* */ on a different location (between the beta part)Because of the way its coded - two variable assignment statements - removing all the comment tags (/* */) happens to work as well... It first assigns the old (pre 1.4) values - then reassigns the new (1.4+) values...
I switched the position but got a parsing error.
After deleting the two /* */ i had no problems at all and the image from my gallery was there ;)
Just my two cents
Hi Friends,
...
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bollyin/public_html/fatch/cpmfetch_dao.php on line 710
...
Thanks
I hope some one will help me...
Nishant
<?php
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
$objCpm->cpm_close();
?>
Still not able to display images at all in one of my installations, an empty table is produced...
Added "$objCpm->cpm_setDebugMode('true');" to the script, and appears it is finding 0 rows....
SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email FROM sk_cpg_pictures as p, sk_cpg_albums as a, sk_cpg_users AS u WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES' and a.visibility = 0 ORDER BY rand(836697) LIMIT 6
The WHERE clause eliminating all the rows was "p.owner_id = u.user_id"UPDATE `sk_cpg_pictures` SET `owner_id` = '1';
<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p>
<table >
<tr>
<td class="photoclip"><a href="/displayimage.php?pos=-422" class="photoclip" ><img src="//albums/pictures/2005events/thumb_D05_1976.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-49" class="photoclip" ><img src="//albums/pictures/2001/thumb_slootto.jpg" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" /></a><br /><br />skymasters<br>2.8 views</td><td class="photoclip"><a href="/displayimage.php?pos=-574" class="photoclip" ><img src="//albums/pictures/2004events/thumb_DSC_2443.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" /></a><br /><br />skymasters<br>0 views</td>
</tr>
<tr>
<td class="photoclip"><a href="/displayimage.php?pos=-318" class="photoclip" ><img src="//albums/pictures/2005meetings/thumb_D05_0098.jpg" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-261" class="photoclip" ><img src="//albums/pictures/2004events/thumb_DSC_1615.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-682" class="photoclip" ><img src="//albums/pictures/2004events/thumb_DSC_2699.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100" /></a><br /><br />skymasters<br>2 views</td>
</tr>
</table>
Notice the "src=//albums/pictures/..."<?php
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
$objCpm->cpm_close();
?>
Generated source code from cftest.php:Code: [Select]...
Notice the "src=//albums/pictures/..."
<img src="//albums/pictures/2005events/thumb_D05_1976.JPG"
Can't get the correct src to appear with anything I've tried (short of capturing output buffer and manipulating before display).
$objCpm->cpm_OverridePathToAlbums('/albums');
to cftest.php - and it shows pics now from the same subdomain....hi....
The CF is working but i want following
To get pics from last updated three albums from cat=5
...
I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5
Code:Code: [Select]<?php
...
...
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
...
?>
Niks...
$objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=x");
Put a table around the calls to format it nicely - since cf willl return a table for each call...function cpm_viewLastAddedMediaFrom($rows, $columns, $source, $options="")
and pass through the id of the last album added to the system, ie:$objCpm->cpm_viewLastAddedMediaFrom (2,4, "album=AVARIABLECONTAININGLASTADDEDALBUMID");
<?
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$picOptions = array("imagestyle" => "cpg", "imagelink" => "album", "alttag" => "%a");
$picDesc = array("noimage" => "", "subtitle" => "%d", "tablestyle" => "tableGen");
// THUMBNAIL
$objCpm->cpm_viewRandomMediaFrom(1,1, "album=36", $picOptions);
// DESCRIPTION
$objCpm->cpm_viewRandomMediaFrom(1, 1, "album=36", $picDesc);
// PICTURE COUNT
$objCpm->cpm_listMediaCountFrom("album=36");
// THUMBNAIL
$objCpm->cpm_viewRandomMediaFrom(1,1, "album=38", $picOptions);
// DESCRIPTION
$objCpm->cpm_viewRandomMediaFrom(1, 1, "album=38", $picDesc);
// PICTURE COUNT
$objCpm->cpm_listMediaCountFrom("album=38");
?>
sorry to ask again, but how would I go about using this with my gallery on one host with a database but display the last added on another host.
Hi!
I'm still trying to get a firm grip using all the different functions, options, source variables included with cpmfetch, but so far I like it. Thank you. I tried searching the forums for this, but couldn't come up with anything. The problem I'm having is getting the functions to work on albums numbers greater than 36.
This code works fine:Code: [Select]<?
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$picOptions = array("imagestyle" => "cpg", "imagelink" => "album", "alttag" => "%a");
$picDesc = array("noimage" => "", "subtitle" => "%d", "tablestyle" => "tableGen");
// THUMBNAIL
$objCpm->cpm_viewRandomMediaFrom(1,1, "album=36", $picOptions);
// DESCRIPTION
$objCpm->cpm_viewRandomMediaFrom(1, 1, "album=36", $picDesc);
// PICTURE COUNT
$objCpm->cpm_listMediaCountFrom("album=36");
This almost identicle code does not work:Code: [Select]// THUMBNAIL
$objCpm->cpm_viewRandomMediaFrom(1,1, "album=38", $picOptions);
// DESCRIPTION
$objCpm->cpm_viewRandomMediaFrom(1, 1, "album=38", $picDesc);
// PICTURE COUNT
$objCpm->cpm_listMediaCountFrom("album=38");
?>
The pieces of code are on the same page. Top piece works, bottom one doesn't. Any help or explanation would be greatly appreciated. Thank you...
Ok - i've browsed through a lot of posts on here - but I can't seem to find the specific answer to my issue.
I have resolved a few other issues, for exampe that funny "call to non-function" or whatever it was, among other things.
But as yet - I can't get it to generate HTML and display my gallery.
I've tried editing a few files suchs as "cfimageget.php" and changing the urltocpm value, and ... there was one other change - but I can't quite remember it (it's 12:30AM here and I'm dead tired)
If you could even point me to a post that addresses this exact issue I'd be most grateful.
Using the latest "stable" release from the CpmFetch website - I've got it 'mostly' working. Just can't get the turn in part. :(
Ah whoops - sorry.
Sorry, what was the original issue? I went back a few pages and could not find other posts.
Thanks
Still looking for a way to display a specific album (in a non-randomized fashion) on another website using CpmFetch. Can it do this?
The issue is, I can't get it to pull any images from my gallery.
Here is my file
http://www.ariseguild.net/default.php
My Gallery
http://www.ariseguild.net/gallery
If you look at the coding of default.php you won't see any output of html coding or anything to display images from my gallery.
But the php coding is there in the file itself.
I've used the default example that was shown on another part of your site, and I edited it to show only 1 image.
Not pulling images can be caused by soooo many things...
I really need to see the code you are using to pull the images. Please post it here.
Thanks
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>
As I said - default code, just changed to (1,1)
Code: [Select]<?php
As I said - default code, just changed to (1,1)
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>
75 | DOCUMENT_ROOT is not a good match | BAD
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /VDOMAINS/mtcpoz/www/cpmfetch/cpmfetch_dao.php on line 710
I have a problem installing it.
I've changed cpmfetch_dao.php.
var $cpm_table_prefix = "mcg_"; //witch is table prefix
What to do?
Hi Vuud,
Im trying to have two cpmfetch blocks on my site, both with differtent divs around them to position them.
The thing is that when i add a second <code> ?php
include "./cpmfetch.php";
$objCpm = new cpm("/flix");
$objCpm->cpm_viewLastAddedMedia(1,1,array("tablestyle" => "test1",'imagewidth' => '300',"imagestyle" => "test1","imagesize" => "int"));
$objCpm->cpm_close();
?>
</div>
</code>
on my site it gives me the Fatal error: Cannot redeclare class cpm in error. How can i have multiple cpmfetch blocks, that are totally seperate in styling ?
Cheers !
Okay, just another "config file not found"-error. I read through all the thread and found some people with the same problem, but still don't seem to be able to solve it.
This the path to my cftest.php
http://www.screamsilence.net/cpmfetch/cftest.php (http://www.screamsilence.net/cpmfetch/cftest.php)
Versions of cpg and cpmFetch are the very latest since I downloaded both just yesterday.
The settings in cftest.php are correct as I re-read the doc time and again. My domain is www.screamsilence.net and my cpg is in /gallery2. Very simple. But still doesn't work.
As a matter of fact, screamsilence.net is a subdomain of screamsilence.de pointing to screamsilence.de/net. I think this might be the problem.
What can I do? I really really want to use this tool since it's exactly what I was looking for.
Greetz,
Mad
Read the release notes... Its in there what to do with this error, its also been posted here like 20 times.I've read and corrected the error... I still have error 75... How to correct that?
Yikes. Hmmmm.
Two things:
#1) Are you running some sort of content management system, or is that page just straight php there?
#2) Try adding $objCpm->cpm_getMediaCount( ); just after the "new cpm" line. It should print a number...
It won't fix your problem, but will give me some more information to figure it out from.
Vuud
I've read and corrected the error... I still have error 75... How to correct that?
Running Apache web server v1.3... It is shared hosting. CPMFetch is not showing anything in test file. Database is mySQL v4, on other server and domain...
Need more info?
hello, cpmfetch works on my old webspace with linux server perfect. during a change of the webspace provider, my page moved to a Windows Server IIS 6.0.
Cpmfetch doesn't work. I have installed cpg in the root directory ( www.xxxx.com/index.php ), the path on the windows server is C:\XUnitConf\web32\html\xxxx\ .
in cftest.php i wrote "$ChangeThisToYourPartialUrlToCPG = "/";" but when i run cftest.php i get Error 55, "DOCUMENT_ROOT: Not found BAD" and Error 80 "CPG Config file not found: //include/config.inc.php"
also the errors:
Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 213
Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 214
75 DOCUMENT_ROOT is a good match PASS
Notice: Undefined index: DOCUMENT_ROOT in C:\XUnitConf\web32\html\xxxx\cftest.php on line 221
where is the error?
Not running CMS - and seeing as I have to head out now - I'll try that in a few hours when I'm home (forgot to check this site earlier.)
Sorry Vuud - no changes
http://ariseguild.net/default.php
I've moved the coding so it sits outside my table below it all (incase my table was messing it up) but no go.
EDIT:
I might redo it - see if that helps.
:EDIT 2:
Re-done it all - and I STILL can't get it to work.
I've tried adding in the DB User/Pass, removing it - allowing access to all file regardless of being hidden or not, have set the variable to /gallery/ from /photos/.
This one has me REALLLLLLY stumped.
Also - coding is back inside the bottom middle cell.
:EDIT 3:
Looked through all the php files that I could and tried to see if anything I could see made sense (none did)
Whatever the reason, it just isn't pulling data from the gallery and parsing it.
In fact, the commands don't seem to be parsing anything at all from what I can tell. :s
Well, good effort.
Your not bridged with something are you? I just remember thats a popular problem for this issue....
Yeah - I am bridged.
Forgot about that.
Are you able to work around that?
Hello!!
The mistakes is in the bridged !!
In the same server, other domain, and coppermine without bridged show the thumbnails correcly:
http://www.quadomingueros.com/cpmfetch/cftest.php
What I nedd edit in my coppermine and phpBB bridgeg accoutn in other domain?
Regards from spain
Hello
I add a "adsfasdf" user in my coppermine, and appear the thumbnails in the test file... is all right??
Thanks for all!
The error is that IIS does not provide a document root variable so cpmfetch cannot determine what the path to your web directory is. A few solutions in the past have been to add in one that tells the system what it would be before the php calls the cpmgfetch object.
So something like:
$_REQUEST['DOCUMENT_ROOT'] = "C://what/ever/the/path/is";
Personally I would switch providers if they ever jumped me to a windows server, but thats just my 15 years of IT experienece talking.
Yeah, whatever you add in as the bogus users would appear as the owner name if you have that displayed.
Otherwise it seems okay... make sure you have added enough users to cover the number of users in the bridged package
Hello again
I add one only "random user", in my phpbb has more thank 400 users registered, but onlu 4 o 5 users upload pictures...
What I need do ?? with one only user added i think that funcionally ok
can you help me? which parts i must change and where must i put "$_REQUEST['DOCUMENT_ROOT'] = "C://what/ever/the/path/is";" ??
Oh cool - so if I add 10 random users to the coppermine it'll display images from the first 10 people on the forums?
I think I could live with that.
The users keeps growing on the forums though - it's about 60 people atm so... yeah.
-------
I think I'll wait till an update comes :-)
Running Apache web server v1.3... It is shared hosting. CPMFetch is not showing anything in test file. Database is mySQL v4, on other server and domain...
Need more info?
<?
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewRandomTopRatedMediaFrom("cat=3", 4, 3, 12);
$pict->cpm_close();
?>
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u, ibf_members AS ibf ";
Interesting topic. :D I admire your patience, vuud, and thanks for the software. I'm running IPB 2.1.4, Coppermine 1.4.3, and CPMfetch 1.6.2. I initially had problems with only getting a few pictures pulled from several of my categories, but after reading this topic, it was most likely the bridge to IPB. And indeed, it was. The relevant table name is ibf_members; the field is "id". So, I just renamed your query appropriately, like in the phpbb examples previously given. Works great. Find and replaced all ten instances. I get my latest pictures now.
The problem is I get three copies of them, usually. Someone else had this same problem a couple of months ago, but as I recall it was never addressed.
More info, as you request: :D Running apace 1.3.3, PHP 4.4.1. Links: My gallery is www.harmonyforever.com/cpg143/. Example page displaying problem is this: www.harmonyforever.com/recent_fanart.php. While this is meant to be a plugin to my CMS (Subdreamer), this is not inside subdreamer yet. (interestingly enough, though, it works fine there--as in it displays all of these same images; but just multiple copies of them). Running this code:Code: [Select]<?
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewRandomTopRatedMediaFrom("cat=3", 4, 3, 12);
$pict->cpm_close();
?>
This is the code generating the above "recent_fanart.php" page. As you can see, no errors are being generated.
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u, ibf_members AS ibf ";
line 277:users AS u WHERE p.aid = a.aid and p.pid = $pid AND p.owner_id = ibf.id
Line 295: where p.aid = a.aid AND p.owner_id = ibf.id
line 320: " where p.aid = a.aid AND p.owner_id = ibf.id "
line 355: " where p.aid = a.aid AND p.owner_id = ibf.id "
line 398: where p.aid = a.aid AND p.owner_id = ibf.id
line 430: where p.aid = a.aid AND p.owner_id = ibf.id
line 457: WHERE a.aid = p.aid AND p.owner_id = ibf.id AND p.approved='YES'
line 478: WHERE m.pid = p.pid AND p.aid = a.aid AND p.owner_id = ibf.id"
line 496: " WHERE p.aid = a.aid AND p.owner_id = ibf.id and p.approved='YES' $this->privacyfilter and p.ctime > "
line 514: " WHERE p.aid = a.aid AND p.owner_id = ibf.id AND p.approved='YES' $this->privacyfilter and p.ctime > "
<?
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewLastAddedMediaFrom( 4, 6, "cat=3");
$pict->cpm_close();
?>
If you reload www.harmonyforever.com/recent_fanart.php you can see the problem in full display. As you can tell, there's something screwy going on. It's loading each image three times. I'm not using an options array, of course. Thanks for the fast reply. I included that 12 in my function call, as the documentation doesn't say it takes an array, where every other function DOES take the array. Good to know that was an error.
As for what I changed. All is in the dao file.
SNIP
As for that function, I really want a most recent viewed one. This is when the problem is really on display. This is my new recent_fanart.php page now:Code: [Select]<?
If you reload www.harmonyforever.com/recent_fanart.php you can see the problem in full display. As you can tell, there's something screwy going on. It's loading each image three times. I'm not using an options array, of course.
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
require_once "./cpmfetch/cpmfetch.php";
$pict = new cpm("/cpg143");
$pict->cpm_unlock_private(false);
$pict->cpm_setDebugMode(true);
$last_source = "cat=2,3,11,8,9,10";
$pict->cpm_viewLastAddedMediaFrom( 4, 6, "cat=3");
$pict->cpm_close();
?>
A work of art takes time :-)
I will try to hurry
SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email FROM cpg143_pictures as p, cpg143_albums as a, cpg143_users AS u, ibf_members AS ibf where p.aid = a.aid AND p.owner_id = ibf.id and p.approved='YES' and ( a.category=3 ) and a.visibility = 0 ORDER BY p.ctime DESC LIMIT 0,24
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, ibf.last_visit AS uUser_lastvisit, ibf.joined AS uUser_regdate, ibf.email AS uUser_email';
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. " ibf_members AS ibf ";
`id`, `name`, `mgroup`, `legacy_password`, `email`, `joined`, `ip_address`, `posts`, `title`, `allow_admin_mails`, `time_offset`, `hide_email`, `email_pm`, `email_full`, `skin`, `warn_level`, `warn_lastwarn`, `language`, `last_post`, `restrict_post`, `view_sigs`, `view_img`, `view_avs`, `view_pop`, `bday_day`, `bday_month`, `bday_year`, `new_msg`, `msg_total`, `show_popup`, `misc`, `last_visit`, `last_activity`, `dst_in_use`, `view_prefs`, `coppa_user`, `mod_posts`, `auto_track`, `org_perm_id`, `temp_ban`, `sub_end`, `login_anonymous`, `ignored_users`, `mgroup_others`, `member_login_key`, `has_blog`, `subs_pkg_chosen`, `members_auto_dst`, `members_cache`, `members_disable_pm`, `members_display_name`, `members_created_remote`, `members_editor_choice`, `members_markers`
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/");
$objCpm->cpm_viewLastAddedMediaFrom(5,2,"",array('alttag' => '%t','imagewidth' => '75'));
$objCpm->cpm_close();
?>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/video");
$objCpm->cpm_viewLastAddedMediaFrom(5,2,"",array('alttag' => '%t','imagewidth' => '75'));
$objCpm->cpm_close();
?>
Hi to everybody. Sorry for my bad english but i'm Italian.
I have a problem with coppermine fetch test page.
This is my site www.carnevalari.it
This is the gallery www.carnevalari.it/cpg132/index.php
This is the test page http://www.carnevalari.it/cpg132/cpmfetch/cftest.php
All tests are ok but i can't see thumbnails... Why??? ???
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.carnevalari.it/home/cpg132/cpmfetch/cpmfetch_dao.php on line 710
Please help me! :-\ :'(
Read the thread and the instructions, this has been asked and answered countless times already.Ok, it is 40 pages long, but I will take a look. Thanks
Read the thread and the instructions, this has been asked and answered countless times already.
Read the thread and the instructions, this has been asked and answered countless times already.
Not to mention the readme file that came with the download.
Read the thread and the instructions, this has been asked and answered countless times already.
here is the link to the post ....
http://forum.coppermine-gallery.net/index.php?topic=19564.msg138163#msg138163
I skimmed through this thread..and did not find a request like this. I run a gallery centered around it's users. So I was wondering if there's a way I can show the newest user and their picture? I would really like it to be in this format:
{image here}
{Username with link to their personal gallery} joined on {date}
You would really make my week if you or someone could make that possible to do. :D
-------------------
Also..I just wanted to let people who use CPMFetch know how they could include many different php includes. Through iframes! :) I mean..it's pretty a no-duh thing. But you would have to create a .php file for each different type of inclusion you want. For example I want to show the newest picture, random picture, and highest rated picture. So, I will create three php files, one for each type of inclusion. Then, on the main page I would then follow this layout:
Newest photo
{iframe with proper width and height, linked to the newest photo php document}
Random photo
{same as above, but linked to the random photo php document}
etc. Make sure on the php document you make it match your layout (background-wise) or it would look funky.
If this idea was already discussed, just let me know and I'll take it off this post. Hehe. But if not...it's just an idea I am using. ^_^
ok so what i would like to do is display the thumbnail of the most recently added album and that albums descriotion as well as the date added ...
what code syntax would i use ?
... i thought about using:
cpm_viewLastAddedMediaFromAlbum
but that just returns a specific album's picz .....
how would i specify the most recently added album thumbnail and its info(date and description)
similar how i have the layout setup on the bottom left of this page : http://www.highpointcivic.com
oh also .. how come i can't post new threads to: "Mods: CPMFetch >" i can only reply in threads .... ??
iframes sound intresting... but why couldn't you just include them all on the same page without doing the extra php includes and such?
First: Is it possible that the version of Coppermine PhotoGallery may be critical?
I looked at the cpmfetch_dao.php, based on the reported solutions in response to the errors. The versions addressed in cpmfetch_dao.php were for CPGv1.4.1 beta or the earlier CPGv1.4.
As stated above, I am using CPGv1.4.4 (and tested this). I have newer albums using CPGv1.4.5 with the mods by stramm to create square thumbnails.
I encountered the second set of errors as indicated by Niels (that should not have been an issue since I am using the cpmfetchv1.6.2 as suggested by vuud (see above for links regarding the reported errors and solutions).
I have also taken precautions to ensure that the prefixes for the thumbnail and normal photos were consistent.
Second: Is there anything else that others did to resolve the problem?
I appreciate any feedback. Thanks.
cgc0202
I tried this code and got the following message:
A random selection:
ERROR: Path to Coppermine incorrect. (//cpg143//include/config.inc.php)
With this code:
print "A random selection:<CENTER>";
include "../forum/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg143");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
print "</center>";
Any suggestions? My Coppermine Gallery is bridged and my directory is at wwwmysite/forum/cpg143.
Thanks! I tried a search and read through most of these 40 pages, but none of the fixes I tried worked.
What are the errors you are getting?
I've not upgraded to the newer cpg, so I am not sure (although I doubt) something would have changed that much.
Bridging with something that messes with thumbnails could I guess.
The errors indicated in the above link are exactly the same errors that Niels reported in 2005 (please refer to the link in my previous post). Note, the one I showed in the link deals with the ones where I used the latest CPG v1.4.5 with the stramm mod and the CPMFetch v1.6.2. Also, I already corrected the issue about "prefix", in case that might become the cause of the problem.
$objCpm = new cpm($PartialUrlToCPG);
$objCpm->cpm_OverridePathToAlbums("/pics");
First example (shared in previous posts -> "/ecos201"):
I changed
$objCpm = new cpm($PartialUrlToCPG);
to
$objCpm->cpm_OverridePathToAlbums("/pics");
And, I got a fatal error message:
Fatal error: Call to a member function on a non-object in /home/mmedia/public_html/cpmfetch/cftest.php on line 310
WOW!!!
Thanks very much Vuud. That did the trick.
The observation you made for the "/ecos201" where the photos are outside of the standard 'albums" withing the Coppermine. This was not the case with "/usa001" -- but got similar errors. Please see previous post.
My first problem is that all new albums (#101 and #102) I added in may don't show up in CPMFetch.
I tried to add a new album #103 too, but it doesn't show up? All albums from #1-#100 are shown up.
I'm using the last 45 days, when I use the last 14 days CPMFetch shows only the number of new pictures added during the last 14 days without displaying these albums.
Second problem is that I need the links to be displayed in an iframe because I'm using the CMS of joomla.
CPMFetch displays all my new added albums on the startpage, but my gallery needs to be displayed in an iframe :/
Is there a solution for this?
In that one your thumbnails are called t_ and your normal are called n_
Add in
$objCpm->cpm_setMediaPrefixes("t_", "n_");
after the new statement (that creates the object)
That solved the errors too. I anticipate to have multiple photogalleries and kept the photos in a centralized folder (outside of the photogalleries) in in the same subdomain. This will allow me to access the same set of photos and place them in multiple galleries. I included the CPMFetch also in the same subdomain. In this regard, I was reading the FAQ, and found this:
***********
13.2. I have my pages and gallery on different subdomains... will CpmFetch work?
I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.
*************
This may become an issue because the websites where I want to "place the photos" resulting from applying the CPMFetch are found in other subdomains. [My current webhosting service has the subdomains designed so that they are like separate domains altogether.] Is there a possible or known solution to the issue raised in the FAQ?
In "Example 4.2. Example of using CpmFetch"
<?php
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>
Can the issue raised above be resolved by specifying the full path in 'include "cpmfetch.php";'
e.g.,
include "http://mysite.org/cpmfetch/cpmfetch.php";
cgc0202
You can do it as an include also... create a php file with the cpmfetch code on the main server and do a php include from the other server. That could work.
Otherwise, as the faq said, I don't have much experience with getting that sort of thing running - so YMMV
Maybe I did not understand the suggestion in your previous response correctly. I did create a "test.php" page in the subdomain where the photogallery and the CPMFetch are located. The CPMFetch result displayed properly in the "test.php" page. [Thanks again for the help.]
To illustrate your suggestion, did you mean this? Let us say "test.php" is in "mysite.org/test-files" so that the full URL for "test.php" would be:
http://mysite.org/test-files/test.php
When you stated: "...do a php include from the other server", did you mean a script like this:
First Approach
<? php
include 'http://mysite.org/test-files/test.php';
?>
I tried that and got this error:
Parse error: parse error, unexpected T_INCLUDE in /home/treasure/public_html/test-fetch.php on line 2
Even if this might work there is one catch: It will require the creation of php files similar to "test.php'". Creation of such files would be no problem if there are only a few; but becomes an issue if there are thousands or more of such files to be created.
The T_Include error means you botched up your php code somehow and has nothing to do with cpmfetch.
Hint: there is no space between <? and php
Why would there be thousands of files?
Thanks Vuud for the hint. I had it correct in all the other php statements in the other test page. I did not know why I had that mistake in the other page.
Here is the test page (i.e., "toti-test.php") URL
http://mmedia.treasuresoftheinternet.org/toti-test.php
placed in the same subdomain as the gallery and the CPMFetch. The photos (with the accompanying text and layout structure) showed as expected (although I have to read the instructions more to make some features work).
Then, I created another test php page in another subdomain (i.e., "test-fetch.php") -- where I attempted to "include" the entire "toti-test.php" -- text and photos -- into the "test-fetch.php" page found in the other subdomain.
http://treasuresoftheinternet.org/test-fetch.php
The latter page contained the simple php statement:
<?php
include "http://mmedia.treasuresoftheinternet.org/toti-test.php";
?>
As you can see the "include" instructions itself works. The entire page showed up in the other subdomain with the proper structure and text; the only issue is that the photos are not showing.
I had an idea why this happened, and I tested it by revising the original text page. At the bottom of the right column, I included two photos in the original test page (i.e., "toti-test.php"):
http://mmedia.treasuresoftheinternet.org/toti-test.php
These two photos are static photos -- not generated by CPMFetch. Both photos show up properly in the original subdomain. Now if you compare what happens to these two photos in the other subdomain -- the upper photo does not show up while the lower photo shows up -- it reveals the reason why all of the photos (generated through CPMFetch) do not appear when the test page was "fetched" in another subdomain:
http://treasuresoftheinternet.org/test-fetch.php
The CPMFetch itself worked in the original page, but because the presentation is partial URL, the exported photos attached the main URL of the new page (in this case http://treasuresoftheinternet.org) rather than the original URL of the original page (i.e., http://mmedia.treasuresoftheinternet.org) where it was generated. This was just like what happened with the two photos on the right column, not generated with CPMFetch.
From the above diagnosis, it is a matter of incorporating a script that the photos must integrate the original page URL rather that the new page URL, to make this mode work.
cgc0202
P.S.
As outlined in my previous response, it would be nice if the method above would work because I would be able to find uses for them. However, the ideal approach, if doable would be how to make the script:
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/ecos201');
$objCpm->cpm_OverridePathToAlbums("/pics");
...
....etc.
?>
work in another subdomain. [It works if the above script is placed in the same subdomain as the Gallery and the CPMFetch.]
PPS:
You asked: Why would there be thousands of files?
I will discuss this later since this is already a very long response.
I am gonna give you your own thread... I have to say you put forth a great deal of effort to troubleshooting this on your test pages. Keep at PHP and you will be a formidable programmer someday.
On this page: http://mmedia.treasuresoftheinternet.org/toti-test.php
I think this will fix your remote problem. This tells cpmfetch to add a full url instead of the relative one. Then when the other site gets it, it can find the photos.
$objCpm->cpm_OverrideUrlToCoppermine("http://mmedia.treasuresoftheinternet.org/ecos201/");
You certainly have put in a lot of effort on your own to get this working... I don't mind helping
Lemme know about the 1000's of scripts, I suspect there is a away around it (whatever it is)
Take care
Hey Vudd -- long shot.
You haven't be chance updated and found a work-around for the bridging issue have you?
"non-randomized fashon"" ORDER BY p.filename LIMIT 0,$count"; ;)
Can you word this differently. What do you want?
Thanks
" ORDER BY p.filename LIMIT 0,$count"; ;)
I don't have anything in there to do the order by filename.
Would filename be the best way to sort though? Wouldn't by date added be better?
Ordering by date still produces images from a gallery in random order on a new page. I needed a setup where I could post an entire gallery to a new page in an ordered series..for example: 01.jpg 02.jpg 03.jpg 04.jpg...etc in a decending order. Sorting images by file name worked out very nicely for this situation.
there are both admin settable default sort orders, custom sort orders per album and user-preferences (cookie-driven) taken into account.
Hi Vuud,
I finally understood how to vary the sizes of the random photos, including creating random large size photos
http://bios.treasuresoftheinternet.org/toti-test2.php
What I noticed however was that the resolution was not very good in large size photo as shown in the Test2 page:
http://bios.treasuresoftheinternet.org/toti-test2.php
It appears, based from the features I used in the gallery that the low resolution of the large size photos was because they were based from the thumbnail nail photo rather than the intermediate (normal size) or original photo. I also included other observations in the large size photo in the Test2 page
[http://bios.treasuresoftheinternet.org/toti-test2.php
including other photos of various sizes, for comparison of the resolution.
Thanks.
cgc0202
Try "int" instead of normal in the settings you are using.
For some reason I never went with normal, but termed it "intermediate"
have you seen the online doc's at http://cpmfetch.fistfullofcode.com ? They leave some stuff to be desired but overall can be good
Try "int" instead of normal in the settings you are using.
For some reason I never went with normal, but termed it "intermediate"
In that one your thumbnails are called t_ and your normal are called n_
That is why it is not finding thumbnails I think.
You need to override the naming for thumb_ and normal_
Add in
$objCpm->cpm_setMediaPrefixes("t_", "n_");
after the new statement (that creates the object)
have you seen the online doc's at http://cpmfetch.fistfullofcode.com ? They leave some stuff to be desired but overall can be goodI went over the entire online documents (including the FAQs) awhile back when I decided to use CPMFetch, and before I posted here. Since I do not have any programming background (and do not understand complex PHP statements very well), the way I learn stuff that I do not understand is to recreate them one at a time. This was the reason why I create the "Test files" -- each exploring a specific topic ending with questions that are not yet resolved. The succeeding "test php's" build from previous ones.
Can you please clarify what you mean by: "Try "int" instead of normal in the settings you are using."
<?php
$source = "album=13";
$styleguide = array( //"TABLESTYLE" => "photoclip",
//"rowstyle" => "photoclip",
"cellstyle" => "photoclip",
"linkstyle" => "photoclip",
"alttag" => "Living Things",
"imagestyle" => "photoclip",
"imagesize" => 'normal',
"imagewidth" => '500');
$objCpm->cpm_viewRandomMedia (1,1,$styleguide);
?>
"imagesize" => 'int',
This is a related side issue: Is there a mechanism how the CPMFetch program recognize when to use the thumbnail or the "intermediate size -- depending on the specified width?
While it will be quite different from page to page, as well as more complex and elaborate, all the actual applications I will have for CPMFetch are already outlined in CPM Test Page #2c for TOTI (Album- & Category-specific Photos, Variable sizes, and Photo-framing):
http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php (http://mmedia.treasuresoftheinternet.org/cpmfetch-tutorials/toti-test2c.php)
In this sense, what I wanted to do is now technical feasible. In relation to this project, my next project would be to attempt to port CPMFetch to Joomla. Would it be possible to show you some relevant information from Joomla random photos "module" to get some ideas from you on how I can use that to port CPMFetch to Joomla?
I have setup cpmfetch in /cpmfetch/ and my coppermine installation is running in /gallery/ . I have tried loading cftest.php (http://www.nightcats.org/cpmfetch/cftest.php), but no thumbails are displayed despite it passing all the tests. I don't know where to start as no error messages are displayed. I am using the latest coppermine and cpmfetch versions. I have done the commenting/uncommenting in the cpmfetch_dao.php file for cpg1.4.6 , and I have changed line 5 in cftest.php to reflect my install.
My only thought is that it is linked to the fact that I have bridging active with punBB.
Any help is much appreciated. Let me know what other info you need.
Regards
Ben
<?php $objCpm->cpm_viewLastAddedMedia(1,4,array("tablestyle" => "cpmf","imagestyle" => "cpmf")); ?>
ERROR: Path to Coppermine incorrect. (/var/www/blog/index.php/gallery//include/config.inc.php)
Fatal error: Call to a member function getLastAddedMediaFrom() on a non-object in /var/www/blog/cpmfetch/cpmfetch.php on line 532
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
//"TABLESTYLE" => "photoclip",
//"rowstyle" => "photoclip",
"cellstyle" => "photoclip",
"linkstyle" => "photoclip",
"alttag" => "Uusimmat kuvat",
"imagestyle" => "photoclip",
"imagesize" => 'thumb',
"imagewidth" => '80');
$objCpm->cpm_viewLastAddedMedia (2,2,$styleguide);
$objCpm->cpm_close(); ?>
Code: [Select]ERROR: Path to Coppermine incorrect. (/var/www/blog/index.php/gallery//include
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array(
//"TABLESTYLE" => "photoclip",
//"rowstyle" => "photoclip",
"cellstyle" => "photoclip",
"linkstyle" => "photoclip",
"alttag" => "Uusimmat kuvat",
"imagestyle" => "photoclip",
"imagesize" => 'thumb',
"imagewidth" => '80');
$objCpm->cpm_viewLastAddedMedia (2,2,$styleguide);
$objCpm->cpm_close(); ?>
Installed Coppermine 1.4.5 & CPMFetch 1.6.2. I've tried to comment/uncomment those lines. And it "works"...........a bit.
See this link: http://gallery.nederland1940-1945.nl/cpmfetch/cftest.php
There is one picture in the gallery, but it is not displayed. Has this got to do anything with this code-fixing or is there another problem?
Greetz,
Jurrie
"subtitle" => "%t"
? If the image title is too long, I want to only show a set amount of characters so it doesn't throw the cell size off too much, and makes it easier to align the thumbnail with the title. Not sure if this can be done through CPMFetch, or if it would be a CSS thing.<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$debug = true;
$objCpm->cpm_setDebugMode($debug);
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFrom(1,1,"","");
$objCpm->cpm_close();
?>
I am not 100% sure that this was not asked before, but i searched and looked through the first 5 pages of this thread, with no sucess and don't have time to look through 43 pages :o. But anyways, my question is this: When I run the test for cpmfetch, it comes back with this error:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 710
Any idea what is wrong?
You should have kept reading, but the answer is in the cpmfetch_dao file, comment out one line and uncomment the other, lines 57/62 I believe.I am new to all this and don't really get what you said. What do you mean by comment out and uncomment?
I am new to all this and don't really get what you said. What do you mean by comment out and uncomment?
You have to edit the PHP file "cpmfetch_dao.php" (using something like Dreamweaver or another editor). On line 54 you need to put /*..... */ around the line to comment it out (where ..... is the actual code), and on line 59 you need to get rid of the /*..... */ surrounding it. I had the same problem and it worked for me. I had read a post somewhere on here that explained it nicely, but I can't find it again.When I went to do that I found the code on line 54 (var $topPercentForMostViewed = 25;) and edited it (/*var $topPercentForMostViewed = 25;*/), but when I went to change line 59 I found a blank line. I tried it when i just had line 54 edited and I got the same error. Could the code be on another line? I also tried line 57 and 62 as SuperJETT suggested and I got the same error again.
Could the code be on another line?
// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
/* var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';*/
You'll want to comment out the line under "This is for CPG versions prior to 1.4" and remove the comment from the line "This is for CPG v 1.4.1 beta 1". I think the line numbers are different based on what editor you use. (My ftp program shows 54 and 59). Again, this is what worked for me.Look for the following:Ok, I did what you said to do but I got a different error: Parse error: parse error, unexpected '=', expecting T_VARIABLE in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 57. My line 57 looks like this:Code: [Select]// This is for CPG versions prior to 1.4
You'll want to comment out the line under "This is for CPG versions prior to 1.4" and remove the comment from the line "This is for CPG v 1.4.1 beta 1". I think the line numbers are different based on what editor you use. (My ftp program shows 54 and 59). Again, this is what worked for me.
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';
// This is for CPG v 1.4.1 beta 1
/* var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';*/
var /*$sqlPictureAlbumSelect*/ = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS
I tried to remove the "=" but then I got this error: Parse error: "parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_VARIABLE in /hsphere/local/home/jbalcomb/echoefx.com/fetch/cpmfetch/cpmfetch_dao.php on line 57". I know it is something simple know but I don't know much at all about PHP. I think its just that equal sign, but I don't know what to do with it. What should I do?
My line 57 looks like this:Code: [Select]var /*$sqlPictureAlbumSelect*/ = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS
/* var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation'; */
In order to comment out the line you nee to put the /* before the start of the line's code and */ after the end of the line's code.I didn't know to cancel out the whole line. That was the problem! Thanks for the help, I REALLY appreciate it.
Put /* before the word "var" and put */ after the semicolon. It should look like this:Code: [Select]/* var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation'; */
Thanks for the help, I REALLY appreciate it.
1. Where do I change the function/variable to only show certain media types. In other words, I only want photos to show up (.jpg, .png, .gif, etc) but not videos (.wmv, etc). I read the docs and know there is a function to do this, but I am unsure of what/where to change, and whether I list what I don't want seen, or do want seen.
2. Is there a way to limit the amount of characters shown when using the optionCode: [Select]"subtitle" => "%t"
? If the image title is too long, I want to only show a set amount of characters so it doesn't throw the cell size off too much, and makes it easier to align the thumbnail with the title. Not sure if this can be done through CPMFetch, or if it would be a CSS thing.
ANy help would be appreciated. Thanks for creating this tool. It's great, especially since it's fairly easy for us newbies :).
Any chance someone knows about these 2 questions? The first one is more important to me than the second, but help on either would be greatly appreciated (or a push in the right direction for more info). Thanks.I think that this might help you: http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html (http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html)Not sure if it answers your first question, but I think I saw something like that when I was going through there :D.
I have what could be a stupid question...Is there a way to use cpmfetch more than once on a page? For example, if i wanted to display the latest images from on album in one section of the page and display the latest images from another album on a different area of the page?
function setFilter($filterarray) {
if ($filterarray == "") {
$this->filetypefilter = "";
} else {
$this->filetypefilter = " and (";
foreach ($filterarray as $filter) {
$this->filetypefilter .= " p.filename like '%" . strtolower($filter) . "'";
$this->filetypefilter .= " or p.filename like '%" . strtoupper($filter) . "'";
$this->filetypefilter .= " or ";
}
$this->filetypefilter = substr($this->filetypefilter,0, strlen($this->filetypefilter) - 4);
$this->filetypefilter .= ') ';
}
}
<?php
include "cpmfetch.php";
$options = array( 'imageheight' => '75' , 'windowtarget' => '_top' );
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 8, "cat=2", $options);
$objCpm->cpm_close();
?>
$sqlcode = "SELECT " . $this->sqlPictureAlbumSelect . " FROM " . $this->sqlPictureSourceSelect . " where p.aid = a.aid AND p.owner_id = u.user_id" . $this->filetypefilter ." and p.approved='YES' "
AND p.owner_id = u.user_id
<?php
include "scripts/cpgfetch/cpmfetch.php";
$objCpm = new cpm('/galerija');
$options = array( 'imagestyle' => 'slika');
$source = "";
$objCpm->cpm_viewLastAddedMediaFrom(3, 1,$source,$options);
$objCpm->cpm_viewRandomMediaFrom(1,1,$source,$options);
$objCpm->cpm_close(); ?>
$sqlcode = "SELECT " . $this->sqlPictureAlbumSelect . " FROM " . $this->sqlPictureSourceSelect . " WHERE a.aid = p.aid AND p.approved='YES' "
. $this->filetypefilter . " " . $this->privacyfilter . $sourceSql
. " ORDER BY rand(" . $this->getRandomSeed() . ") LIMIT $count";
$sqlcode = "SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight FROM cpg11d_pictures as p, cpg11d_albums as a where p.aid = a.aid" . $this->filetypefilter ." and p.approved='YES' "
. $sourceSql . " {$this->privacyfilter} "
. " ORDER BY p.ctime DESC LIMIT 0,$count";
include "http://saukairbrakes.awardspace.com/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();
$_REQUEST['DOCUMENT_ROOT'] = "/home/www/saukairbrakes.awardspace.com";
but still get no Document_root showing up.<?php
include "path/to/cpmfetch.php";
$objCpm = new cpm('/gallery1');
// code here for gallery 1
$objCpm = new cpm('/gallery2');
// code here for gallery 2
?>
Try like this:Thank you very much! It works :-*Code: [Select]<?php
include "path/to/cpmfetch.php";
$objCpm = new cpm('/gallery1');
// code here for gallery 1
$objCpm = new cpm('/gallery2');
// code here for gallery 2
?>
include "http://simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch/cpmfetch.php";
$objCpm = new cpm('http://simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();
$objCpm = new cpm('/cpg148');
as well but that still gives same error
Notice: Undefined index: SCRIPT_FILENAME in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\cpmfetch\cftest.php on line 214
5 You set your partial URL to /cpg148 PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Windows NT IIS686 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.2 INFO
55 DOCUMENT_ROOT: e:\\domains\\s\\simaviatorsuk.co.uk.streamlinenettrial.co.uk\\user\\htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS
Fatal error: Cannot instantiate non-existent class: cpm in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\pictest.php on line 11
<?php
include "http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch/cpmfetch.php";
$objCpm = new cpm('http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close(); ?>
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
cftest is giving the following errorsCode: [Select]Notice: Undefined index: SCRIPT_FILENAME in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\cpmfetch\cftest.php on line 214
35 Server OS = Windows NT IIS686 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.2 INFO
55 DOCUMENT_ROOT: e:\\domains\\s\\simaviatorsuk.co.uk.streamlinenettrial.co.uk\\user\\htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is not a good match BAD
but I'm getting thumbnails
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/fhlinux205/s/simaviatorsuk.co.uk.streamlinenettrial.co.uk/user/htdocs/cpmfetch/cpmfetch_dao.php on line 710
ok swapped over to linux database, assuming this is preferred to windows server.
got rid of that error now, just have another one which also shows up on the cftest.php. Cftest.php is showing all ok for everything and nothing bad just the following errorCode: [Select]Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/fhlinux205/s/simaviatorsuk.co.uk.streamlinenettrial.co.uk/user/htdocs/cpmfetch/cpmfetch_dao.php on line 710
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewLastAddedMedia (10,1);
$objCpm->cpm_close();
[quote author=stuarta link=topic=19564.msg159269#msg159269 date=1153408851]
Spoke too soon. Managed to get one column showing random images but I can't get a second column to work showing last added.
I think it's got something to do with it already opening the connection.
Can someone quickly please paste the script I need. So far I have
Column 1 [code]include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewLastAddedMedia (10,1);
$objCpm->cpm_close();
[/quote]yep works thanks
Just uploaded some new pics to my gallery and they aren't showing up under the last added images using $objCpm->cpm_viewLastAddedMedia (10,1);
$options = array('subtitle'=>'%t by %o',"cellstyle"=>".copyright");
$objCpm->cpm_viewRandomMedia (5,1,$options);
Hi
Is it possible to show last/random images in Flash using cpmfetch?
I can't seem to get the target=_blank aciton to work this is the code I'm using:
<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1, "","");
$objCpm->cpm_close();
?>
So I can only have the target_blank to work for only one album... I can't have it for the whole gallery?
$objCpm->cpm_viewRandomMedia(1,1,$options);
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia(4,1,);
$objCpm->cpm_viewLastAddedMedia(4,1,);
$objCpm->cpm_close();
$objCpm->cpm_viewLastAddedMedia(1,1,"album=2")
Code: [Select]$objCpm->cpm_viewLastAddedMedia(1,1,"album=2")
This should be an album of screenshots.
Unknown column 'u.user_website' in 'field list'... I'm pretty sure I'm using "standard prefixes" (novice, remember ... too scared to try and change anything!) ...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/web/gb1157/cpmfetch/cpmfetch_dao.php on line 710
Hi ...
I'm a very new (novice) user of this whole php/mysql/gallery-thingy, so please bear with me...
I'm trying to install the Fetch, and I'm following the instructions here: http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php
-when I go to the cftest.php, I get this error (http://udgang99.dk/cpmfetch/cftest.php) :... I'm pretty sure I'm using "standard prefixes" (novice, remember ... too scared to try and change anything!) ...
what do I do?
ok just tried $objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=2"); and it's still showing wrong album lol, damn thing
Read the instructions that came with the program. Sometimes the README's there contain information to that specific release.
(It is in there).
Yeah sorry renamed the installation folder earlier.
Gallery is installed here http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/gallery/
Test page I have is here http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php
Album 2 should be screenshots which obviously you'll be able to see from the main gallery page although now it doesn't seem to be displaying anything
Arrghhh --- where??? I've been going over this (http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html), but I still can't find anything!!
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();
Programs ofter contain release notes... things that only apply to that version of the program. In this case it is in a file named "Releasenotes_ something (the something is the version number). It was in the file you downloaded.
The most recent one is also online on the downloads page.
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.2.txt
Sorry for the confusion... I've been doing dev so long I forget that other people don't actually know this stuff.
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want. This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.
Vuud - I'm so sorry for being an aparent moron ... but going over the releasenote has brought me nowhere nearer an answer! I have NO idea whatsoever what the information in that file is usefull for!?!?! If the answer IS in there, could you please, please show it to me???
It is the newest Fetch I have downloaded, and I'm using CPM 1.4.8 ...
CODE: QUICKFIX FOR PEOPLE WANTING TO USE CPG BETA 1.4.1
(SAME NOTE AS RELEASE 1.6.0)
========================================
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields. So instead of user web site, you have a few placeholder fields you can define into anything you want. This of course breaks a bit of my code and stops CpmFetch from working. I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file. There are two sections around line 54 and line 59. You need to comment out the one at line 54, and uncomment the one at line 59. Comment it by placing /* before it and */ after it. Uncomment by removing the same from the other section. If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.
var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';
yep sorry album 2 (flying club is the one I'm trying to pull out)
I'm sure it's something with my codeCode: [Select]include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();
I want to use Random images, last added images from all galleries and then individual pages to select random and last added from particular albums
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_setDebugMode(true);
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();
oooh and the other thing if you can please, I'm struggling to finf the correct format for pulling out the filename and author and using a particular css style to format the text. Would be grateful if you could include that on your reply.
well I am stuck with it as it's refusing to use the css style's I've created and the instructions on fistfullofcode aren't unfortunately the easiest to follow, or maybe it's just me being thick
$options = array('subtitle'=>'%t by %o');
$objCpm->cpm_viewLastAddedMedia(4,1,$options,array("imagestyle" => "quote"));
yeah thankyou. not meaning to have a go. If I get this working then maybe it could be added to the docs.
Great system and really want to fully get it working
This is what I was using for grabbing the filename and author and formattingCode: [Select]$options = array('subtitle'=>'%t by %o');
$objCpm->cpm_viewLastAddedMedia(4,1,$options,array("imagestyle" => "quote"));
$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
[/quote]$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));
[/quote]include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));
$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();
ok thanks Vuud.
Changed the code toCode: [Select]include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));
on one column andCode: [Select]$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();
on the other. Using the 'quote' class though the text under the picture should be red but it isn't
http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php
so "imagestyle" won't change the text?
Sorry Vuud did you manage to get chance to look at the SQL or no? I know you said you were busy.
My final problem now ;)
ok pm'd u.
ok I've turned off the bridge and it appears to be working.
One last thing, how can I fix the depth of the tables. At the moment it's pulling out 4 images, but depth depends on how many lines of text is there. I could possibly just fix the table depth to a certain pixel in Dreamweaver
Your bridged with something. It's a well known problem. Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.
There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info.
Or
Create the same number of users in your cpg forum that you have in the other forum
Code: [Select]Your bridged with something. It's a well known problem. Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.
There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info.
Or
Create the same number of users in your cpg forum that you have in the other forum
Ok everything done now, just looking at solving this problem. I've rebridged and getting the same sort of problem where it's not picking up individual albums.
The user list in the gallery and forum has the same amount of users.
Been looking for solutions but not 100% sure of the error that I'm looking for
pics were uploaded by myself though had have same username on both, that's what's odd
ok completely confused now. think i may forget the bridging.
My user id for Stuart in the forums is "1", which is also my admin username and was the only username that I had in coppermine. All the albums were created with this user.
$options = array('subtitle'=>'%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);
right sorry only me again with an option query.
Is it possible to show ratings for an image and/or get people to rate it from the thumbnail in a random display.
I'm usingCode: [Select]$options = array('subtitle'=>'%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);
on this page. Its an album for a screenshot competition. Would like to show ratings or stars below it. I've tried various things with no joy
http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php
I suspected we'd not heard the last from you.nice
$options = array('subtitle'=>'%V,%t by %o',"cellstyle" => "copyright" );
nice
Tried that onCode: [Select]$options = array('subtitle'=>'%V,%t by %o',"cellstyle" => "copyright" );
assume it just returns number and not stars
$options = array('subtitle'=>'Rated %V out of 5 %t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);
$options = array('%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();
ok gotCode: [Select]$options = array('subtitle'=>'Rated %V out of 5 %t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);
on one column, but now the following one withCode: [Select]$options = array('%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();
returns nothing ???
5 You set your partial URL to /pics PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux linhost133.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/content/t/w/o/twotrackbrewing/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /cgi-bin/php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS
When I run cftest.php I'm getting this:Code: [Select]5 You set your partial URL to /pics PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux linhost133.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/content/t/w/o/twotrackbrewing/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /cgi-bin/php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS
The thumbnails do not end up getting displayed and I am using the default prefixes for image files. Any ideas?
TIA
I'm bridging it to SMF and I did comment out line 54 and uncomment 59 but I'm still having this problem.
I placed the cpmfetch folder in the root so it's /cpmfetch.
The line 54/59 thing, while definately necessary, does not affect bridging. How many SMF users do you have?
About 18....not all that many.
hey thanks that worked! it might not be the prettiest solution but it works.
Error Test: "75 DOCUMENT_ROOT is not a good match BAD"
Actual Error: "Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/m/c/k/mckimds/html/cpmfetch/cpmfetch_dao.php on line 710"
Is it a bad thing that my test file shows that one bad error on test 75, how do I fix that? http://www.garbagewars.com/cpmfetch/cftest.php
Where would I put for example this code?
Code:
<?
php $objCpm->cpm_viewLastAddedMedia(1,2)
?>
I am guessing that I would put this code on the page I want it displayed, aka the http://www.garbagewars.com/includes/left_sidebar.php
But is this the only thing I include in this include to make it show? What else must I include in this php file in order for the above code to work and to show everything properly?
(basically anything I put in the left_sidebar.php include shows up on the left side of my website.)
-D
Look at the quickstart example on the web site... you need the stuff to "create" the cpmfetch object and close it. Basically its only a couple of lines and part of it just shows picutres, so you should be able to figure out which one to replace.
Ignore the error - I think it will be okay.
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
php $objCpm->cpm_viewLastAddedMedia(3,1)
$objCpm->cpm_close();
?>
php $objCpm->cpm_viewLastAddedMedia(3,1);
That doesn't make sense, remove the 'php'.
<?php
if( !defined('IN_SITE') )
{
exit;
}
?>
<div id="left-col">
<div class="block-container">
<div class="block-header" align="center">
<img src="./images/site/buttons/forums.png" alt="" />
</div>
<div class="block-content" align="center">
<a href="http://www.garbagewars.com/forums/">
<img src="http://www.garbagewars.com/images/site/ad/forum-ad.png" alt="" /></a> </div>
</div>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(3,1)
$objCpm->cpm_close();
?>
<div class="block-container" align="center">
<div class="block-header">
<img src="./images/site/buttons/affiliates.png" alt="" />
</div>
<!-- GWP Site -->
<!-- Copyright (c) 2006 GarbageWars Productions. All rights reserved. -->
<!-- http://www.garbagewars.com -->
<div class="block-content" align="center">
<a href="http://www.megamanflash.com"><img src="http://www.garbagewars.com/images/site/affiliates/megamanflash.gif" alt="" /></a> </div>
</div>
<div class="block-container" align="center">
<div class="block-header">
<img src="./images/site/buttons/linkus.png" alt="" />
</div>
<div class="block-content" align="center">
<a href="http://www.garbagewars.com"><img src="http://www.garbagewars.com/images/site/banners/88x31/GWP/gwp.gif" alt="" border="0" /></a> </div>
</div>
</div>
$objCpm->cpm_viewLastAddedMedia(3,1);
OK, now put the semi colon back at the end of the line so that it looks like this:Code: [Select]$objCpm->cpm_viewLastAddedMedia(3,1);
/**
* Takes a MySql result set and converts it to an assoc array
*
*/
function covertResultsetToArray($resultset) {
$resultarray = array();
while ($row = mysql_fetch_assoc($resultset)) {
array_push ($resultarray,$row);
}
return ($resultarray);
}
The way to fix this is listed in the release_notes file that came in the download. Look for the note about the cpg 1.4 beta thingee. Still applies to the current 1.4.x releases.
if (array_key_exists("DOCUMENT_ROOT",$_SERVER )) {
$this->fullpathtocpm = $_SERVER['DOCUMENT_ROOT'] . $this->partialUrltocpm;
} elseif (ini_get("doc_root") != "" ) {
$this->fullpathtocpm = ini_get('doc_root') . $this->partialUrltocpm;
} else {
$this->fullpathtocpm = $this->partialUrltocpm;
}
$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");
$this->setPrivateLockOn(true);
$this->dateFormatString = $this->defaultDateFormatString;
$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";
}
// Cleans up the object when we are done
function destroy ( ) {
$this->dbDisconnect();
}
You have 1.4.8, viewable on your config page and in the HTML output. Browse back througfh this thread, your issue has already been explained numerous times to numerous people.
Yes I have read through the release notes. I did the instructions to temporarly get cpm fetch working until he makes a permanent fix. As stated in my previous post, are you saying that if I am still getting errors then it can not be fixed until this new permanent fix has been created?
Like I stated above, it tells me in the release notes to uncomment line 59, but line 59 is blank, however after reading through perhaps he was off by one line or my file just happened to contain this info on line 60 because that is where I noticed the commented beta.
I uncommented them, now no errors show... except now nothing at all shows on my site's page, (no images from my gallery) it is as if I never added any code for cpm fetch... Why isn't my images showing? They are defined properly now and I am getting no errors. Do I just have to wait until a new cpm fetch version is made to fix this?
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(3,1);
$objCpm->cpm_close();
?>
No, what you did fixes it.
Yep, horrible error on my part. It was line 59 in the previous release. Good catch, and your right - its line 61.
Well, that is progress anyway.
This should be the code you are using...Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(3,1);
$objCpm->cpm_close();
?>
Now, if you are bridged with phpBB then you have a whole 'nother problem that will cause you even more grief, but will cause me considerably less since I will know what is wrong.
Thank you for all of the support guys.
So by bridged with phpBB do you mean my news system code that is only on index.php? or do you mean the includes we made to devide the sections of the template up into 4 parts? the 5th being the actual page content.
Is there anything I can do to get my images to actually show? Am I screwed?
I don't know exactly what the bridge does or how to set it up. Basically there is a way to tie cpg into the users from the forum. If you did that, I can tell you how to fix / get around it. Probably.
Oh that's what you mean, well yes I had help but we did bridge the forums with the gallery. I hope we can find a way around this, i'll be waiting for your reply.
Three options for you:
(1) De-bridge them (turn off the bridge)
(2) Create the same number of users in Coppermine that you have in your forum... just use the cpg administration tool. Good if you only have a small number of users.
(3) Wait till a version of cpm comes out that supports the bridging. I may release a new development release this weekened that simply does that uncommenting and takes out the bridge preventing stuff (but reduces functionality for others)
(4) Someone posted the code modifications for dpm_dao file, you can search for them - but do not post here for support on it, or problems you run into.
The dao code... It's like finding a needle in a haystack.
Im not quite sure how the forum was bridged with the gallery, so I guess I'll just have to wait for that development release. When you said "(but reduces functionality for others)" what do you mean? It will cause more problems to other people? Or it will be an unstable version and may have errors?
I hope I can count on this dev release, please link it here when it is released. Thank you for all the support up to this point, I really appreciate it.
I hope I can count on this dev release
Error in getImageTouse: Extension (strtolower): .jpg
File:/****/******/********/html/Pictures[b]//albums[/b]/Boat_Pictures_2005/rsthumb_Picture_032.jpg
I'm getting the following error when trying to call a random image:Code: [Select]Error in getImageTouse: Extension (strtolower): .jpg
File:/****/******/********/html/Pictures[b]//albums[/b]/Boat_Pictures_2005/rsthumb_Picture_032.jpg
I see what the problem is: I'm not using the default album name, my albums are all location in a folder called 'rs_albums', but CpmFetch isn't recognizing that fact. Also, it's placing two forward slashes after /Pictures.
Any idea how to fix this?
Disregard the B tags in my above code....
When I run cftest I get this error message. Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bymnews/public_html/cpmfetch/cpmfetch_dao.php on line 710
Do you know what it means?
This has been asked and answered so many times that I just released a new version that does the edit for you. Look on the web siteThanks a lot, you must have released the new version about 5 minutes after I downloaded the earlier one!!
http://cpmfetch.fistfullofcode.com in the downloads section - look for release 1.6.3
Mind you that this fixes the forum bridging problems also, but at the expense of being able to access the photo owner information.
Thanks a lot, you must have released the new version about 5 minutes after I downloaded the earlier one!!
Is it my imagination or is the cfrssget.php file different in 1.6.3? I could swear the one I looked at earlier had a means of doing a feed for a category and not just for the entire gallery.
<?php
include "template/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/template");
$objCpm->cpm_viewLastAddedMedia(5,1,array("imagestyle" => "cpmfetch")); $objCpm->cpm_close();
?>
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";
Hello,
Below is what i've got in my index, however I also want the image titles displayed. Please tell me how can I insert the image titles right below each image?
Thank you in advance.Code: [Select]<?php
include "template/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/template");
$objCpm->cpm_viewLastAddedMedia(5,1,array("imagestyle" => "cpmfetch")); $objCpm->cpm_close();
?>
Hi,
Im looking for a straight forward change to my local CpmFetch.
I am using a module within Joomla! (CMS) which contains this:Code: [Select]include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";
Another question that is also in the documentation
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s04.html
What I want to be able to do is to remove the hyperlink that is made to the random image is displayed, all I want is the image and thats it.
Please can someone tell me which part of the CpmFiles this is changed in?
Thanks for your time.
Thanks for the link, but I am still lost.
Where do I make this change?
Thanks for your time!
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, imagelink => "none", $options);
$objCpm->cpm_close();
echo "</center>";
So where as before I would haveCode: [Select]echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";
Now I would have this? Please correct me if I'm wrong, Im a bit confused by this.Code: [Select]echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, imagelink => "none", $options);
$objCpm->cpm_close();
echo "</center>";
Thanks for your time.
$objCpm->cpm_viewRandomMedia(1,1, array(imagelink => "none"));
$options = array (imagelink => "none");
$objCpm->cpm_viewRandomMedia(1,1, $options);
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$options = array (imagelink => "none");
$options2 = array ( imagewidth=> "20px");
$objCpm->cpm_viewRandomMedia(1,1, $options, $options2);
$objCpm->cpm_close();
echo "</center>";
Thanks, working perfectly, i understand how its working now, just!
But if i want to add another option like image size and width, do i add another option array? I have read the page on image sizing and have seen if i just specify the imagewidth it will keep the ratio, so is it something like this?Code: [Select]echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$options = array (imagelink => "none");
$options2 = array ( imagewidth=> "20px");
$objCpm->cpm_viewRandomMedia(1,1, $options, $options2);
$objCpm->cpm_close();
echo "</center>";
$options = array ('imagelink' => 'none', 'imagewidth'=> '20px');
You could also be insane.You've got it, I'm completely nuts. Don't know how anyone can look at code for a couple of hours and be anything else! ;D
Are you thinking of rss_lastadded.php ?
This is no specific way to do that, but if you trace through the cfrssget.php file adding in a source should not be too hard. I would make a copy of the rss_lastadded.php to a new name (like rss_myfeed.php or somethign more descriptive.)
Then modify that line that looks like:
$cfrss->addLastAddedMedia($totalToShow);
To include a source entry:
$cfrss->addLastAddedMedia($totalToShow,"cat=5");
That will do category 5... I think, I did not test it... just peaked at the code quickly.
You've got it, I'm completely nuts. Don't know how anyone can look at code for a couple of hours and be anything else! ;D
Yesterday, I created an RSS feed from the whole gallery, using Tarique's script, and to my utter amazement it worked first time. Snag was that, straight away, we had folks saying "Can we just have latest Yacht Racing pix?", so here I came!!!
Have tried your trick and when I put www.bymnews.com/cpmfetch/rss_yachtrace.php in Feed Reader I got No RSS URLs found. I then checked with last added and got the same result, so I've obviously screwed something.
?????????
I uploaded the files, and got as far as being able to make the test work (see it here: http://www.mydpnet.com/cpmfetch/cftest.php). Now I have no idea what to do next. I read documentation for this, but I just got more and more confused the more i read it.
What I'm trying to accomplish is getting this mod to show the newest photo uploaded to the gallery on my HTML coded home page found at www.mydpnet.com.
Any help would be greatly appricated.
Ok, I feel silly. I did read that thing before I started, but it was a path error. Everything is working the way I want it to, except one thing. How do I get it to appear on a HTML page that is not in the same directory as CPMFETCH.
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$objCpm->cpm_viewRandomMedia(1,1,array("windowtarget" => "_blank","imagestyle" => "imgborder", "imagewidth" => "140"));
$objCpm->cpm_close();
?>
Hi all,
I'm having problems with displaying the images on my website. When i run cftest.php it fails to find the config.inc.php file (http://www.nordisktfiske.se/cpmfetch/cftest.php)
I have cpmfetch in a sperate folder and the copperimne gallery is in /photos.
In order to display the images on my site i use this code:Code: [Select]<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$objCpm->cpm_viewRandomMedia(1,1,array("windowtarget" => "_blank","imagestyle" => "imgborder", "imagewidth" => "140"));
$objCpm->cpm_close();
?>
All of this work on an other website I had but not on this one. Can someone see what the problem is?
I've been looking thru the forum, but with no luck.
$objCpm = new cpm("../../home/nordisktfiske.se/www/photos");
Really strange...
I tried with your solution, but it turned out like this:
Path to Coppermine incorrect. (/var/www../../home/nordisktfiske.se/www/photos//include/config.inc.php)
$objCpm = new cpm("/../../home/nordisktfiske.se/www/photos");
Thanks for the help, but I still get an error:
ERROR: Path to Coppermine incorrect. (/var/www/../../home/nordisktfiske.se/www/photos//include/config.inc.php)
It looks like I wont be able to use this on the site.
if (array_key_exists("DOCUMENT_ROOT",$_SERVER )) {
$this->filepathtocpm = $_SERVER['DOCUMENT_ROOT'] . $urltocpm_;
} elseif (ini_get("doc_root") != "") {
$this->filepathtocpm = "/home/nordisktfiske.se/www/photos/";
Woohoo!!!
Now I got something different:
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/nordisktfiske.se/www/cpmfetch/cpmfetch_dao.php on line 710
but it looks like it will work :)
I found it while searching the forum and I change the big sql statement in cpmfetch_dao.php.
Now I get Error in getImageTouse: Extension (strtolower): .jpg
The server has GD 2 installed.
Hi, I'm using Coppermine 1.4.8 and I am trying to use CPFetch to call images from all of my member's albums. they are not private, however when I use
print "<center>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMedia(5,1,array("imagesize" => "Thumb","windowtarget" => "_new","subtitle" => "Member: %o - %c "));
$objCpm->cpm_close();
print "</center>";
I ONLY get images from the album created by the admin. I have tried using "cat=1" but that creates an error. Do I need to change something in my dao.php file? I've been searching the board but can't find an answer. Can someone help me please?
Can someone answer my question please or direct me to a thread that does?
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
Im using CPG 1.6.3 , the cpmfetch is place in www/gallery/cpmfetch and im trying to show the pic but there seems to be wrong with the code.. Anyone please kindly help me. Thanks in advance..Code: [Select]// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
You don't give us much to work with... You neglected to say what happened... do you get errors? wrong images?
One thing may need changing is:
$objCpm = new cpm("./gallery");
to
$objCpm = new cpm("/gallery");
Otherwise, post a URL or an actual problem to be solved
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
echo '
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
?>
// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
For an HTML (non-php) page you cannot do that as it is... I've got a few work arounds in here that you can use depending on what you want to do.
1. You can use cfimageget - but that limits you to one image
2. You can use Server Side Includes to include a php file that executes the cpmfetch commands
3. Make your .HTML pages .PHP pages
Probably #2 you want
Hello, i dont get any error for the cpmfetch test :
http://www.friendsterforum.com/gallery/cpmfetch/cftest.php
as for the testing link is :
http://www.friendsterforum.com/forum/1.php
here's my current code :
<?phpCode: [Select]// The Gallery
echo '
<tr>
<td class="titlebg" colspan="2">FF Gallery</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="../gallery/">
<img src="', $settings['images_url'], '/galleryicon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
<td class="windowbg2" width="100%">
echo '
include "../gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia (1,7);
$objCpm->cpm_close();
</div>
</td>
</tr>';
?>
I found the documentation to this at http://www.fistfullofcode.com/projects/copperminefetch/manual/ch11.html. I was doing fine until I got to the 5th bullet. I went to the SSI documentation too, and that only confused me more. I'm sure its a simple fix, for someone how knows what they are doing (not me).
<!--#include virtual="/cpmfetch/randomimages.php" -->
<?php
include "./cpmfetch.php";
$objCpm = new cpm("/photos");
$options = array( 'subtitle' => '%t by %o' );
$objCpm->cpm_viewLastAddedMediaFrom (1,1, "",$options);
$objCpm->cpm_close();
?>
<!--#include virtual="/cpmfetch/randomimages.php" -->
I'm still doing something wrong! grrr.
You can see that the randomimage.php file works. You can see it here: http://www.mydpnet.com/cpmfetch/randomimages.php
But it wont work on the HTML page: http://www.mydpnet.com/ (it should come into view under the "Newest Photo" header, but it wont)
What do I do now?
I guess I could play around with converting the homepage to PHP. Ill let you know how it turns out.
I did it! And look how it turned out! www.mydpnet.com
What do you think?
Dear Friends,
i wish to display the list of last updates albums with there links it should look like this
KRRISH
FANNA
Kabul Express
Tom Dick and Harry
so what ever albums are newly added of updated can be seen on home page so i dont have to add them manually again and again.
www.lakesparadise.com
-----------------------
one more thing when i fetch the gallery using cpm fetch it fetches pictures from same album i want unique pictures from last updated five albums each no metter whether they are random of last updated instead of all five pics from last added album.
please help me...
function cpm_viewRandomMediaFromAlbum ($rows, $columns, $albumid, $options="" ("imagestyle" => "test1"));) {
cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
I've even tried this as well, exactly as posted on the above link:Code: [Select]cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
I used the exact same stylesheet and names according to the link above, but I keep getting parse errors. Can you please let me know what I am doing wrong?
John
img src="//albums/userpics/10008/thumb_PIC00157.jpg
/displayimage.php?pos=-289
Did you include a css stylesheet in your page defining those?
Yes, I included a .css stylesheet named imagestyle.css within the cpmfetch folder, exactly like the link I provided in the last thread.QuoteThe imagestyle tag only adds it into the html cpmfetch generates - it does not define it anywhere in the page. That is up to you.
I am only trying to define the tag for cpm_viewRandomMediaFromAlbum as quoted on my last thread. Is there anything wrong with the code? I have tried several attempts with no luck. Can you help?
Yes, I included a .css stylesheet named imagestyle.css within the cpmfetch folder, exactly like the link I provided in the last thread.
I am only trying to define the tag for cpm_viewRandomMediaFromAlbum as quoted on my last thread. Is there anything wrong with the code? I have tried several attempts with no luck. Can you help?
Hello!
I have integrated cpmfetch (v. 1.6.2) to my coppermine gallery (v. 1.4.8 ) and tried to running cftest.php. It works, but only partially. The url of the image seems indeed correct, but i missing the thumbnails. My gallery is installed in the root-directory and i have set the directory variable with a slash. In the image path i missing the url of my site, because in the path i have two slashes. The path of the thumbnails looks like this:Code: [Select]img src="//albums/userpics/10008/thumb_PIC00157.jpg
whereas the url to the full image is correctly:Code: [Select]/displayimage.php?pos=-289
The url of my site is: www.clickfreepic.de
What can i do to got a right image path?
PS. Sorry for my poor english!
I've seen this before... I think. You could try searching the forums here for the answer. When I remember what causes this I will repost if you have not found it.
Can you post the page this is happening on?
Sure....the page is http://largedogbreedz.com (http://largedogbreedz.com)
While the style sheet is not being set on the image, so there is somethign in the call you areI am simply wanting to change the border color and border pixel width. It doesn't match my site as of now.
Can you post up the full chunk of php that is making that image appear? I know you posted the one line before, but we are missing something. Also, what effect are you trying to get out of it (borders, text bolded, etc)
Thanks
I am simply wanting to change the border color and border pixel width. It doesn't match my site as of now.
Let me see if im reading this correctly. You want me to post the entire code for cpmfetch.php? I just want to make sure because, it is a very long piece of code.
Heh, no - the PHP code you put into your page that is not working. I have the code for cpmfetch.
* Displays random images from specific album or category
*
* This will generate a table and populate it with random media from the combination of
* categories and albums specified and style it based on entries in the style hash.
* The number of photos returned matches the number of rows multiplied by the number of columns.
* Supports the setReturnType option.
*
* @param int $rows The number of rows desired in the output
* @param int $columns The number of columns desired in the output
* @param int $sources The sources you want to draw from ("cat=1,4,5:album=6,7,8")
* @param array $options Optional, Configuration options
* @todo allow for media to be specified / filtered - jpg, mp3, etc
*/
function cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
{
$this->loadOptions($options);
$resultset = $this->cpm->getRandomImageFrom ($source, $rows*$columns);
$retval = "";
switch ($this->returntype) {
case ('resultset'):
$retval = $resultset;
break;
case ('html'):
$retval = $this->createTable($resultset,$rows,$columns);
break;
case ('print'):
default:
print $this->createTable($resultset,$rows,$columns);
}
$this->clearOptions();
return ($retval);
}
<style type="text/css">
img.test1 {
border-style:solid;
border-width:1px;
border-color: #ffffff;
margin: 2px; }
img.test1:hover {
border-style:solid;
border-width:1px;
border-color: #ffffff;
margin: 2px; }
</style>
ok....I hope this is what you need.Code: [Select]* Displays random images from specific album or category
*
* This will generate a table and populate it with random media from the combination of
* categories and albums specified and style it based on entries in the style hash.
* The number of photos returned matches the number of rows multiplied by the number of columns.
* Supports the setReturnType option.
*
* @param int $rows The number of rows desired in the output
* @param int $columns The number of columns desired in the output
* @param int $sources The sources you want to draw from ("cat=1,4,5:album=6,7,8")
* @param array $options Optional, Configuration options
* @todo allow for media to be specified / filtered - jpg, mp3, etc
*/
function cpm_viewRandomMediaFromAlbum(2,2,17,array("imagestyle" => "test1"));
{
$this->loadOptions($options);
$resultset = $this->cpm->getRandomImageFrom ($source, $rows*$columns);
$retval = "";
switch ($this->returntype) {
case ('resultset'):
$retval = $resultset;
break;
case ('html'):
$retval = $this->createTable($resultset,$rows,$columns);
break;
case ('print'):
default:
print $this->createTable($resultset,$rows,$columns);
}
$this->clearOptions();
return ($retval);
}
My stylesheet labeled "imagestyle.css" looks like this. Just in case.
I hope this helps.
Did you modify the cpmfetch.php file or something? Why? There should be NOTHING in there you need to touch. NOTHING.
Everything you need to change you can do from your php page. That is code I need... the part you added into your own page.
OK.........first, I already told you that it was the cpmfetch.php file that I added the css style value to. I am not trying to modify your script, so why such hostility?
I have been trying to follow the instructions on this link: http://www.fistfullofcode.com/projects/copperminefetch/tips.php
The link does not specify a file of any sort in which I add the css value to. The only file that had the "cpm_viewRandomMediaFromAlbum" value was cpmfetch.php, so I automatically assumed that it was the cpmfetch.php file that I had to add the css value to. I am just trying to follow your directions on the posted link. NOTHING more, NOTHING less.
The cpmfetch is currently showing within a module found here: http://dev.sirronald.com/index.php?option=com_content&task=view&id=5&Itemid=3 . If there is a file within cpmfetch that I need to adjust in order to change the border, please let me know. If I am asking the wrong person for help......well, sorry to waste your time.
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","imagestyle" => "test1"));
$objCpm->cpm_close();
?>
Ok so I went here http://www.fistfullofcode.com/projects/copperminefetch/tests/test3.php
and I want to display the image description (dont know if it's possible.) but also the rating, and views. But it seems I can only have either rating or views, not both. How can I have all three of these displayed on my site?
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/
//begin validation
defined( '_VALID_MOS' ) or die( 'Restricted access' );
//end validation
//begin module parameters
$gallery = $params->get('gallery');
$cpmFetch = $params->get('cpmFetch');
//end module parameters
$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";
?>
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/
//begin validation
defined( '_VALID_MOS' ) or die( 'Restricted access' );
//end validation
//begin module parameters
$gallery = $params->get('gallery');
$cpmFetch = $params->get('cpmFetch');
//end module parameters
$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));
$objCpm->cpm_close();
echo "</center>";
?>
Ok Vuud.....here is exactly what I have.
My stylesheet for the module is located here: http://largedogbreedz.com/modules/imagestyle.css (http://largedogbreedz.com/modules/imagestyle.css)
The module "mod_randomcpg.php" looks like this originally, which I'm sure you already know:Code: [Select]<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/
//begin validation
defined( '_VALID_MOS' ) or die( 'Restricted access' );
//end validation
//begin module parameters
$gallery = $params->get('gallery');
$cpmFetch = $params->get('cpmFetch');
//end module parameters
$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, $options);
$objCpm->cpm_close();
echo "</center>";
?>
I added the css style to the $objCpm->cpm_viewRandomMedia(1,1, $options); value so that it looks like this:Code: [Select]<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/
//begin validation
defined( '_VALID_MOS' ) or die( 'Restricted access' );
//end validation
//begin module parameters
$gallery = $params->get('gallery');
$cpmFetch = $params->get('cpmFetch');
//end module parameters
$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));
$objCpm->cpm_close();
echo "</center>";
?>
Still no change in border color. I do not understand why.
link href="http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css" rel="stylesheet" type="text/css"
I never got my main question answered :-\
Where do I define the css page? On my site? or somewhere in the cpmfetch? I tried defining it but it didn't work, I just got an error.
and I want to display the image description (dont know if it's possible.) but also the rating, and views. But it seems I can only have either rating or views, not both. How can I have all three of these displayed on my site?
Also, how can I change their text size and or colors for the font of (views, rated, description) and where can I edit to make those fonts centered or position them differently? Right now the default text is black.
<?php
/**
* @copyright (C) 2006 EStructure Solutions
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/
//begin validation
defined( '_VALID_MOS' ) or die( 'Restricted access' );
//end validation
//begin module parameters
$gallery = $params->get('gallery');
$cpmFetch = $params->get('cpmFetch');
//end module parameters
$options = array('subtitle' => '<font style:"font-size: 8pt;">%t');
echo "<center>";
include $cpmFetch."/cpmfetch.php";
$objCpm = new cpm($gallery);
$objCpm->cpm_viewRandomMedia(1,1, array("template_css" => "test1"));
$objCpm->cpm_close();
echo "</center>";
?>
$objCpm->cpm_viewRandomMedia(1,1, array("template_css" => "test1"));
$objCpm->cpm_viewRandomMedia(1,1, array("imagestyle" => "test1"));
Thank you for your patience and insight. I made the adjustments as you stated in your last thread, but this blue border just doesn't want to go away.
I added the css style from my last thread to my main stylesheet (template_css), but to no avail. For the sake of experimenting, I even replaced the "test1" css value with other css values from my stylesheet and nothing seems to change this border color?
Any more suggestions?
If you can look at the source code of your page (from a browser) and see that the image cpmfetch put in for you has class="cssname" (where cssname is whatever you want to us)... then its a CSS issue - which is really beyond the scope of this thread. The link I mentioned before has some self education reading on there that could help you.
If you use firefox, the web developer extenstion is very handy and has an option in it to simply view the css the page knows about. Its also got a ton of other cool stuff in it.
I just looked at you main page, and there is no css tag on the image... maybe I am looking in the wrong place, or you are editing it as we speak. I also did not see any entries in the css file that page is using.
Is there a test page you are doing this all on or something?
I took a look at the source code from IE and did see that there is no css tag posted there, but I did post the css tag within the mod_randomcpg.php module. The code for this module was posted on my last thread.
For some odd reason, IE is not posting the css style tag, BUT I just found out that Firefox is. The border is exactly how I want it to look within Firefox. If you take a look at my homepage, you will see that the border is brown. My main website style sheet is located here: http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css (http://largedogbreedz.com/templates/box_rain_brown/css/template_css.css) . On line 18 and 25 you will see where I added the img.test1 css style. This is wierd :-\
I did tell you that 3 hours ago, maybe you missed my post...
I did tell you that 3 hours ago, maybe you missed my post...