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 ... 12 13 14 15 [16] 17 18 19 20 ... 54   Go Down

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

0 Members and 2 Guests are viewing this topic.

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #300 on: October 01, 2005, 12:14:57 am »

sleep my friend.
and let me know if there is anything i can do in return.

any luck?
Logged

cyprus07

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #301 on: October 01, 2005, 07:02:53 am »



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

Then if you are especially giddy, the documentation (the how to use stuff)



ok i did what you said and put it here http://www.poli-online.net/cpmfetch/cpmfetch.php

however how do i include it in the code where i want it to be displayed. and if it can be like they have done it here http://www.poliaektimisoara.ro/forum/index.php  so that instead of going acros it goes down, and displays the Latest image, then 3 of the last images in the last 3 albums





can anyone help me with this question above?
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 #302 on: October 01, 2005, 10:14:51 pm »

sleep my friend.
and let me know if there is anything i can do in return.

any luck?

And let this be a lesson to the rest of you... when I say something right before I go to sleep, I tend to forget about it.

Anyway, not sure if this is what you want, but I am sure this is what you are getting

Notes:

* Set the "album=33,18,2" to the ones you want included
* Set the $cnt=3 to the number of albums you have above
* The 100,100 will get the first 1000 photos.  The total must be more than that which would be added into the the last added album...

Anyway it stops processing as soon as it has 3 so you won't be parsing all 1000 results.

Nothing in here for linking, but you can add that in youself... you can peek at the top of cpmfetch_dao.php to see what names are available in the row... 


<?php
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(100, 100, "album=33,18,2");

$cnt = 3;  //Number of different albums to look for (set this to the number you added into the album= above)
$albumsfound = array();

foreach ($data as $row) {
   
   if (! in_array($row['pAid'],$albumsfound)) {
      $imagename = $objCpm->cpm->getImageToUse($row['pFilepath'], $row['pFilename'] ,"thumb_");
      print "<img src='$imagename'>";
      array_push($albumsfound,$row['pAid']);
      $cnt--;
      if ($cnt = 0) break;
   }
}

?>

Hope that gets you going... best of luck, rah rah, all that

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

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #303 on: October 01, 2005, 10:19:57 pm »

thanks that helps alot. i owe you one.
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 #304 on: October 02, 2005, 05:36:16 am »

thanks that helps alot. i owe you one.

No problem

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

zigzaggy

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #305 on: October 04, 2005, 01:12:08 am »

Hello,
Is there a way to make this work on a Joomla (Mambo) site?
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 #306 on: October 04, 2005, 01:40:48 am »

Hello,
Is there a way to make this work on a Joomla (Mambo) site?


According to the thread actually related to that sort of thing.. it does.
http://forum.coppermine-gallery.net/index.php?topic=19528.0

(Mambo anyway, no idea what a Joomia site is)
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: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #307 on: October 04, 2005, 07:15:27 am »

(Mambo anyway, no idea what a Joomia site is)
Joomla is a fork of Mambo, see http://forum.coppermine-gallery.net/index.php?topic=22120.0 e.a.
Logged

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #308 on: October 05, 2005, 06:19:50 pm »

I've been searching to display the date under the most recent pictures but havn't found anything.
Is it possible?
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 #309 on: October 05, 2005, 06:34:44 pm »

I've been searching to display the date under the most recent pictures but havn't found anything.
Is it possible?

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

See the entries for %w or %W

You may, or may not also be interested in this:
cpm_setDateFormat($format)  on the following page
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s02.html
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

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #310 on: October 05, 2005, 08:27:09 pm »

thanks alot.
for those following this thread in the future,
i found some additional information at http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06.html
Logged

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #311 on: October 05, 2005, 08:56:31 pm »

Small note:

Code: [Select]
<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>

<?
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>

</td>
</tr>

<tr>
<td align="center" valign="middle"><?
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
?>
</td>
</tr>

I tried to add the optios array in it's own cell to prevent a long title from disrupting the layout of the images, but it wouldn't display.
Any suggestions either in TD, or CSS as to prevent long title images from disrupting layouts?

Thanks.
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 #312 on: October 05, 2005, 09:42:10 pm »

Small note:

Code: [Select]
<?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
?>

<?
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>

</td>
</tr>

<tr>
<td align="center" valign="middle"><?
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
?>
</td>
</tr>

I tried to add the optios array in it's own cell to prevent a long title from disrupting the layout of the images, but it wouldn't display.
Any suggestions either in TD, or CSS as to prevent long title images from disrupting layouts?

Thanks.


