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 ... 22 23 24 25 [26] 27 28 29 30 ... 34   Go Down

Author Topic: CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG  (Read 389145 times)

0 Members and 2 Guests are viewing this topic.

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word Press Problem
« Reply #500 on: May 05, 2005, 04:40:34 pm »


On the bright side, the cpmfetch stuff looks like its working perfectly...

Remove the close statement... there is super wierdness going on in there and it does not fly with other database connections.  Something I have to work out.

I know you said that makes it worse, but send me a screenshot of it worse, I think that has to be the starting point.

Later



Hi Vuud,
Here's the code:

Code: [Select]
<h3>Random Picture</h3>
<div align="center">
<?php include "cpmfetch/coppermine.php";
$objCpm = new cpm('/pictures');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();?>

</div>

Deleting the headline and div doesn't make any difference. Here's a link to the screenshot ... http://www.gorey.com.au/images/word.jpg

As you can see, the Word Press database calls for "random posts" and "recent comments" are missing and a blog entry is inserted where there should be other sidebar stuff.
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

mjg

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Re: Word Press Problem
« Reply #501 on: May 06, 2005, 04:56:51 am »

Here's what happens if I remove the close command ...

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fgorey.com.au%2Fimages%2Fscreen.jpg&hash=af0ff96b0b8faf17afb480f9d64424df2131f03a)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word Press Problem
« Reply #502 on: May 06, 2005, 05:26:46 am »

Here's what happens if I remove the close command ...

Damn.  I was thinking it would be something simple...

Is your wordpress and cpg tables in different databases?


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

mjg

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Re: Word press problem
« Reply #503 on: May 06, 2005, 06:08:10 am »

Yes, they're in different databases.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word press problem
« Reply #504 on: May 06, 2005, 06:15:58 am »

Yes, they're in different databases.

Well, that is a strange thing...  I guess I will have to install wordpress and see what I can do with it.  Seems related to my other database issue (the close)

Probably wont get to it at least until saturday night

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

trued

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #505 on: May 07, 2005, 06:49:31 pm »

I would like to know why my css is not working for the hover effect. It works to change border but no hover.

this is the code:
Code: [Select]
<head>
<style type="text/css">
img.test1 { 
          border-style:solid;
          border-width:1px;
          border-color: #000000;
          margin: 2px; }

img.test1:hover {
          border-style:solid;
          border-width:1px;
          border-color: #cccccc;
          margin: 2px; }
</style>
</head>

<body>
<?php 
include "/home/absolute/public_html/fetch/cpmfetch/coppermine.php";
$objCpm = new cpm("/nightlife/cpg");
$objCpm->cpm_viewRandomMedia(2,2,array("imagestyle" => "test1"));
$objCpm->cpm_close();
?>

 

also , how can i change the size of the images shown in fetch?

thank you.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #506 on: May 08, 2005, 12:53:22 am »

Hey Trued,

