Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 12-18-2005, 06:03 PM
eon's Avatar
eon Offline
pixelpost guru
 
Join Date: Nov 2005
Location: Ned
Posts: 280
Send a message via ICQ to eon
Lightbulb Addon Fastedit and Fastedit for Pixelpost 1.5

The addon Fastedit version 1 contains a bug.
This code:
PHP Code:
if(!isset($_COOKIE['pixelpost_admin']) && $cfgrow['password'] != $_COOKIE['pixelpost_admin']) {
    
$tpl str_replace("<FAST_EDIT>","",$tpl); //delete <FAST_EDIT> when there is no valid cookie
}else{
    
$fastedit "<a href=\"/pixelpost/admin/index.php?view=images&id=$image_id\">Admin</a>";
    
$tpl str_replace("<FAST_EDIT>",$fastedit,$tpl); //show link


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


?> 
So "&&" must be "||".

Please replace the code or download the new version here or here.

There is also an Fastedit version for Pixelpost 1.5! You can download it here or here.
__________________
Northing.nl
Reply With Quote
  #2  
Old 12-18-2005, 06:34 PM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
it's a good idea to post things like this in the original thread for fast edit, so anyone that subscribed to the thread is alerted.
__________________
touchnothing.net
Reply With Quote
  #3  
Old 12-18-2005, 06:40 PM
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 tinyblob
it's a good idea to post things like this in the original thread for fast edit, so anyone that subscribed to the thread is alerted.
That's a good idea. I didn't know that and thought the it was more visible when I start a new thread. Should I move or copy the information to the old thread?
__________________
Northing.nl
Reply With Quote
  #4  
Old 12-18-2005, 07:34 PM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
whichever, it doesn't really matter
__________________
touchnothing.net
Reply With Quote
  #5  
Old 06-25-2006, 06:03 PM
eon's Avatar
eon Offline
pixelpost guru
 
Join Date: Nov 2005
Location: Ned
Posts: 280
Send a message via ICQ to eon
UPDATE: This one is new! It taste more better than the old one!



The old one (Fastedit 1.5) was not working anymore, so here is version 1.5.1.
I tried to make it work with the admin-cookie but in some way that's not working. The cookie is saved as <url>/admin/ and when you run an addon in <url> it can't see the cookie :S.

This version is working with the admin-session. So you need to login before you can see the link.

You can download Fastedit 1.5.1 here.
__________________
Northing.nl
Reply With Quote
  #6  
Old 06-25-2006, 09:04 PM
Vernon.Trent's Avatar
Vernon.Trent Offline
pixelpost guru
 
Join Date: Apr 2006
Location: Germany
Posts: 341
Send a message via ICQ to Vernon.Trent
PHP Code:
if(isset($_SESSION["pixelpost_admin"])){
    
$fastedit "<a href=\"/admin/index.php?view=images&id=$image_id\">| Admin</a>"
you should remove the / from /admin.
this works only if PP is installed in the root of the webserver.
__________________
best regards
~~~~~~~~
photoblog: XoverIP
Reply With Quote
  #7  
Old 06-26-2006, 01:52 AM
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
im nto installed on the root and its always worked...weird
__________________
i should say more clever stuff
Reply With Quote
  #8  
Old 06-26-2006, 07:04 AM
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
As long as you dont have empty tag <base href=...> then it will work with /admin/... .
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #9  
Old 06-26-2006, 04:02 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
it's been working fine fore me too.
Reply With Quote
  #10  
Old 06-26-2006, 05:37 PM
Vernon.Trent's Avatar
Vernon.Trent Offline
pixelpost guru
 
Join Date: Apr 2006
Location: Germany
Posts: 341
Send a message via ICQ to Vernon.Trent


ok, but nor for me. only after removing the "/".
__________________
best regards
~~~~~~~~
photoblog: XoverIP
Reply With Quote
Post Reply


Thread Tools




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

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