Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 10-29-2006, 06:43 PM
sebatl Offline
forum loafer
 
Join Date: Oct 2006
Location: Atlanta, Georgia
Posts: 12
How to get the pixelpost image ID from admin addon?

Hi there,
I am working on an admin addon and I am trying to access the pixelpost ID from my addon when a new image is added , basically from the function registered with add_admin_functions("myfunction", "image_uploaded", ...).

When I edit a post, I have no problem getting it using $_GET['id'] but I can't find a way to get it when I am adding a new one.

The reason I need that is my addon is saving extra custom information for each post in a new DB table and I need the pixelpost id to cross reference this data with the pixelpost images.

If anyone knows where to get it, that would be very appreciated.

Thanks,
-Sébastien
Reply With Quote
  #2  
Old 10-29-2006, 11:41 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
$theid - this is a variable which stores ID info.

You can grab it by adding to your function:
PHP Code:
global $theid
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #3  
Old 10-30-2006, 12:49 AM
sebatl Offline
forum loafer
 
Join Date: Oct 2006
Location: Atlanta, Georgia
Posts: 12
Works great. Thanks!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 03:28 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs