Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #51  
Old 11-15-2006, 09:36 PM
Giuseppe's Avatar
Giuseppe Offline
pp regular
 
Join Date: Sep 2006
Posts: 36
Don't know if this can help you:

http://forum.pixelpost.org/showpost....3&postcount=17

bye
Reply With Quote
  #52  
Old 11-17-2006, 07:27 AM
sem's Avatar
sem Offline
pp veteran
 
Join Date: Mar 2006
Posts: 64
hi!

now it works. i dont know what the problem was. i removed and installed the plugin a few times and now it works correctly.

thanks everybody in this thread for helping and thanks to jaywilliams for this cool plugin :-)

andreas
__________________
Macro Photography
Reply With Quote
  #53  
Old 11-17-2006, 08:51 PM
Roel Offline
forum loafer
 
Join Date: Nov 2006
Location: Netherlands
Posts: 1
Quote:
Originally Posted by jaywilliams View Post
Have you tried my pre-patched index.php file yet?
http://members.atlantic.net/~john195...beta_PATCH.zip

(Make a backup of your current index.php file, and then upload my modified one to take its place.)

If the patch was installed properly, you should then be able to access you photos via this url:

index.php?photoslug=[your_photoslug_name]
Great! The patched index.php made it work for me. Thanks for the addon!
Now let me start modifying my brand spankin' new pixelpost site... ;-)

(Edit: corrected my quoting...)
Reply With Quote
  #54  
Old 12-05-2006, 09:37 AM
Errrwin's Avatar
Errrwin Offline
pp regular
 
Join Date: Nov 2005
Location: Rotterdam
Posts: 39
It's all working fine, but I was wondering one thing: would it be possible to generate the clean url's in the (RSS/Atom) feed too?
Reply With Quote
  #55  
Old 12-05-2006, 08:13 PM
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
Ask developer about additional tag with such RSS. From my point of view (software and PP developer) it is possible
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #56  
Old 12-19-2006, 03:33 PM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
Quote:
Originally Posted by Errrwin View Post
It's all working fine, but I was wondering one thing: would it be possible to generate the clean url's in the (RSS/Atom) feed too?
Yes, it is possible, as a matter of fact, I did it on my photoblog. However it does take some tweaking to the index.php file. And unless you are familiar with PHP, it can be complicated.
__________________
Jay Williams | A Different View
Reply With Quote
  #57  
Old 12-21-2006, 02:52 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Very nice addon. Works perfect for me except for a few minor things.

For one, how do I make the wraparound images addon work with this addon? The wraparound images addon code bellow,

PHP Code:
<?php

/*
Replaces <NEXT_IMAGE_WRAPAROUND> and <PREVIOUS_IMAGE_WRAPAROUND> with the 
links to the next or the previous image repectively. If the last or the first image are reached the image number
is wrapped around.

PLEASE NOTE that for cleanness of the code this solution does not change the Texts of the various names and thumbnails that are
available but introduces it's own Versions of these which are named <TAG_NAME_WRAPAROUND>
*/

$addon_name "Pixelpost Wraparound Images";
$addon_description "While Browsing the images this Addon will wrap around the links to the next or previous image when you reach the last/first image, so people can browse the images in an endless loop";
$addon_version "0.1";

//Get first and last posted (and public) photo to be able to create a wrap around for the image links if necessary
$minphoto sql_array("select min(id) as minid from ".$pixelpost_db_prefix."pixelpost");
$pixelpost_min_photonumb $minphoto['minid'];
$maxphoto =  sql_array("select max(id) as maxid from ".$pixelpost_db_prefix."pixelpost where datetime<='$datetime'");
$pixelpost_max_photonumb $maxphoto['maxid'];

//Determination of the photos is done as in the original Pixelpost Version. 
//The only difference ist the replacement of the Image IDs when you need to wrap around

// get previous image id and name
$previous_row_wa sql_array("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime < '$image_datetime') and (datetime<='$cdate') order by datetime desc limit 0,1");
$image_previous_id_wa $previous_row_wa['id'];
//Is previous image available? If not wrap around (JP)
if(!isset($image_previous_id_wa)){
  
$previous_row_wa sql_array("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where id = '".$pixelpost_max_photonumb."'");
}
$image_previous_name_wa $previous_row_wa['image'];
$image_previous_id_wa $previous_row_wa['id'];
$image_previous_title_wa pullout($previous_row_wa['headline']);
$image_previous_link_wa "<a href='$showprefix$image_previous_id_wa'>$lang_previous</a>";
$image_previous_thumbnail_wa "<a href='$showprefix$image_previous_id_wa'><img src='thumbnails/thumb_$image_previous_name_wa' width='$local_width' height='$local_height' alt='$image_previous_title_wa' title='$image_previous_title_wa' /></a>";

