|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
that's kinda cool...
__________________
i should say more clever stuff |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
||||
|
||||
|
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 |
|
#5
|
||||
|
||||
|
Quote:
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 |
|
#6
|
||||
|
||||
|
Quote:
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"])) {
Code:
if(!eregi('/admin/',$_SERVER["REQUEST_URI"])) {
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 |
|
#7
|
||||
|
||||
|
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 |
| Post Reply |
| Thread Tools | |
|
|