Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 ... 18 19 20 21 [22] 23 24 25 26 ... 34   Go Down

Author Topic: CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG  (Read 390456 times)

0 Members and 1 Guest are viewing this topic.

Texan78

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #420 on: April 08, 2005, 10:52:24 pm »

<img src="gallery"/cfimageget.php?album=7" />


my portal is http://www.texascampingforum.com/forum/portal.php
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #421 on: April 08, 2005, 11:01:44 pm »

<img src="gallery"/cfimageget.php?album=7" />


my portal is http://www.texascampingforum.com/forum/portal.php


Your forums are php pages... I would recommend not doing the cfimageget and instead use the normal coppermine.php file...

see the quickstart on
http://cpmfetch.fistfullofcode.com

for a quick illustration of the code you would need to put in.

If you are intent on following this route...

1) Your path is clearly wrong in those tags.  the img tag src should be pointing at the cfimageget.php file

2) You need to open cfimageget.php and change two things at the top (one is the same sort of change you had to make to the cftest.php and the other allows you to query cfimageget.php directly.







Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Texan78

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #422 on: April 08, 2005, 11:37:58 pm »

OK thanks for the advice. I'm just trying to take the easiet approach to display random pics on my portal. Dont wanna get real fancy at the moment. I used this code in mt portal.php and still got nothing.

Code: [Select]
<?php 
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #423 on: April 08, 2005, 11:44:43 pm »


Yeah, this is not really non-programmer super friendly.

You got the "/gallery" part right, but that include is probably not right for your installation.

Change the include "./CoppermineFetch/coppermine.php";

to the actual path to where the coppermine.php file is located.   So if the coppermine.php file is in the same directory as the forum, then it would be just:

include "./coppermine.php";

Or whereever... that should find it... the 2,2 will do a 2 x 2 grid of 4 images... if you want a different scheme just change the numbers...  its rows x columns.  So 4,1 would give you 4 photos ( 1 per row )











OK thanks for the advice. I'm just trying to take the easiet approach to display random pics on my portal. Dont wanna get real fancy at the moment. I used this code in mt portal.php and still got nothing.

Code: [Select]
<?php 
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Texan78

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #424 on: April 09, 2005, 12:55:28 am »

Ok well i used this code and it worked, but it threw a ton or erros on my portal when i tried to replace the smartors  code with this one so it would display in the ezPortal

Code: [Select]
include "./coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();

  My idea i had didnt work so back to the drawing board...LoL Thanks for your help and patience with me.
Logged

cdrake

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 67
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #425 on: April 09, 2005, 01:37:06 am »

Have you made it where you can include gif custom thumbnails yet?

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #426 on: April 09, 2005, 02:04:10 am »

Ok well i used this code and it worked, but it threw a ton or erros on my portal when i tried to replace the smartors  code with this one so it would display in the ezPortal

Code: [Select]
include "./coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();

  My idea i had didnt work so back to the drawing board...LoL Thanks for your help and patience with me.

I have no idea what smartors code is... although there is no reason why this should not work...
Try the way you were doing it before... with cfimageget




Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Texan78

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #427 on: April 09, 2005, 02:28:15 am »

How do i go about using that code and what do i have to change in order to use that one?
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #428 on: April 09, 2005, 04:53:24 am »

@vuud

I have the following code within my BoardIndex.template file in smf forum

Code: [Select]
echo '<div class="tborder"style="width: 180px;"><table border="0" width="180" cellspacing="1" cellpadding="5" style="table-layout: fixed;">
<tr>
<td class="catbg" width="100%" >ShoutBox</td>
</tr>
<tr>
<td class="windowbg2" width="100%" valign="middle" align="center" colspan="2"><div style="overflow: auto; width: 100%;">',smfshout(),'</div></td>
</tr>
<tr><td class="catbg" width="100%">Random Gallery Images</td></tr>
<tr><td width="100%" align="center">';
include "coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(6,1);
$objCpm->cpm_close();

echo'</td></tr>';

and while it does return 6 random photos in 1 row. I get an sql error showing on the bottom of the forum, i am running a bridge version of smf and coppermine. Any ideas? Is it the bridging?

2: mysql_query(): 8 is not a valid MySQL-Link resource
File: /home/phantasy/public_html/forum/Sources/Subs.php
Line: 232

Thanks,

snork13
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #429 on: April 09, 2005, 06:45:18 am »

How do i go about using that code and what do i have to change in order to use that one?

1) Go back to using cfimageget.php in img src tags like you were doing...