// get next image id and name
$next_row_wa sql_array("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime > '$image_datetime') and (datetime<='$cdate') order by datetime asc limit 0,1");
$image_next_id_wa $next_row_wa['id'];
//Is next image available? If not wrap around (JP)
if(!isset($image_next_id_wa)){
  
$next_row_wa sql_array("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where id = '".$pixelpost_min_photonumb."'");
}
$image_next_name_wa $next_row_wa['image'];
$image_next_id_wa $next_row_wa['id'];
$image_next_title_wa pullout($next_row_wa['headline']);
$image_next_link_wa "<a href='$showprefix$image_next_id_wa'>$lang_next</a>";
$image_next_thumbnail_wa "<a href='$showprefix$image_next_id_wa'><img src='thumbnails/thumb_$image_next_name_wa' alt='$image_next_title_wa' width='$local_width_wa' height='$local_height' title='$image_next_title' /></a>";


$tpl str_replace("<IMAGE_PREVIOUS_LINK_WRAPAROUND>",$image_previous_link_wa,$tpl);
$tpl str_replace("<IMAGE_PREVIOUS_THUMBNAIL_WRAPAROUND>",$image_previous_thumbnail_wa,$tpl);
$tpl str_replace("<IMAGE_PREVIOUS_ID_WRAPAROUND>",$image_previous_id_wa,$tpl);
$tpl str_replace("<IMAGE_PREVIOUS_TITLE_WRAPAROUND>",$image_previous_title_wa,$tpl);
$tpl str_replace("<IMAGE_NEXT_ID_WRAPAROUND>",$image_next_id_wa,$tpl);
$tpl str_replace("<IMAGE_NEXT_TITLE_WRAPAROUND>",$image_next_title_wa,$tpl);
$tpl str_replace("<IMAGE_NEXT_THUMBNAIL_WRAPAROUND>",$image_next_thumbnail_wa,$tpl);
$tpl str_replace("<IMAGE_NEXT_LINK_WRAPAROUND>",$image_next_link_wa,$tpl);


?>
ALSO,

i'm using .htaccess so my next and previous links would be
<IMAGE_PREVIOUS_SLUG> and <IMAGE_NEXT_SLUG>
correct?

When I use these tags they dont make a link. Instead, they display the current slug title instead.

Thanks for your help!
Reply With Quote
  #58  
Old 12-22-2006, 01:56 AM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
I haven't tried the code below, but it should work without a problem.
Enjoy the Post Slug!

PHP Code:
<?php 

/* 
Replaces <NEXT_IMAGE_WRAPAROUND> and <PREVIOUS_IMAGE_WRAPAROUND> with the  
links to the next or the previous image repectively. If the last or the first image are reached the image number 
is wrapped around. 

PLEASE NOTE that for cleanness of the code this solution does not change the Texts of the various names and thumbnails that are 
available but introduces it's own Versions of these which are named <TAG_NAME_WRAPAROUND> 

## NOTE: This version has been edited by Jay for the PostSlug Addon ##

*/ 

$addon_name "Pixelpost Wraparound Images"
$addon_description "While Browsing the images this Addon will wrap around the links to the next or previous image when you reach the last/first image, so people can browse the images in an endless loop"
$addon_version "0.1"

//Get first and last posted (and public) photo to be able to create a wrap around for the image links if necessary 
$minphoto sql_array("select min(id) as minid from ".$pixelpost_db_prefix."pixelpost"); 
$pixelpost_min_photonumb $minphoto['minid']; 
$maxphoto =  sql_array("select max(id) as maxid from ".$pixelpost_db_prefix."pixelpost where datetime<='$datetime'"); 
$pixelpost_max_photonumb $maxphoto['maxid']; 

//Determination of the photos is done as in the original Pixelpost Version.  
//The only difference ist the replacement of the Image IDs when you need to wrap around 

