PDA

View Full Version : GeoS EDIT THIS


GeoS
12-26-2005, 11:30 AM
Today I wrote for myself something like this:

Name: GeoS EDIT THIS
Addon details:
Version: 0.2
Added: 2005-12-26 06:18:42
Updated: 2005-12-26 06:44:42
Category: addon
Requires Pixelpost version: 1.5 BETA or newer

Description:
GeoS EDIT THIS ADDON makes enable link to 'Edit this picture' in front end of PixelPost (template tag <GEOS_EDIT_THIS>) if user browsing the site is logged in admin.

EDIT:
Small "bugfix".

se.nsuo.us
12-26-2005, 11:31 AM
How is this different from the Fast Edit Addon?

GeoS
12-26-2005, 11:32 AM
It uses sessions. It isnt hack. You can turn it off from admin panel.

PS I didnt check Fast Edit Addon. I only saw its code in forum in previous posts.

se.nsuo.us
12-26-2005, 11:34 AM
Fast Edit for 1.5 also uses session and is an addon (read - can be turned off from admin panel)

Anyway great to have more than one way to do the same thing

GeoS
12-26-2005, 11:36 AM
If so Ill check its code right now.

EDIT:
IMHO Fastedit doesnt use sessions but cookies and is compatabile with older PP versions (1.4.2 or newer).
In PP 1.5BETA there is a little better solved security issue. I mean loging in process, cookie storing, ... . Thats why Fastedit isnt compatabile with next public version of PP.

se.nsuo.us
12-26-2005, 11:55 AM
At the risk of sounding arguementative I would like to post this line from Fast Edit for 1.5 if(!isset($_SESSION["pixelpost_admin"]) || $cfgrow['password'] != $_SESSION["pixelpost_admin"]) {

I know this because I am using it since morning on my site and I usually do not use code which I have not looked thru :)

I am sorry I do not off hand remember the URL from where I downloaded the Fast Edit version for 1.5 may be the original author of Fast Edit will stumble upon the thread and take it further

EOT for me

GeoS
12-26-2005, 12:03 PM
Yeap. This code isnt at our site. Thats why I was talking about sessions.

After that both addons are the same (only difference is that I should check password) :)

EDIT: Im moving my addon off the site.

tinyblob
12-26-2005, 12:16 PM
and you complained that connie and i were working on similar things :P

eon
12-26-2005, 01:38 PM
For the people who want use "Fastedit for Pixelpost 1.5", you can find it here (http://www.northing.nl/programs/fastedit_1.5.tar.gz) or here (http://www.pixelpost.org/v1/index.php?x=downloads&details=133).

And this is de code:
$addon_name = "Fastedit for Pixelpost 1.5";
$addon_description = "Display a link/shortcut on your Pixelpost-homepage when you are logged in as admin. The link $
(Don't forget to place <FAST_EDIT> someware image_template.html)";
$addon_version = "1";

//change this if you want.
$link_name = "| Admin";

if(!isset($_SESSION["pixelpost_admin"]) || $cfgrow['password'] != $_SESSION["pixelpost_admin"]) {
$tpl = str_replace("<FAST_EDIT>","",$tpl); //delete <FAST_EDIT> when there is no valid cookie
} else {
$fastedit = "<a href=\"admin/index.php?view=images&id=$image_id\">$link_name</a>";
$tpl = str_replace("<FAST_EDIT>",$fastedit,$tpl); //show link
}


The template tag is <FAST_EDIT>.

raminia
12-26-2005, 02:25 PM
check out my new addon my friends :D happy new year :P
http://forum.pixelpost.org/showthread.php?p=21490#post21490

GeoS
12-26-2005, 03:44 PM
Very nice plugin Ramin :) Happy New Year ;)