Working with SMF and TP Working with SMF and TP
 

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

Working with SMF and TP

Started by trvlnman, April 14, 2008, 06:43:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

trvlnman

I have spent the last couple of days reading through the documentation and searching through a lot of posts on this board.  I have not been able to find the answers that I'm looking for.

I am working with a forum running SMF with TinyPortal.  I have Coppermine installed and am looking to use cmpFetch to put the last added images into a center block.

Here is the software that I'm using:

SMF 1.1.4
TP 0.9.8
CPG 1.4.16
cmpFetch 2.1.1 Development version

Here is the code that I have defining the block:

echo "<center>";
include_once ("./coppermine/cpmfetch/cpmfetch.php");
$objCpm = new cpm("./coppermine/cpmfetch/cpmfetch_config.php");
$options = array( "windowtarget" => "_parent", "subtitle" => "<center>{{pTitle}}{{pOwner}}</center>", "linktemplate" => "http://www.sultryangel.com/coppermine/displayimage.php?album=lastup&cat=0&pos={{aPos}}");
$objCpm->cpm_viewLastAddedMedia(2, 8, $options);
echo "</center>";


Here is what I am trying to do:

Display the last 16 images stored in Coppermine - Done
Display 2 rows of 8 images each - Done
Have the rows centered - Done
Display the Image Title centered under the image - Not Working
Display the Image Owner centered under the image - Not Working
When clicking on the thumb, navigate to that image inside the gallery - Partially Working
When transferring, keep within the Center Panel of existing forum, not just the gallery - Not Working

In this forum, one of the button options (like Home, Forum, Search, Profile, etc) is to go to the Coppermine Gallery (CPG).  This button opens an Iframe that renders the gallery  in the center block.  Is this what I should be looking to duplicate?

The default link when you go to select one of the thumbnails is http://www.sultryangel.com/coppermine/thumbnail.php&albumn(albumn#).  The override I put in points to the correct album, but it goes to the last image.  Is there a way to pass the position from the table created in the center block to get the correct image?  For example, in the block created, the 1st image would be position 0, and the last one would be position 15.  That is what I am trying to do using the {{aPos}} parameter.  The override link is what is used when going into the CPG and mousing over the Last Additions on the home page of the gallery.

Any help or tips would be appreciated, I have been stumbling through this and I need some different eyes on it.  Maybe some fresh insight would help.

Just so you know, there is some adult content on this site, I can create a Userid / PW for you if necessary.

trvlnman

Hmmm..ok ...no help at all from anyone?

Let me separate the questions.

Question 1

I cannot get the filename and owner to show up under the images I retrieve with cpmfetch. 

Is my use of the "subtitle" option correct?

Question 2

The block created using cpmFetch has 16 images in it, in 2 rows of 8.  When I click on that image, I would like it to go to that image inside the CPM gallery.  When I keep it at the default, and it tries to link to tumbnail.php, it takes me to a login page.  When I use the link I have entered in the option stream, it takes me to the gallery, and the correct folder, but not the correct image.  The image number defaults to "105", so it takes me to the last image. 

Is there someway to use the image number of the image selected in the table created by cpmFetch to use in the option override?

Question 3

The last one is the hardest, and I am not sure if anything can be done.  What I would like to happen is when the thumb is clciked on in the table created by cpmFetch, I would like it to act as if the User clicked on the button to take them to the gallery, select the Album, and then the image.  Those actions happen within an iFrame in the center block.  I have removed the Home and Login/Logout button from CPG becuse it causes a mirror effect within the forum.  Anything I use now creates a new page with no TP columns and no way  to easily navigate back to the forum. 

My question is...can I use the options in some way to create an iFrame to open within the forum when an image is selected?

Anyone with any suggestions at all would be appreciated.



trvlnman

Quote from: trvlnman on April 15, 2008, 09:15:57 PM
Hmmm..ok ...no help at all from anyone?

Let me separate the questions.

Question 1

I cannot get the filename and owner to show up under the images I retrieve with cpmfetch. 

Is my use of the "subtitle" option correct?

Question 2

The block created using cpmFetch has 16 images in it, in 2 rows of 8.  When I click on that image, I would like it to go to that image inside the CPM gallery.  When I keep it at the default, and it tries to link to tumbnail.php, it takes me to a login page.  When I use the link I have entered in the option stream, it takes me to the gallery, and the correct folder, but not the correct image.  The image number defaults to "105", so it takes me to the last image. 