2) In a prior post to you I noted that you would have to edit the cfimageget.php file to do it... see that post for hints on the 2 lines you need to change

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #430 on: April 09, 2005, 06:47:56 am »

@vuud

I have the following code within my BoardIndex.template file in smf forum

Code: [Select]
echo '<div class="tborder"style="width: 180px;"><table border="0" width="180" cellspacing="1" cellpadding="5" style="table-layout: fixed;">
<tr>
<td class="catbg" width="100%" >ShoutBox</td>
</tr>
<tr>
<td class="windowbg2" width="100%" valign="middle" align="center" colspan="2"><div style="overflow: auto; width: 100%;">',smfshout(),'</div></td>
</tr>
<tr><td class="catbg" width="100%">Random Gallery Images</td></tr>
<tr><td width="100%" align="center">';
include "coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(6,1);
$objCpm->cpm_close();

echo'</td></tr>';

and while it does return 6 random photos in 1 row. I get an sql error showing on the bottom of the forum, i am running a bridge version of smf and coppermine. Any ideas? Is it the bridging?

2: mysql_query(): 8 is not a valid MySQL-Link resource
File: /home/phantasy/public_html/forum/Sources/Subs.php
Line: 232

Thanks,

snork13


It does not seem like it is a mysql error from my code...  if you comment out the cpmfetch stuff do you still get the error?  Strange



Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #431 on: April 09, 2005, 06:48:47 am »

Have you made it where you can include gif custom thumbnails yet?

No, but I really really want to

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Texan78

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #432 on: April 09, 2005, 07:24:08 am »

OK im not just real sure what to edit, but here is what i did edit:

Code: [Select]
require_once "coppermine_dao.php";

// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = false;

