CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 24 CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 24
 

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

CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG

Started by vuud, December 17, 2004, 10:19:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

snork13

@GauGau & vuud

Great idea on the sub-board, sign me up as a tester ;)

@vuud

comment out

//$objCpm->cpm_close();

worked with smf, no errors. I know many smf/coppermine users who will be super happy, GREAT WORK!

thanks
snork

vuud

Quote from: snork13 on April 15, 2005, 11:20:21 PM

worked with smf, no errors. I know many smf/coppermine users who will be super happy, GREAT WORK!

thanks
snork

I have a feeling if they are in different databases, it could be a problem... but I am kinda sorta looking into that
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: GauGau on April 15, 2005, 09:48:49 PM
vuud,

imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?

Joachim
done

Quote from: vuud on April 15, 2005, 10:48:16 PM
Ok by me... Just let me know what I am supposed to do

Do I get a key to the executive washroom? :D
Hehe, no: making you a moderator give you the power to change the message icon of postings/threads ("solved" / "invalid" etc.) and to make them both sticky / super sticky / non-sticky as well as locking/unlocking them. You can split postings from threads and merge them as well. And of course, you can modify all postings within this sub-board (e.g. to hide an admin password if a user should post it accidentally or to display a "not worksafe" warning next to a link).
It's up to you to decide if if you want to go through this thread and split it up into several ones, or to lock it and force users to start fresh ones when looking for support.

Joachim

vuud


A lot of people have had success using cpmfetch inside templates for other systems (myself included) by not calling the cpm->close() when they are done.  There is no real harm by not doing this as PHP supposedly cleans up DB connections itself. 

I am just a clean-up-after-myself sort of person (at least when it comes to code).

So I know it works in SMF and in WordPress

Any others?  Let me know if this fixes your problem.

If anyone has a clue why when I call a database close that it closes other database connections, please let me know :D
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


I've added a new thread in the cpmfetch child board for the RSS feature to be finsihed in cpmfetch.  If RSS interests you, then please see that thread.

Its up one level from here.

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

vuud


Notifications of new releases. 

I added a sign up to my site for email notifications of new updates to cpmfetch.

See the site at:

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

A little ways down the page there is a signup entry.

I won't give away email addresses or bombard you with crap.  Just emails every once in awhile announcing new versions and features and stuff.


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

donsmada

I really like CPMFetch. However, I do wanna say 1 negative thing. This thread is so long that it is really hard to find answers. I do use the search engine, but that is only a go way to get in the right area most of the time. Since this thread is 24 pages long, that is a big area  ;).

Any who....

I have modified my PHP-nuke's module NEWS' articles.php file to display 4 blocks (normally not there); 2 for ads, 1 for random pictures only, and 1 for random movies only. They all look and work great with 1 exception, the random movies link.

I am using NukeWrap to pull the movies from my stand alone coppermine into my PHP-nuke site. There in lies the problem. The link that is generated for the random movie thumbs is missing the NukeWrap.

Here is the link I am getting: "http://exposurestudio.com/members/modules/movies/displayimage.php?pos=-9" // works just not being pulled into site
Here is the link I would like to get: "http://exposurestudio.com/members/modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-9"// would work better
(This is an Adult web site I am using it on, so if you need to see it in action or something like that, let me know, I can set you up a temp user and pass)

I have looked at the code and here but not really sure how the link is set up. Any help or points in the right direction will be greatly appreciated.

Keep up the great work,

Don Adams



vuud

Quote from: donsmada on May 01, 2005, 04:31:51 AM
I really like CPMFetch. However, I do wanna say 1 negative thing. This thread is so long that it is really hard to find answers. I do use the search engine, but that is only a go way to get in the right area most of the time. Since this thread is 24 pages long, that is a big area  ;).

Bah!  We will not tolerate such insolence!  :D Wow, 24 pages eh... damn I remember when I was thrilled to hit 4 pages.  Geeze.  Anyway, you probably have a point there, but I am not sure what to do.  I at least made a new thread for the RSS part, and will do a new one for the SSI.  I could move cfimageget stuff I guess...

Quote from: donsmada on May 01, 2005, 04:31:51 AM
Any who....