Is there someway to use the image number of the image selected in the table created by cpmFetch to use in the option override?

Question 3

The last one is the hardest, and I am not sure if anything can be done.  What I would like to happen is when the thumb is clciked on in the table created by cpmFetch, I would like it to act as if the User clicked on the button to take them to the gallery, select the Album, and then the image.  Those actions happen within an iFrame in the center block.  I have removed the Home and Login/Logout button from CPG becuse it causes a mirror effect within the forum.  Anything I use now creates a new page with no TP columns and no way  to easily navigate back to the forum. 

My question is...can I use the options in some way to create an iFrame to open within the forum when an image is selected?

Anyone with any suggestions at all would be appreciated.




I found one error, I should have used the option Owner_name instead of Owner, my bad, I changed it but it still is not showing the Owner of the image. 

trvlnman

I have been doing more research and I think I know what questions to ask now.  I will put them in separate posts.

Hein Traag

Hint: as this is a forum run by volunteers it may take some time before an answer is given to your question. Especially when it concerns something specific such as CPMfetch. Give it more then a couple of days before bumping your post.

And thanks for sharing you knowledge with the rest of the board!

trvlnman

Quote from: trvlnman on April 15, 2008, 09:15:57 PM
Question 2

The block created using cpmFetch has 16 images in it, in 2 rows of 8.  When I click on that image, I would like it to go to that image inside the CPM gallery.  When I keep it at the default, and it tries to link to tumbnail.php, it takes me to a login page.  When I use the link I have entered in the option stream, it takes me to the gallery, and the correct folder, but not the correct image.  The image number defaults to "105", so it takes me to the last image. 

Is there someway to use the image number of the image selected in the table created by cpmFetch to use in the option override?


I have done some more experimenting and looking through the database.  Here is what I found.  When I ask for the {{aPos}}, it gives me the position that is defined in the actual album where the image is stored.  It looks as if the {{aPos}} is the same for all images within that particular album.  That's why the link I created takes me to the incorrect image.

From what I have read lastup is a meta album.  Is there a way to get the position of the image from within that meta album to pass along in a link so I can view that image from within the Coppermine gallery in that same meta album (lastup)?

Again, any assistance would be greatly appreciated.


TechTitan

hello,

i'm not sure if i understand your problem correctly but this is what i did with my forum

// Show recent Coppermine uploads
   echo '
            <tr>
               <td class="titlebg" colspan="2">', "Recent Photos", '</td>
            </tr>
            <tr>
               <td class="windowbg" width="20" valign="middle" align="center">
                  <img src="', $settings['images_url'], '/post/xx.gif" alt="Recent Photos" />

               </td>
               <td class="windowbg2" align="center">';
   include "./gallery/cpmfetch/cpmfetch.php";
   $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
   $options = array("subtitle" => "Photo by <br>{{pOwner_name}} <br> {{pCtimeFormatted}}", "alttag" => "{{pTitle}}", "subtitlelink" => "./gallery/displayimage.php?album=lastup&cat=0&pos={{aPos}}");
   $objCpm->cpm_viewLastAddedMedia(1, 6, $options);
   //$objCpm->cpm_close();
   echo '
                  </td>';

   // Next some random photos from Coppermine
   echo '
            <tr>
               <td class="titlebg" colspan="2">', "Random Photos", '</td>
            </tr>
            <tr>
               <td class="windowbg" width="20" valign="middle" align="center">
                  <img src="', $settings['images_url'], '/post/xx.gif" alt="Random Photos" />
               </td>
               <td class="windowbg2" align="center">';
    $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
    $options = array("subtitle" => "Photo by <br>{{pOwner_name}}<br> {{pCtimeFormatted}}", "alttag" => "{{pTitle}}", "subtitlelink" => "./gallery/displayimage.php?album=lastup&cat=0&pos={{aPos}}");
    $objCpm->cpm_viewRandomMediaFrom("cat=1,2,3,4,5,6,7,8",1, 6, $options);
    $objCpm->cpm_close();
    echo '
                  </td>';



I'm using SMF 2.0 Beta 3.1 Public with Coppermine Photo Gallery 1.4.18 (stable) and CpmFetch 2.0.0