Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2]   Go Down

Author Topic: Using in XOOP - Code Confusion  (Read 29402 times)

0 Members and 1 Guest are viewing this topic.

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Using in XOOP - Code Confusion
« Reply #20 on: September 13, 2006, 01:25:20 am »

This post at Xoops put me on the right path ----->

Quote
i'm sure you guessed this, but includes are referenced relative to xoops root folder. What you may not realise is that default PHP configs prevent including above your script root. Check your php.ini. I cant remember which property thoug.You could, instead, put the include in a folder under xoops.

I moved cpmfetch into the Xoops root. Here's the code in case some else is interested ----->

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

Thanks again for all the help.
Shelia
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Using in XOOP - Code Confusion
« Reply #21 on: September 13, 2006, 01:45:17 am »

vuud - I tried-->
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
print "CpmFetch!";
$objCpm->cpm_listMediaCount();
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();

and could not even get a preview to show - no block generated either.

I had PM discussions with Xoops users that I know use my hosting company after not finding any recent discussions about Coppermine or cmpfetch at Xoops. I then started a discussion http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=53124&forum=20&post_id=235550#forumpost235550.

I really appreciate all the help.

Shelia

Is the cpmfetch folder right off the root of your website...  as in http://www.domain.com/cpmfetch?

Orignally you had it in your XOOPS include path or something, but the last post did not look like it anymore.


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

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Using in XOOP - Code Confusion
« Reply #22 on: September 13, 2006, 03:06:55 am »

Quote
Is the cpmfetch folder right off the root of your website...  as in http://www.domain.com/cpmfetch?

It was originally but after reading the Xoops post I realized that Xoops includes are referenced relative to xoops root folder - so I put it in the Xoops directory.

I even added some imagestyle --

include_once(XOOPS_ROOT_PATH . '/cpmfetch/cpmfetch.php');
$objCpm = new cpm("/gallery");
$objCpm-> cpm_viewRandomMediaFromAlbum(6,1,2,array("imagestyle" => "border1", “cellattributes" => array("align"=>"center")));
$objCpm->cpm_close();

Thanks so much for cpmfetch!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Using in XOOP - Code Confusion
« Reply #23 on: September 13, 2006, 04:39:38 am »

It was originally but after reading the Xoops post I realized that Xoops includes are referenced relative to xoops root folder - so I put it in the Xoops directory.

I even added some imagestyle --

include_once(XOOPS_ROOT_PATH . '/cpmfetch/cpmfetch.php');
$objCpm = new cpm("/gallery");
$objCpm-> cpm_viewRandomMediaFromAlbum(6,1,2,array("imagestyle" => "border1", “cellattributes" => array("align"=>"center")));
$objCpm->cpm_close();

Thanks so much for cpmfetch!


So wait, is it actually 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

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Using in XOOP - Code Confusion
« Reply #24 on: September 13, 2006, 01:47:52 pm »

 :D, yeah its working! Check it out - vaue160.org [Edit GauGau]corrected spelling error in URL[/edit]

Maybe, you can incorporate this information into the cpmfetch FAQ or documents. Xoops is a widely used and a user friendly CMS but its often difficult to get third party programs to work.
« Last Edit: September 13, 2006, 06:35:53 pm by GauGau »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Using in XOOP - Code Confusion
« Reply #25 on: September 14, 2006, 04:20:03 am »

:D, yeah its working! Check it out - vaue160.org [Edit GauGau]corrected spelling error in URL[/edit]

Maybe, you can incorporate this information into the cpmfetch FAQ or documents. Xoops is a widely used and a user friendly CMS but its often difficult to get third party programs to work.


What information?  I have no idea about Xoop... Hopefully this thread will serve as a guide for people.  If you want to write up a quick summary of how to do it I would take it as a contribution and add it to the docs.  Otherwise my attention span on shifting between 5 people vying for help at the same time does not make for coherant memories

Glad its 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
Pages: 1 [2]   Go Up
 

Page created in 0.027 seconds with 19 queries.