if ($ALLOW_DIRECT_ACCESS && substr($_SERVER['SCRIPT_FILENAME'],-14) == "cfimageget.php") {

// This one you need to adjust unless your galler is at http://www.texascampingforum/gallery
// If you installed right to the root of your web site, just use a /
$urltocpm = "/gallery/";

// If no cmd= is submitted, it will do this:
$default_command = "random";

// This would allow for non-public photos to be shown if set to FALSE
$do_not_show_private = true;

// Change these only if you know what you are doing... its determines how your photos are named
$thumbnailprefix='thumb_';
$intermedprefix='normal_';
$fullsizeprefix='';

$cpmfetch = new cfimageget($urltocpm);

// $cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));



here is how the call is, i dont know if this is correct, if it is its not working

<img src="/gallery/cfimageget.php">


Im sooooo close now. I actually have a block built for my portal that will work with this code if i can get it working.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #433 on: April 09, 2005, 09:18:19 am »


Change this to true
$ALLOW_DIRECT_ACCESS = true;



OK im not just real sure what to edit, but here is what i did edit:

Code: [Select]
require_once "coppermine_dao.php";

// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = false;

if ($ALLOW_DIRECT_AC




CESS && substr($_SERVER['SCRIPT_FILENAME'],-14) == "cfimageget.php") {

// This one you need to adjust unless your galler is at http://www.texascampingforum/gallery
// If you installed right to the root of your web site, just use a /
$urltocpm = "/gallery/";

// If no cmd= is submitted, it will do this:
$default_command = "random";

// This would allow for non-public photos to be shown if set to FALSE
$do_not_show_private = true;

// Change these only if you know what you are doing... its determines how your photos are named
$thumbnailprefix='thumb_';
$intermedprefix='normal_';
$fullsizeprefix='';

$cpmfetch = new cfimageget($urltocpm);

// $cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));



here is how the call is, i dont know if this is correct, if it is its not working

<img src="/gallery/cfimageget.php">


Im sooooo close now. I actually have a block built for my portal that will work with this code if i can get it working.
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

jaslow

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #434 on: April 09, 2005, 09:54:11 am »

hi im sorry but im a real real idiot.. im not very pro in php
wat i want to do is to add the last 4 images into my invision2.0 board.
ive installed ur mod and tried the cftest.php and my thumbnails now.

but i dono what to do now.. how do i add the code into invision so tht it can display the images?  


many thanks.


I don't know invision at all, but if you can edit the templates, you can probably do something by just adding in the php code

http://cpmfetch.fistfullofcode.com/projects/copperminefetch/quickstart.php

Instead of the call thats there though...  use one of the last image ones shown in

http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html






ok how about this.. how do i add into part of an existing php page?
coz the code below is meant to insert in a blank php page.

Code: [Select]
<?php 
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #435 on: April 09, 2005, 09:59:51 am »

ok how about this.. how do i add into part of an existing php page?
coz the code below is meant to insert in a blank php page.

Code: [Select]
<?php 
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


No, that code can go into any page...   And if it is the only thing in a file, it will not generate a valid html page

it does not create anything besides a table to hold the images.  I use it on my site by inserting it directly into existing pages that do other things.  make sure you change /gallery to wherever your CPG is...  Also, the include has to get to where you installed the cpmfetch stuff.





Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Texan78

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #436 on: April 09, 2005, 10:17:16 am »

Ok i changed it to true and still nothing

is this correct <img src="/gallery/cfimageget.php">


i have a real good feeling that its wrong.
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #437 on: April 09, 2005, 04:07:51 pm »

@vuud

I have the following code within my BoardIndex.template file in smf forum

Code: [Select]
echo '<div class="tborder"style="width: 180px;"><table border="0" width="180" cellspacing="1" cellpadding="5" style="table-layout: fixed;">
<tr>
<td class="catbg" width="100%" >ShoutBox</td>
</tr>
<tr>
<td class="windowbg2" width="100%" valign="middle" align="center" colspan="2"><div style="overflow: auto; width: 100%;">',smfshout(),'</div></td>
</tr>
<tr><td class="catbg" width="100%">Random Gallery Images</td></tr>
<tr><td width="100%" align="center">';
include "coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(6,1);
$objCpm->cpm_close();

echo'</td></tr>';

and while it does return 6 random photos in 1 row. I get an sql error showing on the bottom of the forum, i am running a bridge version of smf and coppermine. Any ideas? Is it the bridging?

2: mysql_query(): 8 is not a valid MySQL-Link resource
File: /home/phantasy/public_html/forum/Sources/Subs.php
Line: 232

Thanks,

snork13


It does not seem like it is a mysql error from my code...  if you comment out the cpmfetch stuff do you still get the error?  Strange





If I comment out the code, I DO NOT get the error. Strange for sure. Any ideas?

here is the lines of code from Subs.php

   
Code: [Select]
$ret = &mysql_query($db_string, $db_connection);
if ($ret === false)
$ret = db_error($db_string, $file, $line);

snork13
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #438 on: April 09, 2005, 05:38:00 pm »

You do know that certain functions in SMF conflict with Coppermine, right?  Most likely CpmFetch, which is probably use to the Coppermine database functions, is now using SMF's database functions, which are different and require different parameters.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #439 on: April 09, 2005, 07:08:43 pm »

You do know that certain functions in SMF conflict with Coppermine, right?  Most likely CpmFetch, which is probably use to the Coppermine database functions, is now using SMF's database functions, which are different and require different parameters.

this is what i thought, :-[  oh well..I wish I had the time and the knowledge to make it work with the forum. I will have to take a closer look at the parameters.

thanks
Logged
Pages: 1 ... 18 19 20 21 [22] 23 24 25 26 ... 34   Go Up
 

Page created in 0.052 seconds with 19 queries.