View Full Version : 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.
http://www.pixelpost.org/v1/devfiles/168_31919-1.png
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 (http://www.pixelpost.org/v1/devfiles/?id=149).
blinking8s
02-12-2006, 09:35 PM
that's kinda cool...
double
03-09-2007, 09:01 PM
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?
austriaka
03-13-2007, 09:30 PM
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
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
austriaka
03-22-2007, 03:05 PM
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:
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)
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
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) :D
You have to try this addon, then you don't have to take a photo every day ;)
Eon
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.