Using in XOOP - Code Confusion Using in XOOP - Code Confusion
 

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]

Main Menu

Using in XOOP - Code Confusion

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

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Shelia

I am using the following code to display photos from another Gallery prorgram (which I've replacing w/Coppermine) in my Xoops CMS.

<IFRAME src="/cgi-bin/album/album.pl?album=:recent;ssi=10" target="_blank" width="150" height="850" img border="0" scrolling="no" frameborder="0">
Your browser does not support frames.
</IFRAME>

I've tried a number of different cpmFetch codes but can't seem to get what I want to display. I want one column with six photos from album number two that will display in a block on my home page and if possible - click on a photo and it takes you to the original in Coppermine. Xoops CMS supports a php code, I just cant seem to figure out how to get what I want.
I am not intergrating Coppermine and Xoops.

I would appreciate being pointed in the right direction.

Shelia

Joachim Müller

Are you trying to use cpmFetch to pull pics from another gallery app (obviously even Perl-driven)? This won't work. If you have actual questions, post real-life questions, with real-life examples. Use a better subject next time you start a thread as well.

Shelia

I only posted the code as an example of what worked with another Gallery program (displaying what I want). I am trying to pull photos using Coppermine and cpmFetch which are installed in root to a block on my Xoops CMS index page.

Thanks!

Joachim Müller

Meaning what to us? Like I suggested: post your actual question. A link to your gallery, the page you're trying to use cpmFetch with and the test page results would be a good start. They'd proof as well that you read the docs before asking.

Shelia

cftest:
5 You set your partial URL to /gallery PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux cgi0704.int.bizland.net 2.4.32-grsec #1 Fri Mar 17 12:22:27 EST 2006 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.4.4 INFO
55 DOCUMENT_ROOT: /home/users/web/b14/xxxxx/htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/users/web/b14/xxxxx/htdocs/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS

Page I'm trying to use cpmfetch on is http://vaue160.org
My Gallery is http://vaue160.org/gallery

I'm just looking for a cpmfetch code that will allow me to display 1 column of photos from my Coppermine Gallery (album=2). My question - how do I display six random images from a specific album in a column on my index page?

vuud

Quote from: Shelia on September 07, 2006, 02:37:54 AM

Page I'm trying to use cpmfetch on is http://vaue160.org
My Gallery is http://vaue160.org/gallery

I'm just looking for a cpmfetch code that will allow me to display 1 column of photos from my Coppermine Gallery (album=2). My question - how do I display six random images from a specific album in a column on my index page?


Did you look at the quickstart?

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

All you need to do is change the call from:
$objCpm->cpm_viewRandomMedia(3,3);

to something like:

$objCpm->cpm_viewRandomMediaFromAlbum(6,1,2);

6 = rows
1 = colums
2 = album

All of this is documented online...

http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html

The docs may not be the best, but there is a lot of them and it took me a long time to write.  So check through there for lots of other neat stuff you can do.

Vuud

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

Yeah, I do understand the call I need to use. I just can't get the php code to work in a Xoops block.

vuud, I did read a thread where another poster was having you look into his problem using cpmfetch with Xoops. Do you make any head way?

Shelia

vuud

Quote from: Shelia on September 07, 2006, 04:57:48 AM
Yeah, I do understand the call I need to use. I just can't get the php code to work in a Xoops block.

vuud, I did read a thread where another poster was having you look into his problem using cpmfetch with Xoops. Do you make any head way?

Shelia

Probably not - I don't remember really looking at xoops much.  I think we found a xoops thread somewhere that said how to do it.

You have to put it in somewhere that will execute php code.   That typically ends up being the catch with these CMSs

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

Thanks vuud. I really want to use cpmfetch so I'll keep at it. If I solve this Ill be sure post my findings.

Shelia

vuud

Quote from: Shelia on September 08, 2006, 04:49:18 AM
Thanks vuud. I really want to use cpmfetch so I'll keep at it. If I solve this Ill be sure post my findings.

Shelia


I took a quick look at Xoop, and it seems to be based on Smarty templates, which is fine - I like smarty.  But Smarty won't execute php code, so you have to find somewhere to put it in that it will execute.

Where in you xoop setup are you trying to make it appear?
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

The page I'm trying to use cpmfetch on is http://vaue160.org

Right now photos are being displayed from a cgi gallery
(will eliminate - when I get cpmfetch goig) program in a
right block on the index page.

vuud

Quote from: Shelia on September 10, 2006, 03:48:15 PM
The page I'm trying to use cpmfetch on is http://vaue160.org

Right now photos are being displayed from a cgi gallery
(will eliminate - when I get cpmfetch goig) program in a
right block on the index page.

Hmmm... is that part of a template or something?  I really have no idea how xoop works how the templates work, etc...  Would that be the right sidebar in xoop parlance?
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

A Xoops index page is comprised of different "blocks" some of which are controlled by modules (News, Contacts, etc.) and some that are custom made blocks. The custom made blocks can contain html or php coding and are placed (left side, right side, center) accordingly on the index page. The template actually only controls the block layout. You can include xoops code in a block echo xoops_getbanner(); and in this case an Xoops banner appears in the block.


vuud

Quote from: Shelia on September 10, 2006, 06:38:40 PM
A Xoops index page is comprised of different "blocks" some of which are controlled by modules (News, Contacts, etc.) and some that are custom made blocks. The custom made blocks can contain html or php coding and are placed (left side, right side, center) accordingly on the index page. The template actually only controls the block layout. You can include xoops code in a block echo xoops_getbanner(); and in this case an Xoops banner appears in the block.

Okay, so what happened when you tried to include it as a "custom made block"?  Sounds like that is where you would want to put it.
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

<?php & <? are not included when writing code to the block because of the php switch that has to be set.

I place the code in the block and do a preview and the block tiltle is that only thing that appears. When I actually generated the block nothing happens - no block displays not even a blank one with a title. Turning on php debugging doesn't return any errors because the block isn't generated. I've been asurred that php code does work in the blocks but I don't know how to test to make sure its working for me.


vuud

Quote from: Shelia on September 10, 2006, 08:22:36 PM
<?php & <? are not included when writing code to the block because of the php switch that has to be set.

I place the code in the block and do a preview and the block tiltle is that only thing that appears. When I actually generated the block nothing happens - no block displays not even a blank one with a title. Turning on php debugging doesn't return any errors because the block isn't generated. I've been asurred that php code does work in the blocks but I don't know how to test to make sure its working for me.


Well, try to get something like...

print "This is my block";

...working.  Until you have that working its not a cpmfetch issue.  You should be able to get help on the Xoop forums.  Once that works, we should be able to get cpmFetch to work out of there pretty easily.

Vuud


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

#16
print "This is my block";  works!

The Xoops folks I've contacted seem to feel that my problems stems from my Coppermine & Xoops istallations not being "Intergrated."  And that doesn't make sense to me. Only allow a select few can register and no
one else is allowed to upload photos.

Could my problem be a setting in my php.ini file?

I'll keep trying to figure this out.

Thanks!

Shelia


vuud

Quote from: Shelia on September 10, 2006, 10:09:26 PM
print "This is my block";  works!
The Xoops folks I've contacted seem to feel that my problems stems from my Coppermine & Xoops istallations not being "Intergrated."  And that doesn't make sense to me. Only allow a select few can register and no
one else is allowed to upload photos.
Could my problem be a setting in my php.ini file?
[/quote]

I doubt its the php.ini file.

Try this then...  You going to have the change the include to match your installation.  Mind you this may have to be the relational path from where XOOP is executing - not where the template is...


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



If you are bridged, then there could be another issue, which is why I am having you try the listMediaCount call also.


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

Joachim Müller

Quote from: Shelia on September 10, 2006, 10:09:26 PM
Could my problem be a setting in my php.ini file?
I don't think so.

Quote from: Shelia on September 10, 2006, 10:09:26 PM
The Xoops folks I've contacted seem to feel that my problems stems from my Coppermine & Xoops istallations not being "Intergrated."
Post a link to the discussion you had with the xoops supporters.

Shelia

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