The $options has to preceed the call, otherwise it cannot work.

Code: [Select]
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
$objCpm->cpm_viewRandomMedia(1,2,$options);
The $options is not a command but a variable.

To illustrate, you could have also written it like so:

Code: [Select]
$objCpm->cpm_viewRandomMedia(1,2,array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" ));

As for long titles, I can't think of anything off the bat... they should wrap, but that won't help you with larger words.

How long are they?
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

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #313 on: October 05, 2005, 09:47:08 pm »

yeah i figured the options array had to be introduced before it was called.
the titles? see they're not neccessarily long, but if theyre longer (in width) than the picture, it pushes the picture up (disrupting my beautiful alignment).

i guess i could find a way to make the picture stay put in the tabe and any text under it to just extend the length of the table.
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 #314 on: October 05, 2005, 10:08:37 pm »

yeah i figured the options array had to be introduced before it was called.
the titles? see they're not neccessarily long, but if theyre longer (in width) than the picture, it pushes the picture up (disrupting my beautiful alignment).

i guess i could find a way to make the picture stay put in the tabe and any text under it to just extend the length of the table.

What if you set the cells to valign top?  Either by css or by sending it through as an option...

there is an undocumented entry for options called "cellattributes"  you can send that through with 'cellattributes'=>'valign='top"'

Its only undocumented because I keep forgetting to document them.  They also exist for rows, tables, etc.

Sigh - there is just never enough time


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

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #315 on: October 05, 2005, 10:17:19 pm »

Sigh - there is just never enough time

amen.

yeah thats what i'm trying to do now. tried in the table, and .css. ill get it eventually.
check out the screenshot, it will show you what i mean.
Logged

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #316 on: October 06, 2005, 02:20:02 am »

I've tried EVERYTHING.

I'm pretty sure it's on fetch side.
Any ideas?
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 #317 on: October 06, 2005, 04:43:17 am »

I've tried EVERYTHING.

I'm pretty sure it's on fetch side.
Any ideas?

Okay, post some code here...  I'm sure its do able

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

willstein

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
    • mansei
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #318 on: October 06, 2005, 04:46:09 am »

I hope you don't make me look like an idiot.
Code: [Select]
<table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="75%"><table width="100%" height="200" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><table width="100%" height="200" border="0" cellpadding="0" cellspacing="0" class="orangeborder">
                            <tr>
                              <td height="23" colspan="2" background="../images/STFHotNews_bg.gif"><img src="../images/pg.gif" width="114" height="23"></td>
                              <td width="284" height="23" background="../images/STFHotNews_bg.gif"><div align="right"><img src="../images/STFHotNews_r.gif" width="3" height="23"></div></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top"><div align="center">
                                <p><strong>Random Photo
                                  Generator! <br>
                                    <a href="javascript:location.reload()" target="_self">Generate
                                Again</a></strong>
                                </p>
                                <table width="100" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td valign="top"><div align="center">
                                        <?
include "../fetch/cpmfetch.php";
$objCpm = new cpm('/gallery');

                                     
$options = array( 'subtitle' => '%h views<br>%t', "tablestyle" => "lastaddedmedia" );
                                     
$objCpm->cpm_viewRandomMedia(1,2,$options);
?>
                                    </div></td>
                                  </tr>
                                </table>
                              </div></td>
                              <td width="50%" valign="top"><div align="center">
                                <p><br>
                                  <strong> <img src="../images/new.gif" width="19" height="9" border="0"> Most
                                Recent Pictures:<br>
                                  </strong>
                                  <?


$options = array( 'subtitle' => '%w', "tablestyle" => "lastaddedmedia" ); ?>
                                  <? $objCpm->cpm_viewLastAddedMedia(1,2,$options);
$objCpm->cpm_close();
?>
                                </p>
                                </div></td>
                            </tr>
                           
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
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 #319 on: October 06, 2005, 03:36:39 pm »

I hope you don't make me look like an idiot.

Your example is great, but did not include any CSS which is how you are trying to solve the problem.

Try this just for fun, and let me know what happens.  I gave you the wrong syntax before on the undocumented call

The contents of the cellattributes has to be an array of things to add.  Try this, send a Snippet of the generated code if it does not work.

Code: [Select]
                         
$options = array( 'subtitle' => '%h views<br>%t',  "cellattributes"=>array("valign"=>"'top"));
$objCpm->cpm_viewRandomMedia(1,2,$options);


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 ... 12 13 14 15 [16] 17 18 19 20 ... 54   Go Up
 

Page created in 0.026 seconds with 20 queries.