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] 2   Go Down

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

0 Members and 1 Guest are viewing this topic.

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Using in XOOP - Code Confusion
« on: September 07, 2006, 01:26:39 am »

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
« Last Edit: September 13, 2006, 06:36:21 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Code Confusion
« Reply #1 on: September 07, 2006, 02:06:56 am »

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

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Code Confusion
« Reply #2 on: September 07, 2006, 02:20:13 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Code Confusion
« Reply #3 on: September 07, 2006, 02:23:22 am »

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

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Code Confusion
« Reply #4 on: September 07, 2006, 02:37:54 am »

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Code Confusion
« Reply #5 on: September 07, 2006, 03:53:18 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

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: Code Confusion
« Reply #6 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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Code Confusion
« Reply #7 on: September 08, 2006, 01:30:01 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

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: Code Confusion
« Reply #8 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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Code Confusion
« Reply #9 on: September 08, 2006, 05:10:55 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?
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 #10 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.
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 #11 on: September 10, 2006, 04:57:48 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?
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 #12 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.

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 #13 on: September 10, 2006, 07:25:03 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.
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 #14 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.

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 #15 on: September 10, 2006, 09:12:05 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...

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


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

I'll keep trying to figure this out.

Thanks!

Shelia

 
« Last Edit: September 10, 2006, 10:49:59 pm by 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 #17 on: September 10, 2006, 11:03:26 pm »

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


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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Using in XOOP - Code Confusion
« Reply #18 on: September 11, 2006, 07:10:07 am »

Could my problem be a setting in my php.ini file?
I don't think so.

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

Shelia

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Using in XOOP - Code Confusion
« Reply #19 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
Logged
Pages: [1] 2   Go Up
 

Page created in 0.033 seconds with 19 queries.