I have modified my PHP-nuke's module NEWS' articles.php file to display 4 blocks (normally not there); 2 for ads, 1 for random pictures only, and 1 for random movies only. They all look and work great with 1 exception, the random movies link.

I am using NukeWrap to pull the movies from my stand alone coppermine into my PHP-nuke site. There in lies the problem. The link that is generated for the random movie thumbs is missing the NukeWrap.

Here is the link I am getting: "http://exposurestudio.com/members/modules/movies/displayimage.php?pos=-9" // works just not being pulled into site
Here is the link I would like to get: "http://exposurestudio.com/members/modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-9"// would work better
(This is an Adult web site I am using it on, so if you need to see it in action or something like that, let me know, I can set you up a temp user and pass)

I have looked at the code and here but not really sure how the link is set up. Any help or points in the right direction will be greatly appreciated.

I really have no good suggestions for this... you could edit the code in the coppermine_dao.php function named createlink( ).  Add in your own option and try to worm in the code you want into there.  Thats the function that builds the link... you could add in your own type so you would not disturb other parts using the cpmfetch code.  Could work... maybe.  I am not 100% sure about it. 

Hope that helps somewhat


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

freesouljah

thank you...

this a beautiful addition to coppermine....just thought I would put that out there  ;)


also, I felt it necessary to point out the poignant banner on your site:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.fistfullofcode.com%2Fimages%2Fpromos%2Finquirewithin.jpg&hash=32e543299c9f4fb84936e76fc9a9b2163d90e4b4)

very cool  8)

peace

donsmada

Quote
...you could edit the code in the coppermine_dao.php function named createlink( ).  
Quote

That did the trick  ;D

Since I am using "$objCpm->cpm_viewRandomMedia" to pull in my movie thumbnails I only had to edit one line of code in createlink( ).

Here is the orginal createlink( ) code:

function createlink($filepath, $filename, $aid, $pos, $imagelink="int") {

$link= $this->partialUrltocpm;

//if (array_key_exists('imagelink',$this->optionHash)) $imagelink = $this->optionHash['imagelink'];

if ($imagelink == 'album' || $imagelink == 'thumb') {
$link .= 'thumbnails.php?album=' . $aid;
} elseif ($imagelink == 'int') {
$link .= 'displayimage.php?pos=-' . $pos;
} elseif ($imagelink == 'large') {
$link .= 'albums/' . $filepath . $filename;
} elseif ($imagelink == 'none') {
$link = '';
} else {
$link .=  'displayimage.php?pos=-' . $pos;  // This is where I need to edit the code to change the link
}

return ($link);

} //end function


I modified this line $link .=  'displayimage.php?pos=-' .$pos;.

I removed the "." right after $link. This was done to prevent any information from being attached to the begining of "'displayimage.php?pos=-' "

Now I can make the link anything I want. So I changed "'displayimage.php?pos=-' " to "modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-".

The new line of code looks like this:$link =  'modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-' .$pos;

Now, my "Random Movies" scrolls 4 random movie thumbnails in a block format and has a link that uses NukeWrap to pull the movie that matches the thumbnail into my site.

I can post the complete code if anyone else would like to use or see it.

Thanks again for a great coppermine tool, where do I send donations  ???

Don Adams

nameless

Is there a way to show the newest photos with cfimageget no matter what albums they are in?

vuud


Thanks on both counts!  Good to see someone who understands the banner :D

Quote from: freesouljah on May 01, 2005, 08:58:17 AM
thank you...

this a beautiful addition to coppermine....just thought I would put that out there  ;)


also, I felt it necessary to point out the poignant banner on your site:

very cool  8)

peace

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


Good work... you could also work it in as an alternative in the conditionals...

Add in something like this...

} elseif ($imagelink == 'nukewrap') {
$link = "modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-".= 'albums/' . $filepath . $filename;
}

This way you are not interferring with anything else using cpmfetch...

Excellent getting it working!  Very happy for you!

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

Quote from: nameless on May 02, 2005, 12:26:02 AM
Is there a way to show the newest photos with cfimageget no matter what albums they are in?

But of course!

Well, you can show the newest one... cfimageget is really only for getting one image