I tried the code you provided below and it works fine here (in firefox - I don't have any windows, so get someone to try IE for ya).  The one comment I have is that at 1px on my screen I could barely tell it was changing...  Try using 5px and see if you can notice it...  the only thing that changes is the border color.  If it is still botchy under IE, let me know.

As for the photo size... what do you mean?  You have three options of size... thumb, intermediate and full size.  If you want to have the browser resize on the fly I don't have a provision for that.  Browsers typically do a horrid job of resizing, but probably have improved over the years.  Maybe I should check that out again.

Let me know what you were thinking with that and maybe I can make it an option... seems to make sense...

Bill

EDIT: I just added in options to set the width or height tags on the images if you were thinking that.  They will be in the dev release later today (version 1.3.4 I think).  If your on the mailing list you will get a notification of it.



I would like to know why my css is not working for the hover effect. It works to change border but no hover.

this is the code:
Code: [Select]
<head>
<style type="text/css">
img.test1 { 
          border-style:solid;
          border-width:1px;
          border-color: #000000;
          margin: 2px; }

img.test1:hover {
          border-style:solid;
          border-width:1px;
          border-color: #cccccc;
          margin: 2px; }
</style>
</head>

<body>
<?php 
include "/home/absolute/public_html/fetch/cpmfetch/coppermine.php";
$objCpm = new cpm("/nightlife/cpg");
$objCpm->cpm_viewRandomMedia(2,2,array("imagestyle" => "test1"));
$objCpm->cpm_close();
?>

 

also , how can i change the size of the images shown in fetch?

thank you.
« Last Edit: May 08, 2005, 01:19:40 am by 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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
CPMFETCH 1.3.4 Is out...
« Reply #507 on: May 08, 2005, 01:52:30 am »


Note: This fixes problems for IIS users, word press and other embedding into portal users and that guy who wanted image width control, etc...

 :D


--------------------------------------------------------------
Sign up for email notifications at http://cpmfetch.fistfullofcode.com
This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
----------------------------------------------------------------

* * * Development release 1.3.4 is ONLINE now * * *
( get it at http://cpmfetch.fistfullofcode.com )

I have posted a new development release online.  Updating to this is purely up to you... 
If there is something you like here, go ahead.  If not stick with what you have.  If you think
you have a bug now, upgrade to this before reporting it

Here is what is new:
WINDOW TARGET CODE
OPTIONS CASE SUPPORT FOR < PHP 4.2
HELP FOR MICROSOFT IIS USERS
NEW FUNCTION:  cpm_viewMediaByPid($pid, $options)
NEW Subtitle options
DATABASE CLOSE PROBLEM
NEW STYLE AND OPTIONS ENTRIES
A WORD ABOUT DEV RELEASES


* Note * Special thanks to TJC for setting up, testing and troubleshooting this on IIS.  Your karma
will be rewarding...  thanks from me and the few that run IIS.


WINDOW TARGET CODE
======================================
* I redid the windowtarget option code.  Now the options are:

  _blank
  _blank-js
  _blank-cfshow

_blank used to use some javascript to display the image, which was included by having
the cpmfetch.js script load somewhere on your page.  That is now handled by _blank-js.  _blank now,
just opens up a full new browser window and sticks the media in it.

_blank-js :removes toolbars from the new window and resizes it)  requires cpmfetch.js - I've also had some
issues with loading and resizing.  So all around, the cfshow will be the recommened way to do it if
you dont like pure _blank.  Suggestions on fixing the js are also welcomed

_blank-cfshow: calls the external php file cfshow to display the media.  For now this avoids some rumors
of problems with IE just loading JPG files directly.  In the future you will be able to do cool things with
this, such as display photo information with it, descriptions, etc...  Who knows.

These only apply to the large display options.


OPTIONS CASE SUPPORT FOR < PHP 4.2
=====================================
While looking at a complaint for a the array_change_case function I noticed that
I never coded in an alternative for older PHP versions (ie: 4.1).  Made that fix
and removed the change_array_key_case function all together.  This simplified code
some and I don't think my iteration is going to be noticible slower on a 5 entry array.


HELP FOR MICROSOFT IIS USERS
=====================================
The program will now check for the setting "doc_root" from PHP.INI when
it cannot find DOCUMENT_ROOT, which IIS does not provide.  No idea how much
this will help people... it works for at least one person.   The alternative is to create an
environmental variable named DOCUMENT_ROOT if this does not work.  There are other
ways to get it working on IIS, but they are well, just unnatural - so we wont speak of them.
Ever.


NEW FUNCTION:  cpm_viewMediaByPid($pid, $options)
=====================================
Allows you to specify a given picture by the PID it is assigned.  Displayed in the normal
way.  I was planning on this for the cfshow.php script, but it could come in useful
for normal everyday use.  One easy way to determine the pid of a photo is to look at the rating
starts in your gallery.  Look at the link on one of the star sets for ranking and you will see:

http://www.fistfullofcode.com/photos/ratepic.php?pic=23&rate=1

"pic" is the PID (Picture ID).  There could be other ways, this is just the first one I found.


NEW Subtitle options
=====================================
%i = displays the PID value of the photo being shown.


DATABASE CLOSE PROBLEM
=====================================
Charbal #PHP on freenode gave me an idea of why the $cpm->cpm_close() was
wreaking havoc with other programs.  Added in a fix so it *may* be safe to add
back in the close functionality when embedding into a phpbb, smf, wordpress template etc etc.


NEW STYLE AND OPTIONS ENTRIES
====================================
imagewidth => ""
imageheight => ""
These set the height and width tags on the images to be whatever you submit.  I would recommend
using one or the other as the aspect ration will be kept.  Specifiying both can result in strange looking
images... which may serve a purpose...  Depending on the size you are scaling to you may want to start off
with the intermediate sized image if you are going to be closer to that size.  Taking a thumbnail and scaling it up to
400 px will result in a blurry detail lacking image.  Whatever you pass in these entries will be placed on
the image HTML tag.


A WORD ABOUT DEV RELEASES
====================================
Typically development releases are done in software when new features are added... New features sometimes
introduce bugs (software errors) that the testing we do here misses.  If this happens, it is usually something
strange.  The dev releases here are generally very stable.  Changes sometimes even make the program
more stable, which adding new features.

Overall, In most circumstances, if your random thumbnail is not working for a few minutes when you upgrade
you are going to be okay.  If a dev release has something you like, give it a try.  I always have all the older versions up
for download so you can go back if it breaks.

If you do have a problem, PLEASE let me know.  That way I can fix it.  If I don't know about it, it could be
a long time before it gets fixed.


-------------------------------------------------------------------------------------------------------

Hopefully this email will come through... its the first one, so someone give me a heads up if its all amiss.

Thanks!

Bill@fistfullofcode.com
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

mjg

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Re: Word Press problem
« Reply #508 on: May 08, 2005, 02:07:53 am »

Thanks for looking into this. The updated version is nearly there for my Word Press template!

The random photo and sidebar print fine, but for some reason I get this message across the bottom of the page:

Warning: mysql_affected_rows(): A link to the server could not be established in /home/xxxx/public_html/wp-includes/wp-db.php on line 155

I don't know if it's safe to delete that code in the wp-db.php file?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word Press problem
« Reply #509 on: May 08, 2005, 02:20:48 am »


Well...

It looks as though this one is not my problem :D

If you look at that code in wordpress does it have anything in the ( ) on that call?  If not, then it assumes the last connect (which would have been copperminefetch's) probably. 

If there is nothing ( ), you can try to figure out what thier link was created as and stick it in there.  Possibly ask on the word press forum...  of course if it seems unessential then it could just be commented out... 

Did you add the close() back in?  You should be able to now...

:D






Thanks for looking into this. The updated version is nearly there for my Word Press template!

The random photo and sidebar print fine, but for some reason I get this message across the bottom of the page:

Warning: mysql_affected_rows(): A link to the server could not be established in /home/xxxx/public_html/wp-includes/wp-db.php on line 155

I don't know if it's safe to delete that code in the wp-db.php file?
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

mjg

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Re: Word Press Problem
« Reply #510 on: May 08, 2005, 02:39:22 am »

Commenting out the line in the Word Press file worked, and doesn't appear to have caused any grief elsewhere. Thanks  :)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word Press Problem
« Reply #511 on: May 08, 2005, 02:46:27 am »

Commenting out the line in the Word Press file worked, and doesn't appear to have caused any grief elsewhere. Thanks  :)

Did you add the cpm_close back in?

I am really interested to see if that error you were getting is gone... PLS try it... please please please


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

mjg

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Re: Word Press Problem
« Reply #512 on: May 08, 2005, 02:49:42 am »

Yes, the code includes the cpm_close!
« Last Edit: May 08, 2005, 05:48:14 am by vuud »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word Press Problem
« Reply #513 on: May 08, 2005, 05:49:12 am »

Yes, the code includes the cpm_close!


Yay!  Thanks for letting me know... I'm happy to see that issue is finally resolved.

Happy days

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

trued

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #514 on: May 09, 2005, 01:31:40 am »

thank you for responding vuud.

You were right it was the browser.  I actually use ie as a browser but have firefox installed as well but never tried it there till now. the hover effect works on there, is there a way to get it to work on ie?

AS far as sizing, i was referring to the images that i get when i call the images. for example, the images we see when running the cftest.php page. I would like them (thumbnails) to be smaller. Is the size  controlled by the thumbnails from coppermine?

thanks for the help!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #515 on: May 09, 2005, 01:49:08 am »

thank you for responding vuud.

You were right it was the browser.  I actually use ie as a browser but have firefox installed as well but never tried it there till now. the hover effect works on there, is there a way to get it to work on ie?

AS far as sizing, i was referring to the images that i get when i call the images. for example, the images we see when running the cftest.php page. I would like them (thumbnails) to be smaller. Is the size  controlled by the thumbnails from coppermine?

thanks for the help!

Clearly the solution is to not use IE... lol

Hmmm, what is the issue with IE then...  It has to be the css code for the hover then... something IE does not support like that.  I'm not the best with CSS, but I can ask around some.

With dev version 1.3.4 there is not the option setting for imagewidth... you can specify that and the browser will resize the images it downloads.  Otherwise it uses the size CPG stores the thumbnails as.





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

trued

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #516 on: May 09, 2005, 03:10:10 am »

yes, i read a bit of the earlier posts and found the info for the dev version 1.3. i installed it and made the imagewidth adjustment with the array including imagewidth. Exactly what i needed! thanx!

i would like the hover to work on ie but its no biggie , i will research css options for that. thanx again for the help.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #517 on: May 09, 2005, 04:51:05 am »

yes, i read a bit of the earlier posts and found the info for the dev version 1.3. i installed it and made the imagewidth adjustment with the array including imagewidth. Exactly what i needed! thanx!

i would like the hover to work on ie but its no biggie , i will research css options for that. thanx again for the help.

Cool... if you figure it out, post back here so we can all benefit

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

Alcor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
    • Cosas de Agapornis
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #518 on: May 11, 2005, 11:00:04 am »

Hello.

First of all I feel by my low level of english, I am Spanish...  I wanna put underneath my random image appeared the title, owner and album and that went links to the shown image, user profile and album. I know putting the title, owner and others. My test.php

Quote
<style type="text/css">
.purple { color:purple;font-weight:bold }

img.text1 {
          border-style:solid;
          border-width:5px;
          border-color: #990000;
          margin: 2px; }
   
img.text1:hover {
          border-style:solid;
          border-width:5px;
          border-color: #CC6600;
          margin: 2px; }
</style>
<?php
include "./coppermine.php";
$objCpm = new cpm("/forum/cpg133");
$myarray = array("windowtarget" => "_blank","subtitle"=>"%c<br/>por: <b>%o</b><br/>Album: <b>%a</b>","imagestyle" => "text1");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>


Thanks and great mod
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #519 on: May 11, 2005, 05:47:07 pm »


Hello,

I do not understand your question.  You seem to have it all working except for the link to user profile...  This is not something it does... although not a bad idea.

Let me know if I misunderstood the question

Hello.

First of all I feel by my low level of english, I am Spanish...  I wanna put underneath my random image appeared the title, owner and album and that went links to the shown image, user profile and album. I know putting the title, owner and others. My test.php

Quote
<style type="text/css">
.purple { color:purple;font-weight:bold }

img.text1 {
          border-style:solid;
          border-width:5px;
          border-color: #990000;
          margin: 2px; }
   
img.text1:hover {
          border-style:solid;
          border-width:5px;
          border-color: #CC6600;
          margin: 2px; }
</style>
<?php
include "./coppermine.php";
$objCpm = new cpm("/forum/cpg133");
$myarray = array("windowtarget" => "_blank","subtitle"=>"%c<br/>por: <b>%o</b><br/>Album: <b>%a</b>","imagestyle" => "text1");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>


Thanks and great mod


Your welcome :D

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 ... 22 23 24 25 [26] 27 28 29 30 ... 34   Go Up
 

Page created in 0.051 seconds with 20 queries.