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 ... 45 46 47 48 [49] 50 51 52 53 54   Go Down

Author Topic: CpmFetch 1.4 On... Displaying data and images from CPG on your website  (Read 966010 times)

0 Members and 2 Guests are viewing this topic.

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #960 on: August 01, 2006, 08:10:26 pm »

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?
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

twofer

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #961 on: August 01, 2006, 08:16:12 pm »

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.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #962 on: August 01, 2006, 08:25:04 pm »

About 18....not all that many.

The easiest thing may be to go into cpg and create 18 users... Names and stuff do not matter, they just need to have entries in the cpg users table.

A more permanent solution for the bridging is in the works.
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

twofer

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #963 on: August 01, 2006, 08:49:48 pm »

hey thanks that worked! it might not be the prettiest solution but it works.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #964 on: August 01, 2006, 09:15:43 pm »

hey thanks that worked! it might not be the prettiest solution but it works.

Yeah, as long as the "id" of the SMF person adding the picture has an equivalent in the cpg user table, it can grab the photo.

Like I said, fixes on the way.

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

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #965 on: August 04, 2006, 05:12:59 am »

Im still learning php, so I am a tad bit n00bish. However I am in dire need, I have read through most of the FAQ and I uploaded the cpmfetch folder. I ran the test and I got only one error...

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"



I did not see any images in the test most likely due to this error. I am still confused on what is needed and where to run this mod properly. Im deeply sorry for my currently poor php skills. However my website needs this feature badly. I am willing to give someone temporary ftp access if it is needed.

I would love to get support through aim, this post, or you can pm me.

Please help me out here, I have spent days trying to find a way to do this and then I stumbled upon this thread. I would really appreciate it if someone out there could give me their time to help me learn what to do to get this running properly.

Thank you for reading my post,

-David
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #966 on: August 04, 2006, 07:06:44 am »

Error Test: "75   DOCUMENT_ROOT is not a good match   BAD"

This means the path to the script and the document root do not match.  Resolve the problem below, see if it starts working anyway.  If not, please PM or post the link to the cftest.php page.

Quote
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"

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.


Your welcome
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

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #967 on: August 04, 2006, 05:11:53 pm »

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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #968 on: August 04, 2006, 05:19:07 pm »

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.


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

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #969 on: August 04, 2006, 06:38:23 pm »

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.




I am sorry I didn't state this prior, but I have already done all that. I don't mean to be rude, but I would really appreciate some help here rather than a point into a direction.

From what I have gathered I should just be able to put this following code into anywhere on my ./includes/left_sidebar.php page and it should work properly...

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


Well it doesn't work, I get errors such as...
http://www.garbagewars.com/
Logged

Nibbler

  • Guest
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #970 on: August 04, 2006, 06:54:36 pm »

Quote
php $objCpm->cpm_viewLastAddedMedia(3,1);

That doesn't make sense, remove the 'php'.
Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #971 on: August 04, 2006, 07:10:18 pm »

That doesn't make sense, remove the 'php'.

XD your correct, however even after making the change; it's still not working  :'(
http://www.garbagewars.com/
Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #972 on: August 04, 2006, 07:13:04 pm »

Sorry I forgot to include, here is my entire ./include/left_sidebar.php

Code: [Select]
<?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>
Logged

Nibbler

  • Guest
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #973 on: August 04, 2006, 07:30:16 pm »

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);
Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #974 on: August 04, 2006, 09:32:13 pm »

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);

XD a bad copy and paste, thanks for noticing.

I now get this error though, but this time it's not the whole page error its just where the image should be.

"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"

I went to line 710 on _dao to check what was there and I see this...
These are lines 703-715
Code: [Select]
/**
* 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);
}
Logged

Nibbler

  • Guest
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #975 on: August 04, 2006, 10:36:55 pm »

You already got an answer to that one.

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.
Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #976 on: August 04, 2006, 10:58:27 pm »

Note: I am using cpm fetch ver. 1.6.2

XD ok so I read through the release notes and I commented line 54, however it says to uncomment line 59, but I have no line 59; it's just blank @_@

Also how do I check what version of coppermine I currently have installed? I have a feeling this may be why I am having problems...

The error can be viewed here > http://www.garbagewars.com/

cpmfetch_dao.php code lines 81-102
Code: [Select]
   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();
}
Logged

Nibbler

  • Guest
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #977 on: August 04, 2006, 11:35:37 pm »

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.
Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #978 on: August 05, 2006, 12:11:57 am »

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?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #979 on: August 05, 2006, 12:55:36 am »

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?

No, what you did fixes it.

Quote
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.

Yep, horrible error on my part.  It was line 59 in the previous release.   Good catch, and your right - its line 61.

Quote
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?

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.





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
Pages: 1 ... 45 46 47 48 [49] 50 51 52 53 54   Go Up
 

Page created in 0.049 seconds with 20 queries.