I will check and let you know what the syntax is

EDIT:   The syntax to do it is to add the parameter cmd=last to the call
If you don't specifiy any other albums or cats it should default to everything
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

nameless

Quote from: vuud on May 02, 2005, 02:15:03 AM
But of course!

Well, you can show the newest one... cfimageget is really only for getting one image

I will check and let you know what the syntax is

EDIT:   The syntax to do it is to add the parameter cmd=last to the call
If you don't specifiy any other albums or cats it should default to everything


Thanks vudd for the info. You helped me in this post to get mulitiple images to show with cfimageget but how do I add that syntax to the url? TIA. :)

vuud

#475
CpmFetch Announcements from FistFullOfCode.com
[The exact Center of the Internet]

--------------------------------------------------------------
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.3 is ONLINE now * * *
( get it at http://www.fistfullofcode.com/projects/copperminefetch/downloads.php )

I have just posted a new development release online for people to play
with.  Some neat new stuff is in there, along with the first test RSS feed
generator.

All the changes since the last dev release are:

* cfrssget.php and rss_lastadded.php added for RSS Feeds
* Documentation page for RSS Feeder started
* Cleaned up SQL code in the DAO, added some new parameters
* function cpm_viewTopRatedMediaFrom ($source, $rows, $columns, $options) 
* function cpm_viewMostVotedMediaFrom ($source,  $rows, $columns, $options)
* add %v for tags to show total votes
* add %V for tags to show current rating
* function cpm_listMediaCountFrom($source) to get media count for a given area of the database
* BugFix: $source was not recognizing uppercase album and cat keywords

??? But what does that mean?

* cfrssget.php and rss_lastadded.php added for RSS Feeds

This is my first public run at an RSS feed generator.   See the docs online or in your
distribution for how to get it to work.

* Cleaned up SQL code in the DAO, added some new parameters

This was for me... getting a bit cluttered in there.  Some internal improvements.

* function cpm_viewTopRatedMediaFrom ($source, $rows, $columns, $options)

Shows the photos with the highest score as held internally by the cpg database
 
* function cpm_viewMostVotedMediaFrom ($source,  $rows, $columns, $options)

Shows the photos that were voted on the most.

* add %v for tags to show total votes

This is for the format strings...  Displays total votes for a displayed image

* add %V for tags to show current rating

This is for the format strings... Shows how many stars this has for a rating

* function cpm_listMediaCountFrom($source) to get media count for a given area of the database

Allows you to get how many media items are in a given source range.

* BugFix: $source was not recognizing uppercase album and cat keywords

Yeah, $source would not recognize Album as album.  All better now.
-------------------------------------------------------------------------------------------------------








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

Quote from: nameless on May 02, 2005, 08:34:06 AM
Thanks vudd for the info. You helped me in this post to get mulitiple images to show with cfimageget but how do I add that syntax to the url? TIA. :)

Vuud, not vudd.  Vudd is some other guy on a different project :p

I am not sure what you mean here... just add some crap onto the end of your image tag.  So if you have

<img src="http://www.yoursite.com/cfimageget.php?cmd=random">

Just add some stuff onto the end... use whatever you want for entries, just make sure they are unique on that page

<img src="http://www.yoursite.com/cfimageget.php?cmd=random&happy=funball">
<img src="http://www.yoursite.com/cfimageget.php?cmd=random&cpg=awesome">
<img src="http://www.yoursite.com/cfimageget.php?cmd=random&joannie=lovescacchi">

Anything to make the browser think that its a different call.

I updated the docs a bit... maybe if I did not answer your question here... you can check there
http://www.fistfullofcode.com/projects/copperminefetch/docs/cfimageget.html


Hope this helps
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

nameless

Sorry vuud for the spelling mistake ;D I got that part but what do I use to get the newest images?

vuud

Quote from: nameless on May 02, 2005, 05:21:30 PM
Sorry vuud for the spelling mistake ;D I got that part but what do I use to get the newest images?

Sorry, you want to either change the settings in cfiimageget's default (in the file) or use cmd=last on the call to it

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

nameless

Sorry to sound like a dummy but can you give me an example of what to add and where to put it?