Using in XOOP - Code Confusion - Page 2 Using in XOOP - Code Confusion - Page 2
 

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

Main Menu

Using in XOOP - Code Confusion

Started by Shelia, September 07, 2006, 01:26:39 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Shelia

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

Quotei'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

vuud

Quote from: Shelia on September 12, 2006, 07:26:50 PM
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.


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

QuoteIs 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!

vuud

Quote from: Shelia on September 13, 2006, 03:06:55 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?

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

#24
 :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.

vuud

Quote from: Shelia 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.


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