TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 379
  • Total: 379

Random photos from coppermine

Started by carver, September 22, 2005, 01:32:19 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

domp

Quote from: crip on December 11, 2005, 10:02:31 PM
Hopeless
I think it's a problem with your path ?  I'm not sure but i know i'be spend a lot of time to confugure coppermine/cpmfetch.




crip

Ok..
I read everything and came up with this and it still sends Errors....

./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();


Thats what I put be stillll errors, but the cmptest.php works great..anyone willing to help a poor helpless Wet Naked cripple!?!  >:D  :2funny:  :knuppel2:

crip~

snork13

ok, what version of cpmfetch & version of smf!
Location of software install on server.

i d/l recent cpmfetch, and have it running on my index page.

sample--> http://www.phantasyposters.org/

what i did on my index page :):

<?
echo'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<meta name="ROBOTS" content="ALL">
<meta name="Copyright" content="Copyright (c) ME snork13">
<meta http-equiv="imagetoolbar" content="no">
<meta name="MSSmartTagsPreventParsing" content="true">
<meta name="Rating" content="General">
<meta name="revisit-after" content="5 Days">
<meta name="doc-class" content="Living Document">
<meta http-equiv="pragma" content="no-cache">
<link rel="icon" href="images/favicon.ico" type="image/ico" >
<title>Phantasyposter - Dev</title>
<style type="text/css">
img.test1 { 
          border-style:solid;
          border-width:1px;
          border-color: #666666;
          margin: 7px;
  filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color=#cccccc, Positive=true);  }
   </style>
</head>

<body>

<table align="center"><td colspan="2">&nbsp;</td></tr>
<tr><td width="100"align="center" style="padding-bottom: 7px;" class="gal">';
include "/home/LOCATION ON Your Server/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array( 'subtitle' => 'Photo added %D days ago<br />Views [ %h ]' , 'imagestyle' =>"test1");
$objCpm->cpm_viewRandomMedia (2,1,$options);
echo'</td></tr></table>

<div align="center">
  <p>Welcome</p>
  <p><a href="http://www.phantasyposters.org/forum">Enter</a> </p>
</div>
</body>
</html>
'; ?>


--snork13

crip

What about using somethiing different than Coppermine? ..such as (folderblog) .. it'a a small php script, without a database..can I show a random photo with this in a block??

my Url : http://www.tnquad.us/fb/fb.php

Tanks,
crip~

snork13

@crip

yes, i'm sure you could use a number of photo gallery scripts, as well as the one bloc is working on, i noticed another new photo gallery design for smf just the other day. I'm just saying i have experience with coppermine, i feel at home with it...so this is what i use. I did setup the coperminefetch in about 5 mins, had to do the comment one line, open the other for it to work with 1.42 coppermine. if you need any help contact me via pm...

-snork13

crip

Ty snork13,

I do appericate it. :)

crip~

Teck

Hi :)

I use this block:


Make a new block, phpbox and put the code (please, check the patchs)
And the code is:
<?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>';
?>

ynohtna

Hope everyone is enjoying the holiday season!

Maybe not the right place but since I learn about cpmfetch from you guys... :)

I have a problem with cpmfetch and not sure where to start fixing it.  I defined my coppermine folder and everything passed in the cftest.php file.  But when the part of the cftest shows some thumbnails I get

QuoteTrying to display some images:

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/ynohtna/websites/elmira-anthony.ca/cpmfetch/cpmfetch_dao.php on line 710



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.

I just installed cpg for the first time today and I installed 1.4.3.  I installed cpg, put some files online and then integrated with SMF using the bridge integrator.

What could be the problem?  I didn't really change any prefixes except that the database tables for cpg start with cpg and not the default cpg143.   While the cpmfetch help say I may need to check these for non-standard prefixes
Quote//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_";
I didn't change anything... where do I find these thumb_ prefixes?  are they database tables?  Because I have no tables with thumb_ prefixes.

Many thanks.

ynohtna

my problem was fix by opening up cpmfetch_dao.php and commenting out the line for the query reference for CPG version prior to 1.4 and uncommenting the one for cpg 1.4.1 beta1

I'm using cpg 1.4.3 (stable)

// 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';



Tee

just thought I would let you look at something I been working on with another portal, I have coppermine on a page, check it out at http://jaxdoug.com/e2themes/index.php?page=gallery.

Doug :idiot2:

This website is proudly hosted on Crocweb Cloud Website Hosting.