// get previous image id and name 
$previous_row_wa sql_array("select id,headline,image,slug from ".$pixelpost_db_prefix."pixelpost where (datetime < '$image_datetime') and (datetime<='$cdate') order by datetime desc limit 0,1");  // Edited by Jay
$image_previous_id_wa $previous_row_wa['id']; 
//Is previous image available? If not wrap around (JP) 
if(!isset($image_previous_id_wa)){ 
  
$previous_row_wa sql_array("select id,headline,image,slug from ".$pixelpost_db_prefix."pixelpost where id = '".$pixelpost_max_photonumb."'"); // Edited by Jay

$image_previous_name_wa $previous_row_wa['image']; 
$image_previous_slug_wa $previous_row_wa['slug']; // Added by Jay
$image_previous_id_wa $previous_row_wa['id']; 
$image_previous_title_wa pullout($previous_row_wa['headline']); 
$image_previous_link_wa "<a href='?photoslug=$image_previous_slug_wa'>$lang_previous</a>"// Edited by Jay
$image_previous_thumbnail_wa "<a href='?photoslug=$image_previous_slug_wa'><img src='thumbnails/thumb_$image_previous_name_wa' width='$local_width' height='$local_height' alt='$image_previous_title_wa' title='$image_previous_title_wa' /></a>";  // Edited by Jay

// get next image id and name 
$next_row_wa sql_array("select id,headline,image,slug from ".$pixelpost_db_prefix."pixelpost where (datetime > '$image_datetime') and (datetime<='$cdate') order by datetime asc limit 0,1"); 
$image_next_id_wa $next_row_wa['id']; 
//Is next image available? If not wrap around (JP) 
if(!isset($image_next_id_wa)){ 
  
$next_row_wa sql_array("select id,headline,image,slug from ".$pixelpost_db_prefix."pixelpost where id = '".$pixelpost_min_photonumb."'"); 

$image_next_name_wa $next_row_wa['image']; 
$image_next_slug_wa $next_row_wa['slug']; // Added by Jay
$image_next_id_wa $next_row_wa['id']; 
$image_next_title_wa pullout($next_row_wa['headline']); 
$image_next_link_wa "<a href='?photoslug=$image_next_slug_wa'>$lang_next</a>"// Edited by Jay
$image_next_thumbnail_wa "<a href='?photoslug=$image_next_slug_wa'><img src='thumbnails/thumb_$image_next_name_wa' alt='$image_next_title_wa' width='$local_width_wa' height='$local_height' title='$image_next_title' /></a>"// Edited by Jay


$tpl str_replace("<IMAGE_PREVIOUS_LINK_WRAPAROUND>",$image_previous_link_wa,$tpl); 
$tpl str_replace("<IMAGE_PREVIOUS_THUMBNAIL_WRAPAROUND>",$image_previous_thumbnail_wa,$tpl); 
$tpl str_replace("<IMAGE_PREVIOUS_ID_WRAPAROUND>",$image_previous_id_wa,$tpl); 
$tpl str_replace("<IMAGE_PREVIOUS_TITLE_WRAPAROUND>",$image_previous_title_wa,$tpl); 
$tpl str_replace("<IMAGE_NEXT_ID_WRAPAROUND>",$image_next_id_wa,$tpl); 
$tpl str_replace("<IMAGE_NEXT_TITLE_WRAPAROUND>",$image_next_title_wa,$tpl); 
$tpl str_replace("<IMAGE_NEXT_THUMBNAIL_WRAPAROUND>",$image_next_thumbnail_wa,$tpl); 
$tpl str_replace("<IMAGE_NEXT_LINK_WRAPAROUND>",$image_next_link_wa,$tpl); 


?>
__________________
Jay Williams | A Different View
Reply With Quote
  #59  
Old 12-22-2006, 03:19 AM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Thank you for taking your time to do this but I cant seem to get it to work. What tags should i use? I'm using a .htaccess file if that makes a difference.
Reply With Quote
  #60  
Old 12-23-2006, 02:32 AM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
[quote=jaywilliams;37225]This requires some modification of the Pixelpost code.

Open up your modified index.php file.
Go to line 724.

you should see this code:
PHP Code:
        $lookingfor 1;
        
$query mysql_query("SELECT 1,id,headline,image,datetime FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime<='$cdate') ORDER BY datetime desc");
    }


    while(list(
$count,$id,$title,$name,$datetime) = mysql_fetch_row($query))
    {
        if( 
$count != $lookingfor ) continue;   // Major hack for the browse filters.
        
$title pullout($title);
        
$title htmlspecialchars($title,ENT_QUOTES);
        
$thumbnail "thumbnails/thumb_$name";
        
$thumb_output .= "<a href=\"$showprefix$id\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
    } 
now copy-paste this "modified" code over that code.
PHP Code:
        $lookingfor 1;
        
$query mysql_query("SELECT 1,id,headline,image,datetime,slug FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime<='$cdate') ORDER BY datetime desc");
    }


    while(list(
$count,$id,$title,$name,$datetime,$slug) = mysql_fetch_row($query))
    {
        if( 
$count != $lookingfor ) continue;   // Major hack for the browse filters.
        
$title pullout($title);
        
$title htmlspecialchars($title,ENT_QUOTES);
        
$thumbnail "thumbnails/thumb_$name";
        
$thumb_output .= "<a href=\"/fotoblog/$slug\"><img src=\"$thumbnail\" alt=\"$title\" title=\"$title\" class=\"thumbnails\" /></a>";
    } 
I have done this and it works great when you are viewing the main browse page. Once you select a category it no longer works! It pulls the images and displays them from the category you chose but the links are no longer valid. They do not dislay the post slug and they do not display the ugly url code for that specific image. Instead, every image points to the page that that image's category belongs to.

I can't really explain it but goto my site and choose a category and check your status bar to see what URLs are being produced.

http://www.dwilkinsjr.com/browse
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 03:05 PM.

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