Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 02-12-2006, 09:26 PM
eon's Avatar
eon Offline
pixelpost guru
 
Join Date: Nov 2005
Location: Ned
Posts: 280
Send a message via ICQ to eon
Smile Addon: Numbers

Instand of a calendar you see numbers. You can choose how much rows and coloms. Also you can choose the next and previous name. Use <site_numbers> in the image template. Tested for 1.4.3 and 1.5 beta 1.



Put numbers.php in the addon-folder and put <site_numbers> in image_template.html. Example.css is an example of the css-code.

You can download the addon here: numbers.zip.
__________________
Northing.nl
Reply With Quote
  #2  
Old 02-12-2006, 09:35 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
that's kinda cool...
__________________
i should say more clever stuff
Reply With Quote
  #3  
Old 03-09-2007, 09:01 PM
double Offline
forum loafer
 
Join Date: Jun 2006
Posts: 2
Admin says :

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/.../addons/numbers.php on line 158

what's wrong?
Reply With Quote
  #4  
Old 03-13-2007, 09:30 PM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
eon,
without having a look into your code: your addon is a single non-admin one, isn't it?
You don't have any id when calling the admin panel, so why don't you use the trick asking for not "admin" in request header before working any code for image page

KArin
__________________
Uh!log Photoblog
My Addons
Reply With Quote
  #5  
Old 03-22-2007, 11:59 AM
eon's Avatar
eon Offline
pixelpost guru
 
Join Date: Nov 2005
Location: Ned
Posts: 280
Send a message via ICQ to eon
Quote:
Originally Posted by austriaka View Post
eon,
without having a look into your code: your addon is a single non-admin one, isn't it?
You don't have any id when calling the admin panel, so why don't you use the trick asking for not "admin" in request header before working any code for image page

KArin

It was a long time ago that i participated on this forum. What is a "single non-admin one"-addon? And i'm very sorry, I don't understand the other questions. Idd i don't know the trick. But with more information i will search it out .

Eon
__________________
Northing.nl
Reply With Quote
  #6  
Old 03-22-2007, 03:05 PM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
Quote:
Originally Posted by eon View Post
What is a "single non-admin one"-addon? And i'm very sorry, I don't understand the other questions. Idd i don't know the trick.
There are different kinds of Addons and you should be aware of that:
Admin-Addons provide their additional functions for admin area (like Copy Folder Addon for example) and can make use of the workspaces in PP1.5.
Non-Admin Addons (I call them like this, it is not an "official" name) create new tags for the front pages (= image- or browsepage for example) and don't do anything in the Admin panel (like the Calendar Addon for example)
And of course there are Addons which do both: have features in Admin panel and new tags for the public image pages like the Advanced Stat Addon.

Every Addon is called any time a Pixelpost Page is called, no matter if this is a "public" or an "admin" page.
So for avoiding "public" code being called in Admin area and vice versa, you can use a simple if-statement like this:
Code:
if(eregi('/admin/',$_SERVER["REQUEST_URI"])) {
for things that should only happen when in admin area and the other way round (as you can do it)
Code:
if(!eregi('/admin/',$_SERVER["REQUEST_URI"])) {
for things that should never happen when in admin area.

To make your code work properly, there must be an image_id I suppose.
When calling the Admin panel there is no image_id at all but the addon script is called. So the mysql query runs into the error double pointed out.
With that little if-statement above you can prevent the code being executed when in admin page.

(I suppose, I didn't try this addon because my blog is pure calendar-style ;-))

HTH
KArin
__________________
Uh!log Photoblog
My Addons
Reply With Quote
  #7  
Old 03-29-2007, 08:57 PM
eon's Avatar
eon Offline
pixelpost guru
 
Join Date: Nov 2005
Location: Ned
Posts: 280
Send a message via ICQ to eon
Talking

Thank for your suggestions. The addon is idd a public-addon. I will work-out your suggestions when I have more time (about two weeks). First I want to help with debugging PP1.6 (this weekend)

You have to try this addon, then you don't have to take a photo every day

Eon
__________________
Northing.nl

Last edited by eon; 03-29-2007 at 08:59 PM. Reason: ;D --> :D
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:34 PM.

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